diff --git a/base/uk.ac.stfc.isis.ibex.configserver/src/uk/ac/stfc/isis/ibex/configserver/configuration/Block.java b/base/uk.ac.stfc.isis.ibex.configserver/src/uk/ac/stfc/isis/ibex/configserver/configuration/Block.java index 3d4f38ff66..d15517615f 100644 --- a/base/uk.ac.stfc.isis.ibex.configserver/src/uk/ac/stfc/isis/ibex/configserver/configuration/Block.java +++ b/base/uk.ac.stfc.isis.ibex.configserver/src/uk/ac/stfc/isis/ibex/configserver/configuration/Block.java @@ -1,7 +1,7 @@ /* * This file is part of the ISIS IBEX application. -* Copyright (C) 2012-2015 Science & Technology Facilities Council. +* Copyright (C) 2012-2025 Science & Technology Facilities Council. * All rights reserved. * * This program is distributed in the hope that it will be useful. @@ -63,6 +63,12 @@ public class Block extends ModelObject implements IRuncontrol, INamedInComponent private boolean set_block; private String set_block_val; + // Alarms config information + private boolean alarmenabled; + private boolean alarmlatched; + private double alarmdelay; + private String alarmguidance; + /** * Creates a new block given input properties. * @@ -71,9 +77,10 @@ public class Block extends ModelObject implements IRuncontrol, INamedInComponent * @param visible whether the block should be shown * @param local whether the PV is local to the instrument */ - public Block(String name, String pv, boolean visible, boolean local) { - this(name, pv, visible, local, null, 0.0f, 0.0f, false, false, true, DEFAULT_SCAN_RATE, 0.0f, false, ""); - } + public Block(String name, String pv, boolean visible, boolean local) { + this(name, pv, visible, local, null, 0.0f, 0.0f, false, false, true, DEFAULT_SCAN_RATE, 0.0f, false, "", false, + false, 0.0d, ""); + } /** * Creates a new block given input properties. @@ -93,23 +100,33 @@ public Block(String name, String pv, boolean visible, boolean local) { * @param logDeadband deadband for the block to be archived * @param blockSet A boolean value indicating whether or not to set a value on block on config change. * @param blockSetVal The value to set the block to on config change if the blockSet is true. - */ - public Block(String name, String pv, boolean visible, boolean local, String component, double lowLimit, - double highLimit, boolean suspendOnInvalid, Boolean runcontrol, boolean logPeriodic, int logRate, float logDeadband, boolean blockSet, String blockSetVal) { + * @param alarmEnabled whether alarm are enabled for this block + * @param alarmLatched whether alarm are latched for this block + * @param alarmDelay the delay before the alarm is triggered + * @param alarmGuidance guidance text for alarm + */ + public Block(String name, String pv, boolean visible, boolean local, String component, double lowLimit, + double highLimit, boolean suspendOnInvalid, Boolean runcontrol, boolean logPeriodic, int logRate, + float logDeadband, boolean blockSet, String blockSetVal, boolean alarmEnabled, boolean alarmLatched, + Double alarmDelay, String alarmGuidance) { this.name = name; this.pv = pv; this.visible = visible; this.local = local; this.component = component; - this.lowlimit = lowLimit; - this.highlimit = highLimit; - this.runcontrol = runcontrol; - this.log_deadband = logDeadband; - this.log_periodic = logPeriodic; - this.log_rate = logRate; - this.suspend_on_invalid = suspendOnInvalid; - this.set_block = blockSet; - this.set_block_val = blockSetVal; + this.lowlimit = lowLimit; + this.highlimit = highLimit; + this.runcontrol = runcontrol; + this.log_deadband = logDeadband; + this.log_periodic = logPeriodic; + this.log_rate = logRate; + this.suspend_on_invalid = suspendOnInvalid; + this.set_block = blockSet; + this.set_block_val = blockSetVal; + this.alarmenabled = alarmEnabled; + this.alarmlatched = alarmLatched; + this.alarmdelay = alarmDelay; + this.alarmguidance = alarmGuidance; } /** @@ -118,8 +135,9 @@ public Block(String name, String pv, boolean visible, boolean local, String comp * @param other the block to be copied */ public Block(Block other) { - this(other.name, other.pv, other.visible, other.local, other.component, other.lowlimit, other.highlimit, other.suspend_on_invalid, - other.runcontrol, other.log_periodic, other.log_rate, other.log_deadband, other.set_block, other.set_block_val); + this(other.name, other.pv, other.visible, other.local, other.component, other.lowlimit, other.highlimit, + other.suspend_on_invalid, other.runcontrol, other.log_periodic, other.log_rate, other.log_deadband, + other.set_block, other.set_block_val, other.alarmenabled, other.alarmlatched, other.alarmdelay, other.alarmguidance); } /** @@ -385,6 +403,62 @@ public String getblockSetVal() { return set_block_val; } + /** + * @return the alarmEnabled + */ + public boolean isAlarmEnabled() { + return alarmenabled; + } + + /** + * @param alarmEnabled the alarmEnabled to set + */ + public void setAlarmEnabled(boolean alarmEnabled) { + firePropertyChange("alarmEnabled", this.alarmenabled, this.alarmenabled = alarmEnabled); + } + + /** + * @return the alarmLatched + */ + public boolean isAlarmLatched() { + return alarmlatched; + } + + /** + * @param alarmLatched the alarmLatched to set + */ + public void setAlarmLatched(boolean alarmLatched) { + firePropertyChange("alarmLatched", this.alarmlatched, this.alarmlatched = alarmLatched); + } + + /** + * @return the alarmDelay + */ + public double getAlarmDelay() { + return alarmdelay; + } + + /** + * @param alarmDelay the alarmDelay to set + */ + public void setAlarmDelay(double alarmDelay) { + firePropertyChange("alarmDelay", this.alarmdelay, this.alarmdelay = alarmDelay); + } + + /** + * @return the alarmGuidance + */ + public String getAlarmGuidance() { + return alarmguidance; + } + + /** + * @param alarmGuidance the alarmGuidance to set + */ + public void setAlarmGuidance(String alarmGuidance) { + firePropertyChange("alarmGuidance", this.alarmguidance, this.alarmguidance = alarmGuidance); + } + @Override public String toString() { return name; diff --git a/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/BlockAlarmConfigPanel.java b/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/BlockAlarmConfigPanel.java new file mode 100644 index 0000000000..48d8612bde --- /dev/null +++ b/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/BlockAlarmConfigPanel.java @@ -0,0 +1,131 @@ +/** + * This file is part of the ISIS IBEX application. Copyright (C) 2012-2025 + * Science & Technology Facilities Council. All rights reserved. + * + * This program is distributed in the hope that it will be useful. This program + * and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution. EXCEPT AS + * EXPRESSLY SET FORTH IN THE ECLIPSE PUBLIC LICENSE V1.0, THE PROGRAM AND + * ACCOMPANYING MATERIALS ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES + * OR CONDITIONS OF ANY KIND. See the Eclipse Public License v1.0 for more + * details. + * + * You should have received a copy of the Eclipse Public License v1.0 along with + * this program; if not, you can obtain a copy from + * https://www.eclipse.org/org/documents/epl-v10.php or + * http://opensource.org/licenses/eclipse-1.0.php + */ + +package uk.ac.stfc.isis.ibex.ui.configserver.editing.blocks; + +import org.eclipse.core.databinding.DataBindingContext; +import org.eclipse.core.databinding.beans.typed.BeanProperties; +import org.eclipse.jface.databinding.swt.typed.WidgetProperties; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; + +import uk.ac.stfc.isis.ibex.ui.widgets.buttons.IBEXButton; + +/** + * A panel in the edit block dialog for the block's alarm configuration settings. + */ +@SuppressWarnings("checkstyle:magicnumber") +public class BlockAlarmConfigPanel extends Composite { + private Text lowLimit; + private Text highLimit; + private Text delay; + private Text guidance; + private Button enabled; + private Button latched; + + /** + * Standard constructor. + * + * @param parent The parent composite. + * @param style The SWT style. + * @param viewModel The viewModel for the block alarm configuration. + */ + public BlockAlarmConfigPanel(Composite parent, int style, BlockAlarmConfigViewModel viewModel) { + super(parent, style); + setLayout(new FillLayout(SWT.HORIZONTAL)); + + Group alarmConfigGroup = new Group(this, SWT.NONE); + alarmConfigGroup.setText("Alarm Configurations"); + alarmConfigGroup.setLayout(new GridLayout(6, false)); + + addLabel(alarmConfigGroup, "Low Limit:"); + lowLimit = new Text(alarmConfigGroup, SWT.BORDER); + lowLimit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + lowLimit.setToolTipText("Alarm Low limit - not managed at block level"); + lowLimit.setEnabled(false); // Low limit is currently not editable. + //lowLimit.setText(viewModel.getLowLimit()); + + addLabel(alarmConfigGroup, "High Limit:"); + highLimit = new Text(alarmConfigGroup, SWT.BORDER); + highLimit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + highLimit.setToolTipText("Alarm High limit - not managed at block level"); + highLimit.setEnabled(false); // High limit is currently not editable. + //highLimit.setText(viewModel.getHighLimit()); + + addLabel(alarmConfigGroup, "Delay:"); + delay = new Text(alarmConfigGroup, SWT.BORDER); + delay.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); + delay.setToolTipText("Delay before the alarm is triggered"); + + enabled = new IBEXButton(alarmConfigGroup, SWT.CHECK) + .layoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1)) + .text("Enabled").tooltip("Enable or disable the alarm") + .get(); + + latched = new IBEXButton(alarmConfigGroup, SWT.CHECK) + .layoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1)) + .text("Latched").tooltip("Enable or disable latched alarm behavior") + .get(); + + addLabel(alarmConfigGroup, "Guidance:"); + guidance = new Text(alarmConfigGroup, SWT.BORDER); + GridData grid = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); + grid.widthHint = 200; + guidance.setLayoutData(grid); + guidance.setToolTipText("Guidance text for the alarm configuration"); + setModel(viewModel); + } + + /** + * @param alarmConfigGroup the group to which the label is added + * @param labelText the text for the label + */ + private void addLabel(Group alarmConfigGroup, String labelText) { + Label label = new Label(alarmConfigGroup, SWT.NONE); + label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); + label.setText(labelText); + } + + /** + * Sets the view model and observers for run control settings. + * @param viewModel The view model for run control settings. + */ + private void setModel(BlockAlarmConfigViewModel viewModel) { + DataBindingContext bindingContext = new DataBindingContext(); + + bindingContext.bindValue(WidgetProperties.buttonSelection().observe(enabled), + BeanProperties.value(BlockAlarmConfigViewModel.ENABLED_BINDING_NAME).observe(viewModel)); + bindingContext.bindValue(WidgetProperties.buttonSelection().observe(latched), + BeanProperties.value(BlockAlarmConfigViewModel.LATCHED_BINDING_NAME).observe(viewModel)); + bindingContext.bindValue(WidgetProperties.text(SWT.Modify).observe(delay), + BeanProperties.value(BlockAlarmConfigViewModel.DELAY_BINDING_NAME).observe(viewModel)); + bindingContext.bindValue(WidgetProperties.text(SWT.Modify).observe(guidance), + BeanProperties.value(BlockAlarmConfigViewModel.GUIDANCE_BINDING_NAME).observe(viewModel)); + bindingContext.bindValue(WidgetProperties.text(SWT.Modify).observe(lowLimit), + BeanProperties.value(BlockAlarmConfigViewModel.LOWLIMIT_BINDING_NAME).observe(viewModel)); + bindingContext.bindValue(WidgetProperties.text(SWT.Modify).observe(highLimit), + BeanProperties.value(BlockAlarmConfigViewModel.HIGHLIMIT_BINDING_NAME).observe(viewModel)); + } +} diff --git a/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/BlockAlarmConfigViewModel.java b/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/BlockAlarmConfigViewModel.java new file mode 100644 index 0000000000..0b2d8e1b13 --- /dev/null +++ b/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/BlockAlarmConfigViewModel.java @@ -0,0 +1,280 @@ +/** + * This file is part of the ISIS IBEX application. Copyright (C) 2012-2025 + * Science & Technology Facilities Council. All rights reserved. + * + * This program is distributed in the hope that it will be useful. This program + * and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution. EXCEPT AS + * EXPRESSLY SET FORTH IN THE ECLIPSE PUBLIC LICENSE V1.0, THE PROGRAM AND + * ACCOMPANYING MATERIALS ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES + * OR CONDITIONS OF ANY KIND. See the Eclipse Public License v1.0 for more + * details. + * + * You should have received a copy of the Eclipse Public License v1.0 along with + * this program; if not, you can obtain a copy from + * https://www.eclipse.org/org/documents/epl-v10.php or + * http://opensource.org/licenses/eclipse-1.0.php + */ + +package uk.ac.stfc.isis.ibex.ui.configserver.editing.blocks; + +import uk.ac.stfc.isis.ibex.configserver.editing.EditableBlock; +import uk.ac.stfc.isis.ibex.epics.observing.BaseObserver; +import uk.ac.stfc.isis.ibex.epics.observing.ForwardingObservable; +import uk.ac.stfc.isis.ibex.epics.switching.ObservableFactory; +import uk.ac.stfc.isis.ibex.epics.switching.OnInstrumentSwitch; +import uk.ac.stfc.isis.ibex.instrument.channels.DoubleChannel; +import uk.ac.stfc.isis.ibex.logger.IsisLog; +import uk.ac.stfc.isis.ibex.validators.ErrorMessageProvider; + +/** + * The view model for the log settings for a block. + */ +public class BlockAlarmConfigViewModel extends ErrorMessageProvider { + + private final EditableBlock editingBlock; + + private boolean enabled; + private boolean latched; + private Double delay; + private String guidance; + + // Observables for alarm limits + ObservableFactory observableFactory = new ObservableFactory(OnInstrumentSwitch.CLOSE); + private ForwardingObservable alarmLowLimitObservable = null; + private ForwardingObservable alarmHighLimitObservable = null; + private String lowLimit = null; + private String highLimit = null; + + private final BaseObserver alarmLowLimitAdapter = new BaseObserver() { + @Override + public void onValue(Double value) { + setLowLimit((null == value) ? "" : value.toString()); + } + + @Override + public void onError(Exception e) { + lowLimit = ""; + IsisLog.getLogger(getClass()).error("Exception in alarm low limit adapter: " + e.getMessage()); + } + + @Override + public void onConnectionStatus(boolean isConnected) { + if (!isConnected) { + lowLimit = ""; + } + } + }; + + private final BaseObserver alarmHighLimitAdapter = new BaseObserver() { + @Override + public void onValue(Double value) { + setHighLimit((null == value) ? "" : value.toString()); + } + + @Override + public void onError(Exception e) { + highLimit = ""; + IsisLog.getLogger(getClass()).error("Exception in alarm high limit adapter: " + e.getMessage()); + } + + @Override + public void onConnectionStatus(boolean isConnected) { + if (!isConnected) { + highLimit = ""; + } + } + }; + + /** + * Field that the GUI should bind to to update delay value. + */ + public static final String DELAY_BINDING_NAME = "delayString"; + + /** + * Field that the GUI should bind to to update enabled flag. + */ + public static final String ENABLED_BINDING_NAME = "enabled"; + + /** + * Field that the GUI should bind to to update latched flag. + */ + public static final String LATCHED_BINDING_NAME = "latched"; + + /** + * Field that the GUI should bind to to update guidance value. + */ + public static final String GUIDANCE_BINDING_NAME = "guidance"; + + /** + * Field that the GUI should bind to to update lowLimit value. + */ + public static final String LOWLIMIT_BINDING_NAME = "lowLimit"; + + /** + * Field that the GUI should bind to to update highLimit value. + */ + public static final String HIGHLIMIT_BINDING_NAME = "highLimit"; + + /** + * Constructor. + * + * @param editingBlock the block being edited + */ + public BlockAlarmConfigViewModel(final EditableBlock editingBlock) { + this.editingBlock = editingBlock; + enabled = editingBlock.isAlarmEnabled(); + latched = editingBlock.isAlarmLatched(); + delay = editingBlock.getAlarmDelay(); + guidance = editingBlock.getAlarmGuidance(); + + // Create the observables to monitor the alarm limits + createAlarmObservables(); + } + + /** + * Gets whether alarm is enabled. + * + * @return is the alarm enabled + */ + public boolean getEnabled() { + return enabled; + } + + /** + * Sets whether the alarm is enabled. + * + * @param enabled - Is alarm enabled (true) or disabled (false) + */ + public void setEnabled(boolean enabled) { + firePropertyChange("enabled", this.enabled, this.enabled = enabled); + } + + /** + * Gets whether alarm is latched. + * + * @return whether alarm is latched + */ + public boolean getLatched() { + return latched; + } + + /** + * Sets whether alarm is latched. + * + * @param latched - Is alarm latched (true) or not latched (false) + */ + public void setLatched(boolean latched) { + firePropertyChange("latched", this.latched, this.latched = latched); + } + + /** + * Gets the delay. + * + * @return the delay + */ + public Double getDelay() { + return delay; + } + + /** + * Set the delay. + * + * @param delay the delay value waited before triggering the alarm + */ + public void setDelay(Double delay) { + firePropertyChange("delay", this.delay, this.delay = delay); + } + + /** + * @return the guidance for the alarm + */ + public String getGuidance() { + return guidance; + } + + /** + * Set the guidance. + * + * @param guidance the guidance for the alarm + */ + public void setGuidance(String guidance) { + firePropertyChange("guidance", this.guidance, this.guidance = guidance); + } + + /** + * Gets the low limit . + * @return the low limit + */ + public String getLowLimit() { + return lowLimit; + } + + /** + * Sets the low limit. + * @param lowLimit + */ + public void setLowLimit(String lowLimit) { + firePropertyChange("lowLimit", this.lowLimit, this.lowLimit = lowLimit); + } + + /** + * Gets the high limit. + * @return the high limit + */ + public String getHighLimit() { + return highLimit; + } + + /** + * Sets the High limit. + * @param highLimit + */ + public void setHighLimit(String highLimit) { + firePropertyChange("highLimit", this.highLimit, this.highLimit = highLimit); + } + + /** + * Gets the delay value as a string. + * @return the delay as a string + */ + public String getDelayString() { + Double value = getDelay(); + return value == null ? "" : value.toString(); + } + + /** + * Sets the delay value from a text value. + * @param delay the delay value as a string + */ + public void setDelayString(String delay) { + try { + setDelay(Double.valueOf(delay)); + } catch (NumberFormatException | NullPointerException e) { + setDelay(null); + } + } + + /** + * Update the settings on the block. + */ + public void updateBlock() { + editingBlock.setAlarmEnabled(enabled); + editingBlock.setAlarmLatched(latched); + editingBlock.setAlarmDelay(delay); + editingBlock.setAlarmGuidance(guidance); + } + + /** + * Creates an observable for the PV holding the current state of this banner + * item. + */ + private void createAlarmObservables() { + alarmLowLimitObservable = observableFactory.getSwitchableObservable(new DoubleChannel(), + editingBlock.getPV() + ".LOW"); + alarmHighLimitObservable = observableFactory.getSwitchableObservable(new DoubleChannel(), + editingBlock.getPV() + ".HIGH"); + alarmLowLimitObservable.subscribe(alarmLowLimitAdapter); + alarmHighLimitObservable.subscribe(alarmHighLimitAdapter); + } +} diff --git a/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/EditBlockDialog.java b/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/EditBlockDialog.java index 32bc4364f1..c682206248 100644 --- a/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/EditBlockDialog.java +++ b/base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/blocks/EditBlockDialog.java @@ -1,3 +1,20 @@ +/** + * This file is part of the ISIS IBEX application. Copyright (C) 2012-2025 + * Science & Technology Facilities Council. All rights reserved. + * + * This program is distributed in the hope that it will be useful. This program + * and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution. EXCEPT AS + * EXPRESSLY SET FORTH IN THE ECLIPSE PUBLIC LICENSE V1.0, THE PROGRAM AND + * ACCOMPANYING MATERIALS ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES + * OR CONDITIONS OF ANY KIND. See the Eclipse Public License v1.0 for more + * details. + * + * You should have received a copy of the Eclipse Public License v1.0 along with + * this program; if not, you can obtain a copy from + * https://www.eclipse.org/org/documents/epl-v10.php or + * http://opensource.org/licenses/eclipse-1.0.php + */ package uk.ac.stfc.isis.ibex.ui.configserver.editing.blocks; import java.beans.PropertyChangeEvent; @@ -45,6 +62,9 @@ public class EditBlockDialog extends TitleAreaDialog { BlockSetPanel blockSetPanel; BlockSetViewModel blockSetViewModel; + + BlockAlarmConfigPanel blockAlarmConfigPanel; + BlockAlarmConfigViewModel blockAlarmConfigViewModel; Button okButton; @@ -95,8 +115,11 @@ public EditBlockDialog(Shell parentShell, EditableBlock block, EditableConfigura blockDetailsViewModel = new BlockDetailsViewModel(this.block, this.config); blockGroupViewModel = new BlockGroupViewModel(this.block, this.config); blockSetViewModel = new BlockSetViewModel(this.block); + blockAlarmConfigViewModel = new BlockAlarmConfigViewModel(this.block); + - viewModels = Arrays.asList(blockLogSettingsViewModel, blockRunControlViewModel, blockDetailsViewModel, blockGroupViewModel); + viewModels = Arrays.asList(blockLogSettingsViewModel, blockRunControlViewModel, blockDetailsViewModel, + blockGroupViewModel, blockAlarmConfigViewModel); for (ErrorMessageProvider provider : viewModels) { provider.addPropertyChangeListener("error", errorListener); @@ -127,6 +150,9 @@ protected Control createDialogArea(Composite parent) { blockSetPanel = new BlockSetPanel(blockDetailsPanel, SWT.NONE, blockSetViewModel); blockSetPanel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); + + blockAlarmConfigPanel = new BlockAlarmConfigPanel(blockDetailsPanel, SWT.NONE, blockAlarmConfigViewModel); + blockAlarmConfigPanel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); new IBEXHelpButton(parent, HELP_LINK, DESCRIPTION); @@ -140,6 +166,7 @@ protected void okPressed() { blockLogSettingsViewModel.updateBlock(); blockGroupViewModel.updateBlock(); blockSetViewModel.updateBlock(); + blockAlarmConfigViewModel.updateBlock(); try { if (!config.getAllBlocks().contains(this.block)) { config.addNewBlock(this.block);