Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Minor

Christian Bauer56937289a550
diff --git a/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesEditor.java b/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesEditor.java
index 41902afdf..6d9177022 100644
--- a/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesEditor.java
+++ b/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesEditor.java
@@ -101,6 +101,11 @@ public class AttributesEditor
formGroup.addExtension(new MetaEditor(attribute));
}
+ @Override
+ protected boolean isReadOnly(AssetAttribute attribute) {
+ return false; // Always allow editing of attribute value
+ }
+
@Override
protected boolean isShowTimestamp(AssetAttribute attribute) {
return false;
diff --git a/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesView.java b/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesView.java
index 7c13602ec..05f3d46f8 100644
--- a/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesView.java
+++ b/manager/client/src/main/java/org/openremote/manager/client/assets/attributes/AttributesView.java
@@ -253,7 +253,7 @@ public abstract class AttributesView<
String currentValue = attribute.getValueAsString();
String defaultValue = defaultValueItem != null ? defaultValueItem.getValueAsString() : null;
- Consumer<String> updateConsumer = isDefaultReadOnly(attribute) ? null : value -> {
+ Consumer<String> updateConsumer = isReadOnly(attribute) ? null : value -> {
formGroup.setError(false);
attribute.setValueAsString(value);
};
@@ -299,7 +299,7 @@ public abstract class AttributesView<
protected AttributeEditor createIntegerEditor(A attribute, MetaItem defaultValueItem, S style, FormGroup formGroup) {
String currentValue = attribute.getValueAsString();
String defaultValue = defaultValueItem != null ? defaultValueItem.getValueAsString() : null;
- Consumer<String> updateConsumer = isDefaultReadOnly(attribute) ? null : value -> {
+ Consumer<String> updateConsumer = isReadOnly(attribute) ? null : value -> {
Integer intValue = Integer.valueOf(value);
formGroup.setError(false);
attribute.setValueAsInteger(intValue);
@@ -356,7 +356,7 @@ public abstract class AttributesView<
protected AttributeEditor createDecimalEditor(A attribute, MetaItem defaultValueItem, S style, FormGroup formGroup) {
String currentValue = attribute.getValueAsString();
String defaultValue = defaultValueItem != null ? defaultValueItem.getValueAsString() : null;
- Consumer<String> updateConsumer = isDefaultReadOnly(attribute) ? null : value -> {
+ Consumer<String> updateConsumer = isReadOnly(attribute) ? null : value -> {
Double decimalValue = Double.valueOf(value);
formGroup.setError(false);
attribute.setValueAsDecimal(decimalValue);
@@ -413,7 +413,7 @@ public abstract class AttributesView<
protected AttributeEditor createBooleanEditor(A attribute, MetaItem defaultValueItem, S style, FormGroup formGroup) {
Boolean currentValue = attribute.getValueAsBoolean();
Boolean defaultValue = defaultValueItem != null ? defaultValueItem.getValueAsBoolean() : null;
- Consumer<Boolean> updateConsumer = isDefaultReadOnly(attribute) ? null : value -> {
+ Consumer<Boolean> updateConsumer = isReadOnly(attribute) ? null : value -> {
formGroup.setError(false);
attribute.setValueUnchecked(Json.create(value));
};
@@ -471,7 +471,7 @@ public abstract class AttributesView<
return input;
}
- protected boolean isDefaultReadOnly(A attribute) {
+ protected boolean isReadOnly(A attribute) {
return attribute.isReadOnly();
}