|
|
|
@ -57,7 +57,7 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
"tag": "value", |
|
|
|
"stateRenderFunction": "var value = ctx.values.value;\nctx.api.text(element, value.toFixed(0));\n", |
|
|
|
"stateRenderFunction": "var value = ctx.api.formatValue(ctx.values.value, ctx.properties.valueDecimals, '', false);\nctx.api.text(element, value);\n", |
|
|
|
"actions": { |
|
|
|
"click": { |
|
|
|
"actionFunction": "ctx.api.callAction(event, 'displayClick');" |
|
|
|
@ -463,16 +463,20 @@ |
|
|
|
"name": "{i18n:scada.symbol.units}", |
|
|
|
"type": "units", |
|
|
|
"default": "m³/hr", |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "medium-width", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "valueDecimals", |
|
|
|
"name": "{i18n:scada.symbol.decimals}", |
|
|
|
"type": "number", |
|
|
|
"default": 0, |
|
|
|
"fieldClass": "medium-width", |
|
|
|
"min": 0, |
|
|
|
"step": 1, |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "defaultBorderColor", |
|
|
|
@ -511,16 +515,8 @@ |
|
|
|
}, |
|
|
|
"colorFunction": "var temperature = value;\nif (typeof temperature !== undefined) {\n var percent = (temperature + 60)/120 * 100;\n return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';" |
|
|
|
}, |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "activeBorderColor", |
|
|
|
@ -559,16 +555,8 @@ |
|
|
|
}, |
|
|
|
"colorFunction": "var temperature = value;\nif (typeof temperature !== undefined) {\n var percent = (temperature + 60)/120 * 100;\n return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';" |
|
|
|
}, |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "warningBorderColor", |
|
|
|
@ -607,16 +595,8 @@ |
|
|
|
}, |
|
|
|
"colorFunction": "var temperature = value;\nif (typeof temperature !== undefined) {\n var percent = (temperature + 60)/120 * 100;\n return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';" |
|
|
|
}, |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "criticalBorderColor", |
|
|
|
@ -655,16 +635,8 @@ |
|
|
|
}, |
|
|
|
"colorFunction": "var temperature = value;\nif (typeof temperature !== undefined) {\n var percent = (temperature + 60)/120 * 100;\n return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';" |
|
|
|
}, |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "backgroundColor", |
|
|
|
@ -703,48 +675,24 @@ |
|
|
|
}, |
|
|
|
"colorFunction": "var temperature = value;\nif (typeof temperature !== undefined) {\n var percent = (temperature + 60)/120 * 100;\n return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';" |
|
|
|
}, |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "fluidColor", |
|
|
|
"name": "{i18n:scada.symbol.fluid-color}", |
|
|
|
"type": "color", |
|
|
|
"default": "#1EC1F480", |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "pipeColor", |
|
|
|
"name": "{i18n:scada.symbol.pipe-color}", |
|
|
|
"type": "color", |
|
|
|
"default": "#FFFFFF", |
|
|
|
"required": null, |
|
|
|
"subLabel": null, |
|
|
|
"divider": null, |
|
|
|
"fieldSuffix": null, |
|
|
|
"disableOnProperty": null, |
|
|
|
"rowClass": "", |
|
|
|
"fieldClass": "", |
|
|
|
"min": null, |
|
|
|
"max": null, |
|
|
|
"step": null |
|
|
|
"disabled": false, |
|
|
|
"visible": true |
|
|
|
} |
|
|
|
] |
|
|
|
}]]></tb:metadata> |
|
|
|
|