diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/HawkbitServerProperties.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/HawkbitServerProperties.java index 633e6eaf9..878965102 100644 --- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/HawkbitServerProperties.java +++ b/hawkbit-core/src/main/java/org/eclipse/hawkbit/HawkbitServerProperties.java @@ -9,13 +9,11 @@ package org.eclipse.hawkbit; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; /** * Properties for the server e.g. the server's URL which must be configured. * */ -@Component @ConfigurationProperties("hawkbit.server") public class HawkbitServerProperties { /** diff --git a/hawkbit-repository/src/test/java/org/eclipse/hawkbit/TestConfiguration.java b/hawkbit-repository/src/test/java/org/eclipse/hawkbit/TestConfiguration.java index e2838d866..70372fac2 100644 --- a/hawkbit-repository/src/test/java/org/eclipse/hawkbit/TestConfiguration.java +++ b/hawkbit-repository/src/test/java/org/eclipse/hawkbit/TestConfiguration.java @@ -47,7 +47,7 @@ import com.mongodb.MongoClientOptions; */ @Configuration @EnableGlobalMethodSecurity(prePostEnabled = true, mode = AdviceMode.ASPECTJ, proxyTargetClass = true, securedEnabled = true) -@EnableConfigurationProperties({ DdiSecurityProperties.class }) +@EnableConfigurationProperties({ HawkbitServerProperties.class, DdiSecurityProperties.class }) @Profile("test") public class TestConfiguration implements AsyncConfigurer { diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java index ee2ccec44..8cefc15fa 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java @@ -26,7 +26,7 @@ import com.vaadin.ui.GridLayout; * duration in the DurationField or he can configure using the global duration * by changing the CheckBox. */ -public class DurationConfigField extends GridLayout implements ValueChangeListener, ConfigurationItem { +public class DurationConfigField extends GridLayout implements ConfigurationItem { private static final long serialVersionUID = 1L; @@ -50,15 +50,11 @@ public class DurationConfigField extends GridLayout implements ValueChangeListen this.addComponent(durationField, 1, 0); this.setComponentAlignment(durationField, Alignment.MIDDLE_LEFT); - checkBox.addValueChangeListener(this); - durationField.addValueChangeListener(this); + checkBox.addValueChangeListener(event->checkBoxChange()); + durationField.addValueChangeListener(event->notifyConfigurationChanged()); } - @Override - public void valueChange(final ValueChangeEvent event) { - if (event.getProperty() != checkBox) { - return; - } + private void checkBoxChange() { durationField.setEnabled(checkBox.getValue()); if (!checkBox.getValue()) {