Compare commits
No commits in common. "458a3e1d7efd4f12642da1300ce0142e71e6cd44" and "79b6c8b13642b0f53fb5b596a01dbaf800d71bcc" have entirely different histories.
458a3e1d7e
...
79b6c8b136
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"custom": {
|
"custom": {
|
||||||
|
"alarm_message": null,
|
||||||
"disconnected": false,
|
"disconnected": false,
|
||||||
"plc": "System",
|
"plc": "value",
|
||||||
"priority": 0,
|
"priority": 0,
|
||||||
"priority_string": "No active alarms",
|
"priority_string": "No active alarms",
|
||||||
"searchId": "value",
|
"searchId": "PLC01",
|
||||||
"state": 0,
|
"state": 0,
|
||||||
"state_string": "Normal"
|
"state_string": "Normal"
|
||||||
},
|
},
|
||||||
@ -12,7 +13,7 @@
|
|||||||
"forceFaultStatus": null,
|
"forceFaultStatus": null,
|
||||||
"forceRunningStatus": null,
|
"forceRunningStatus": null,
|
||||||
"tagProps": [
|
"tagProps": [
|
||||||
"System/Station/EPC/UL1_3_EPC1",
|
"value",
|
||||||
"value",
|
"value",
|
||||||
"value",
|
"value",
|
||||||
"value",
|
"value",
|
||||||
@ -31,14 +32,14 @@
|
|||||||
"fallbackDelay": 2.5,
|
"fallbackDelay": 2.5,
|
||||||
"mode": "indirect",
|
"mode": "indirect",
|
||||||
"references": {
|
"references": {
|
||||||
"0": "{view.params.tagProps[0]}",
|
"fc": "{session.custom.fc}",
|
||||||
"fc": "{session.custom.fc}"
|
"plc": "{view.custom.plc}"
|
||||||
},
|
},
|
||||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"expression": "!isGood({value})",
|
"expression": "if(isNull({value}), False, {value})",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -91,12 +92,16 @@
|
|||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"fallback": "No active alarms",
|
"fallback": "Unknown",
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 1,
|
||||||
"output": "High"
|
"output": "High"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "No active alarms"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -131,6 +136,22 @@
|
|||||||
{
|
{
|
||||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fallback": null,
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "tag"
|
"type": "tag"
|
||||||
@ -140,7 +161,7 @@
|
|||||||
"custom.state_string": {
|
"custom.state_string": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
},
|
},
|
||||||
@ -181,9 +202,27 @@
|
|||||||
"props.elements[0].fill.paint": {
|
"props.elements[0].fill.paint": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#FFFFFF\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#AAAAAA\", \"#AAAAAA\", \r\n \"#FFFF00\"\r\n )\r\n)"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "#AC0000",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "#AAAAAA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": "#AAAAAA"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "color",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props.elements[1].fill.paint": {
|
"props.elements[1].fill.paint": {
|
||||||
@ -203,17 +242,29 @@
|
|||||||
"props.elements[2].visibility": {
|
"props.elements[2].visibility": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\r\n {view.custom.state} \u003d 0 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if(\r\n !{value} \u0026\u0026 \r\n {view.custom.state} \u003d 0 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props.elements[3].visibility": {
|
"props.elements[3].visibility": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if(\r\n {value} \u0026\u0026 \r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -316,6 +367,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"propConfig": {
|
"propConfig": {
|
||||||
|
"meta.tooltip.style.backgroundColor": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
"meta.tooltip.style.classes": {
|
"meta.tooltip.style.classes": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
@ -338,10 +403,24 @@
|
|||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"meta.tooltip.style.color": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
"meta.tooltip.text": {
|
"meta.tooltip.text": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
@ -353,6 +432,32 @@
|
|||||||
},
|
},
|
||||||
"type": "property"
|
"type": "property"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"props.style.classes": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.disconnected"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "Disconnects/Device-Connected",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": true,
|
||||||
|
"output": "Disconnects/Device-Disconnected"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": false,
|
||||||
|
"output": "Disconnects/Device-Connected"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "style-list",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"plc": "value",
|
"plc": "value",
|
||||||
"priority": 0,
|
"priority": 0,
|
||||||
"priority_string": "No active alarms",
|
"priority_string": "No active alarms",
|
||||||
"searchId": "value",
|
"searchId": "PLC01",
|
||||||
"state": 0,
|
"state": 0,
|
||||||
"state_string": "Normal"
|
"state_string": "Normal"
|
||||||
},
|
},
|
||||||
@ -31,14 +31,14 @@
|
|||||||
"fallbackDelay": 2.5,
|
"fallbackDelay": 2.5,
|
||||||
"mode": "indirect",
|
"mode": "indirect",
|
||||||
"references": {
|
"references": {
|
||||||
"0": "{view.params.tagProps[0]}",
|
"fc": "{session.custom.fc}",
|
||||||
"fc": "{session.custom.fc}"
|
"plc": "{view.custom.plc}"
|
||||||
},
|
},
|
||||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"expression": "!isGood({value})",
|
"expression": "if(isNull({value}), False, {value})",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -68,12 +68,12 @@
|
|||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"fallback": 0,
|
"fallback": 1,
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 0,
|
||||||
"output": 1
|
"output": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -91,12 +91,16 @@
|
|||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"fallback": "No active alarms",
|
"fallback": "Unknown",
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 1,
|
||||||
"output": "High"
|
"output": "High"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "No active alarms"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -131,6 +135,22 @@
|
|||||||
{
|
{
|
||||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fallback": null,
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "tag"
|
"type": "tag"
|
||||||
@ -140,7 +160,7 @@
|
|||||||
"custom.state_string": {
|
"custom.state_string": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
},
|
},
|
||||||
@ -179,8 +199,88 @@
|
|||||||
"props.elements[0].fill.paint": {
|
"props.elements[0].fill.paint": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#AAAAAA\", \"#FF0000\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "#AC0000",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "#AAAAAA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": "#B79D9D"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "color",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.style.classes": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 101,
|
||||||
|
"output": "State-Styles/State101"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 102,
|
||||||
|
"output": "State-Styles/State102"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 103,
|
||||||
|
"output": "State-Styles/State103"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 104,
|
||||||
|
"output": "State-Styles/State104"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 105,
|
||||||
|
"output": "State-Styles/State105"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 106,
|
||||||
|
"output": "State-Styles/State106"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 201,
|
||||||
|
"output": "State-Styles/State201"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 202,
|
||||||
|
"output": "State-Styles/State202"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 203,
|
||||||
|
"output": "State-Styles/State203"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 204,
|
||||||
|
"output": "State-Styles/State204"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 205,
|
||||||
|
"output": "State-Styles/State205"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "style-list",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,6 +299,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"preserveAspectRatio": "none",
|
"preserveAspectRatio": "none",
|
||||||
|
"style": {},
|
||||||
"viewBox": "-0.5 -0.5 27 42"
|
"viewBox": "-0.5 -0.5 27 42"
|
||||||
},
|
},
|
||||||
"type": "ia.shapes.svg"
|
"type": "ia.shapes.svg"
|
||||||
@ -239,6 +340,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"propConfig": {
|
"propConfig": {
|
||||||
|
"meta.tooltip.style.backgroundColor": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
"meta.tooltip.style.classes": {
|
"meta.tooltip.style.classes": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
@ -261,10 +376,24 @@
|
|||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"meta.tooltip.style.color": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
"meta.tooltip.text": {
|
"meta.tooltip.text": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
@ -276,6 +405,32 @@
|
|||||||
},
|
},
|
||||||
"type": "property"
|
"type": "property"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"props.style.classes": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.disconnected"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "Disconnects/Device-Connected",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": true,
|
||||||
|
"output": "Disconnects/Device-Disconnected"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": false,
|
||||||
|
"output": "Disconnects/Device-Connected"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "style-list",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"custom": {
|
"custom": {
|
||||||
"disconnected": true,
|
"alarm_message": null,
|
||||||
|
"disconnected": false,
|
||||||
"plc": "value",
|
"plc": "value",
|
||||||
"priority": 0,
|
"priority": 0,
|
||||||
"priority_string": "No active alarms",
|
"priority_string": "No active alarms",
|
||||||
"searchId": "value",
|
"searchId": "PLC01",
|
||||||
"state": 0,
|
"state": 0,
|
||||||
"state_string": "Normal"
|
"state_string": "Normal"
|
||||||
},
|
},
|
||||||
@ -31,14 +32,14 @@
|
|||||||
"fallbackDelay": 2.5,
|
"fallbackDelay": 2.5,
|
||||||
"mode": "indirect",
|
"mode": "indirect",
|
||||||
"references": {
|
"references": {
|
||||||
"0": "{view.params.tagProps[0]}",
|
"fc": "{session.custom.fc}",
|
||||||
"fc": "{session.custom.fc}"
|
"plc": "{view.custom.plc}"
|
||||||
},
|
},
|
||||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"expression": "!isGood({value})",
|
"expression": "if(isNull({value}), False, {value})",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -68,12 +69,12 @@
|
|||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"fallback": 0,
|
"fallback": 1,
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 0,
|
||||||
"output": 1
|
"output": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -91,12 +92,16 @@
|
|||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"fallback": "No active alarms",
|
"fallback": "Unknown",
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 1,
|
||||||
"output": "High"
|
"output": "High"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "No active alarms"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -131,6 +136,22 @@
|
|||||||
{
|
{
|
||||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fallback": null,
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "tag"
|
"type": "tag"
|
||||||
@ -140,7 +161,7 @@
|
|||||||
"custom.state_string": {
|
"custom.state_string": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
},
|
},
|
||||||
@ -176,15 +197,61 @@
|
|||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"propConfig": {
|
"propConfig": {
|
||||||
"props.elements[0].stroke.paint": {
|
"props.elements[0].visibility": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#00D900\", \"#FF0000\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props.elements[0].visibility": {
|
"props.elements[1].visibility": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.elements[2].stroke.paint": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "#800000",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": "#FF0000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "#000000"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "color",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.elements[2].visibility": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)"
|
"expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)"
|
||||||
@ -195,6 +262,30 @@
|
|||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
"elements": [
|
"elements": [
|
||||||
|
{
|
||||||
|
"d": "m -0.38931298,0.28431365 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
||||||
|
"fill": {
|
||||||
|
"paint": "#FFFFFF"
|
||||||
|
},
|
||||||
|
"name": "path",
|
||||||
|
"stroke": {
|
||||||
|
"paint": "#000000",
|
||||||
|
"width": 1
|
||||||
|
},
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"d": "m -0.38931298,10.850587 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
||||||
|
"fill": {
|
||||||
|
"paint": "#FFFFFF"
|
||||||
|
},
|
||||||
|
"name": "path",
|
||||||
|
"stroke": {
|
||||||
|
"paint": "#000000",
|
||||||
|
"width": 1
|
||||||
|
},
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"d": "m -0.38931298,5.5674501 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
"d": "m -0.38931298,5.5674501 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
||||||
"fill": {
|
"fill": {
|
||||||
@ -253,6 +344,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"propConfig": {
|
"propConfig": {
|
||||||
|
"meta.tooltip.style.backgroundColor": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
"meta.tooltip.style.classes": {
|
"meta.tooltip.style.classes": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
@ -275,10 +380,24 @@
|
|||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"meta.tooltip.style.color": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
"meta.tooltip.text": {
|
"meta.tooltip.text": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
@ -290,6 +409,32 @@
|
|||||||
},
|
},
|
||||||
"type": "property"
|
"type": "property"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"props.style.classes": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.disconnected"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "Disconnects/Device-Connected",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": true,
|
||||||
|
"output": "Disconnects/Device-Disconnected"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": false,
|
||||||
|
"output": "Disconnects/Device-Connected"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "style-list",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user