UI: Update flow meter SCADA symbols metadata - remove showValue property.
@ -53,7 +53,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "value",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var value = ctx.values.value;\n ctx.api.text(element, value.toFixed(0));\n}",
|
||||
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -62,7 +62,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "valueUnits",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var units = ctx.properties.valueUnits;\n ctx.api.text(element, units || '');\n}",
|
||||
"stateRenderFunction": "var units = ctx.properties.valueUnits;\nctx.api.text(element, units || '');\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -238,34 +238,18 @@
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"id": "showValue",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"type": "switch",
|
||||
"default": true,
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
},
|
||||
{
|
||||
"id": "valueUnits",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"name": "{i18n:scada.symbol.units}",
|
||||
"type": "units",
|
||||
"default": "m³/hr",
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": "showValue",
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"fieldClass": "medium-width",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
@ -52,7 +52,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "value",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var value = ctx.values.value;\n ctx.api.text(element, value.toFixed(0));\n}",
|
||||
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -61,7 +61,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "valueUnits",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var units = ctx.properties.valueUnits;\n ctx.api.text(element, units || '');\n}",
|
||||
"stateRenderFunction": "var units = ctx.properties.valueUnits;\nctx.api.text(element, units || '');\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -237,34 +237,18 @@
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"id": "showValue",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"type": "switch",
|
||||
"default": true,
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
},
|
||||
{
|
||||
"id": "valueUnits",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"name": "{i18n:scada.symbol.units}",
|
||||
"type": "units",
|
||||
"default": "m³/hr",
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": "showValue",
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"fieldClass": "medium-width",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
@ -52,7 +52,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "value",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var value = ctx.values.value;\n ctx.api.text(element, value.toFixed(0));\n}",
|
||||
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -61,7 +61,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "valueUnits",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var units = ctx.properties.valueUnits;\n ctx.api.text(element, units || '');\n}",
|
||||
"stateRenderFunction": "var units = ctx.properties.valueUnits;\nctx.api.text(element, units || '');\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -237,34 +237,18 @@
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"id": "showValue",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"type": "switch",
|
||||
"default": true,
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
},
|
||||
{
|
||||
"id": "valueUnits",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"name": "{i18n:scada.symbol.units}",
|
||||
"type": "units",
|
||||
"default": "m³/hr",
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": "showValue",
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"fieldClass": "medium-width",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
|
||||
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
@ -53,7 +53,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "value",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var value = ctx.values.value;\n ctx.api.text(element, value.toFixed(0));\n}",
|
||||
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -62,7 +62,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "valueUnits",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var units = ctx.properties.valueUnits;\n ctx.api.text(element, units || '');\n}",
|
||||
"stateRenderFunction": "var units = ctx.properties.valueUnits;\nctx.api.text(element, units || '');\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -238,34 +238,18 @@
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"id": "showValue",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"type": "switch",
|
||||
"default": true,
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
},
|
||||
{
|
||||
"id": "valueUnits",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"name": "{i18n:scada.symbol.units}",
|
||||
"type": "units",
|
||||
"default": "m³/hr",
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": "showValue",
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"fieldClass": "medium-width",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 67 KiB |
@ -53,7 +53,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "value",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var value = ctx.values.value;\n ctx.api.text(element, value.toFixed(0));\n}",
|
||||
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -62,7 +62,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "valueUnits",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var units = ctx.properties.valueUnits;\n ctx.api.text(element, units || '');\n}",
|
||||
"stateRenderFunction": "var units = ctx.properties.valueUnits;\nctx.api.text(element, units || '');\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -238,34 +238,18 @@
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"id": "showValue",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"type": "switch",
|
||||
"default": true,
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
},
|
||||
{
|
||||
"id": "valueUnits",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"name": "{i18n:scada.symbol.units}",
|
||||
"type": "units",
|
||||
"default": "m³/hr",
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": "showValue",
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"fieldClass": "medium-width",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
|
||||
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
@ -52,7 +52,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "value",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var value = ctx.values.value;\n ctx.api.text(element, value.toFixed(0));\n}",
|
||||
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -61,7 +61,7 @@
|
||||
},
|
||||
{
|
||||
"tag": "valueUnits",
|
||||
"stateRenderFunction": "if (!ctx.properties.showValue) {\n element.hide();\n} else {\n var units = ctx.properties.valueUnits;\n ctx.api.text(element, units || '');\n}",
|
||||
"stateRenderFunction": "var units = ctx.properties.valueUnits;\nctx.api.text(element, units || '');\n",
|
||||
"actions": {
|
||||
"click": {
|
||||
"actionFunction": "ctx.api.callAction(event, 'displayClick');"
|
||||
@ -237,34 +237,18 @@
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"id": "showValue",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"type": "switch",
|
||||
"default": true,
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
},
|
||||
{
|
||||
"id": "valueUnits",
|
||||
"name": "{i18n:scada.symbol.value}",
|
||||
"name": "{i18n:scada.symbol.units}",
|
||||
"type": "units",
|
||||
"default": "m³/hr",
|
||||
"required": null,
|
||||
"subLabel": null,
|
||||
"divider": null,
|
||||
"fieldSuffix": null,
|
||||
"disableOnProperty": "showValue",
|
||||
"disableOnProperty": null,
|
||||
"rowClass": "",
|
||||
"fieldClass": "",
|
||||
"fieldClass": "medium-width",
|
||||
"min": null,
|
||||
"max": null,
|
||||
"step": null
|
||||
|
||||
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 70 KiB |
@ -231,12 +231,16 @@ export class ScadaSymbolObjectSettingsComponent implements OnInit, OnChanges, Co
|
||||
if (this.validatorTriggers.length) {
|
||||
const observables: Observable<any>[] = [];
|
||||
for (const trigger of this.validatorTriggers) {
|
||||
if (propertiesFormGroup.get(trigger)) {
|
||||
observables.push(propertiesFormGroup.get(trigger).valueChanges);
|
||||
}
|
||||
}
|
||||
if (observables.length) {
|
||||
this.validatorSubscription = merge(...observables).subscribe(() => {
|
||||
this.updateValidators();
|
||||
});
|
||||
}
|
||||
}
|
||||
this.setupValue();
|
||||
this.cd.markForCheck();
|
||||
}
|
||||
|
||||
@ -99,6 +99,13 @@ export class ScadaSymbolPropertiesComponent implements ControlValueAccessor, OnI
|
||||
properties = properties.filter(p => propertyValid(p));
|
||||
}
|
||||
this.booleanPropertyIds = properties.filter(p => p.type === ScadaSymbolPropertyType.switch).map(p => p.id);
|
||||
properties.forEach((p, i) => {
|
||||
if (p.disableOnProperty && !this.booleanPropertyIds.includes(p.disableOnProperty)) {
|
||||
p.disableOnProperty = null;
|
||||
const controls = this.propertiesFormArray().controls;
|
||||
controls[i].patchValue(p, {emitEvent: false});
|
||||
}
|
||||
});
|
||||
this.propagateChange(properties);
|
||||
}
|
||||
);
|
||||
|
||||
@ -3623,6 +3623,7 @@
|
||||
"bottom-fluid-color": "Bottom fluid color",
|
||||
"display": "Display",
|
||||
"value": "Value",
|
||||
"units": "Units",
|
||||
"flow-meter-value-hint": "Double value showing on flow meter display",
|
||||
"warning-state": "Warning state",
|
||||
"warning": "Warning",
|
||||
|
||||