Add missing field and checkbox id (#401)
* Add missing field and checkbox id Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
committed by
Kai Zimmermann
parent
6aaade8698
commit
4d35413f71
@@ -17,6 +17,7 @@ import org.eclipse.hawkbit.tenancy.configuration.DurationHelper;
|
|||||||
import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationKey;
|
import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationKey;
|
||||||
import org.eclipse.hawkbit.ui.tenantconfiguration.polling.DurationConfigField;
|
import org.eclipse.hawkbit.ui.tenantconfiguration.polling.DurationConfigField;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
|
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
|
||||||
|
|
||||||
import com.vaadin.ui.Label;
|
import com.vaadin.ui.Label;
|
||||||
import com.vaadin.ui.Panel;
|
import com.vaadin.ui.Panel;
|
||||||
@@ -74,13 +75,15 @@ public class PollingConfigurationView extends BaseConfigurationView
|
|||||||
headerDisSetType.addStyleName("config-panel-header");
|
headerDisSetType.addStyleName("config-panel-header");
|
||||||
vLayout.addComponent(headerDisSetType);
|
vLayout.addComponent(headerDisSetType);
|
||||||
|
|
||||||
fieldPollTime = DurationConfigField.builder().caption(i18n.get("configuration.polling.time"))
|
fieldPollTime = DurationConfigField.builder(UIComponentIdProvider.SYSTEM_CONFIGURATION_POLLING)
|
||||||
|
.caption(i18n.get("configuration.polling.time"))
|
||||||
.checkBoxTooltip(i18n.get("configuration.polling.custom.value")).range(minDuration, maxDuration)
|
.checkBoxTooltip(i18n.get("configuration.polling.custom.value")).range(minDuration, maxDuration)
|
||||||
.globalDuration(globalPollTime).tenantDuration(tenantPollTime).build();
|
.globalDuration(globalPollTime).tenantDuration(tenantPollTime).build();
|
||||||
fieldPollTime.addChangeListener(this);
|
fieldPollTime.addChangeListener(this);
|
||||||
vLayout.addComponent(fieldPollTime);
|
vLayout.addComponent(fieldPollTime);
|
||||||
|
|
||||||
fieldPollingOverdueTime = DurationConfigField.builder().caption(i18n.get("configuration.polling.overduetime"))
|
fieldPollingOverdueTime = DurationConfigField.builder(UIComponentIdProvider.SYSTEM_CONFIGURATION_OVERDUE)
|
||||||
|
.caption(i18n.get("configuration.polling.overduetime"))
|
||||||
.checkBoxTooltip(i18n.get("configuration.polling.custom.value")).range(minDuration, maxDuration)
|
.checkBoxTooltip(i18n.get("configuration.polling.custom.value")).range(minDuration, maxDuration)
|
||||||
.globalDuration(globalOverdueTime).tenantDuration(tenantOverdueTime).build();
|
.globalDuration(globalOverdueTime).tenantDuration(tenantOverdueTime).build();
|
||||||
fieldPollingOverdueTime.addChangeListener(this);
|
fieldPollingOverdueTime.addChangeListener(this);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public final class DurationConfigField extends GridLayout implements Configurati
|
|||||||
private final DurationField durationField = new DurationField();
|
private final DurationField durationField = new DurationField();
|
||||||
private Duration globalDuration;
|
private Duration globalDuration;
|
||||||
|
|
||||||
private DurationConfigField() {
|
private DurationConfigField(final String id) {
|
||||||
super(2, 2);
|
super(2, 2);
|
||||||
|
|
||||||
this.addStyleName("duration-config-field");
|
this.addStyleName("duration-config-field");
|
||||||
@@ -42,6 +42,8 @@ public final class DurationConfigField extends GridLayout implements Configurati
|
|||||||
this.setImmediate(true);
|
this.setImmediate(true);
|
||||||
this.setColumnExpandRatio(1, 1.0F);
|
this.setColumnExpandRatio(1, 1.0F);
|
||||||
|
|
||||||
|
durationField.setId(id + ".field");
|
||||||
|
checkBox.setId(id + ".checkbox");
|
||||||
this.addComponent(checkBox, 0, 0);
|
this.addComponent(checkBox, 0, 0);
|
||||||
this.setComponentAlignment(checkBox, Alignment.MIDDLE_LEFT);
|
this.setComponentAlignment(checkBox, Alignment.MIDDLE_LEFT);
|
||||||
|
|
||||||
@@ -135,8 +137,8 @@ public final class DurationConfigField extends GridLayout implements Configurati
|
|||||||
*
|
*
|
||||||
* @return the builder
|
* @return the builder
|
||||||
*/
|
*/
|
||||||
public static DurationConfigFieldBuilder builder() {
|
public static DurationConfigFieldBuilder builder(final String id) {
|
||||||
return new DurationConfigFieldBuilder();
|
return new DurationConfigFieldBuilder(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -149,8 +151,8 @@ public final class DurationConfigField extends GridLayout implements Configurati
|
|||||||
private Duration globalDuration;
|
private Duration globalDuration;
|
||||||
private Duration tenantDuration;
|
private Duration tenantDuration;
|
||||||
|
|
||||||
private DurationConfigFieldBuilder() {
|
private DurationConfigFieldBuilder(final String id) {
|
||||||
field = new DurationConfigField();
|
field = new DurationConfigField(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -409,6 +409,16 @@ public final class UIComponentIdProvider {
|
|||||||
*/
|
*/
|
||||||
public static final String SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX = "default.disset.combobox";
|
public static final String SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX = "default.disset.combobox";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Polling system configuration.
|
||||||
|
*/
|
||||||
|
public static final String SYSTEM_CONFIGURATION_POLLING = "system.configuration.polling";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overdue system configuration.
|
||||||
|
*/
|
||||||
|
public static final String SYSTEM_CONFIGURATION_OVERDUE = "system.configuration.ovderdue";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button save id.
|
* Button save id.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user