SS PB
This commit is contained in:
parent
d1b8f811fc
commit
90951c338d
@ -1,28 +1,19 @@
|
|||||||
{
|
{
|
||||||
"custom": {
|
"custom": {
|
||||||
"activated": false,
|
|
||||||
"alarm_message": null,
|
"alarm_message": null,
|
||||||
"covert_mode": true,
|
"disconnected": true,
|
||||||
"disconnected": false,
|
"plc": "SS_PB1",
|
||||||
"display_icon": true,
|
"priority": 5,
|
||||||
"error": false,
|
"priority_string": "Unknown",
|
||||||
"isMatch": 0,
|
|
||||||
"plc": "value",
|
|
||||||
"priority": 0,
|
|
||||||
"priority_string": "No active alarms",
|
|
||||||
"searchId": "PLC01",
|
"searchId": "PLC01",
|
||||||
"show_error": false,
|
"state": 0,
|
||||||
"show_status": true,
|
"state_string": "Stopped"
|
||||||
"state": 5,
|
|
||||||
"status": 0,
|
|
||||||
"status_string": "Unknown",
|
|
||||||
"visible_status": false
|
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"forceFaultStatus": null,
|
"forceFaultStatus": null,
|
||||||
"forceStatus": null,
|
"forceStatus": null,
|
||||||
"tagProps": [
|
"tagProps": [
|
||||||
"value",
|
"SS_PB1",
|
||||||
"value",
|
"value",
|
||||||
"value",
|
"value",
|
||||||
"value",
|
"value",
|
||||||
@ -35,47 +26,23 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"propConfig": {
|
"propConfig": {
|
||||||
"custom.activated": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"expression": "{view.custom.status} \u003d 1 || {view.custom.status} \u003d 2"
|
|
||||||
},
|
|
||||||
"type": "expr"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.alarm_message": {
|
"custom.alarm_message": {
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"custom.covert_mode": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"path": "view.custom.state"
|
|
||||||
},
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.disconnected": {
|
"custom.disconnected": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"fallbackDelay": 2.5,
|
"fallbackDelay": 2.5,
|
||||||
"mode": "indirect",
|
"mode": "indirect",
|
||||||
"references": {
|
"references": {
|
||||||
"fc": "{session.custom.fc}",
|
"0": "{view.params.tagProps[0]}",
|
||||||
"plc": "{view.custom.plc}"
|
"fc": "{session.custom.fc}"
|
||||||
},
|
},
|
||||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"expression": "if(isNull({value}), False, {value})",
|
"expression": "!isGood({value})",
|
||||||
"type": "expression"
|
"type": "expression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -83,39 +50,6 @@
|
|||||||
},
|
},
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"custom.display_icon": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
|
||||||
},
|
|
||||||
"type": "expr"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.error": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"path": "view.custom.state"
|
|
||||||
},
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.isMatch": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
|
||||||
},
|
|
||||||
"type": "expr"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.plc": {
|
"custom.plc": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
@ -138,12 +72,16 @@
|
|||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
"fallback": 0,
|
"fallback": 5,
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 1,
|
||||||
"output": 4
|
"output": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 2,
|
||||||
|
"output": 5
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -172,47 +110,16 @@
|
|||||||
},
|
},
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"custom.show_error": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"path": "view.custom.state"
|
|
||||||
},
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.show_status": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"path": "view.custom.state"
|
|
||||||
},
|
|
||||||
"enabled": false,
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.state": {
|
"custom.state": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"fallbackDelay": 2.5,
|
"fallbackDelay": 1,
|
||||||
"mode": "indirect",
|
"mode": "indirect",
|
||||||
"references": {
|
"references": {
|
||||||
"0": "{view.params.tagProps[0]}",
|
"0": "{view.params.tagProps[0]}",
|
||||||
"fc": "{session.custom.fc}"
|
"fc": "{session.custom.fc}"
|
||||||
},
|
},
|
||||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
@ -220,16 +127,16 @@
|
|||||||
"type": "expression"
|
"type": "expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fallback": null,
|
"fallback": 0,
|
||||||
"inputType": "scalar",
|
"inputType": "scalar",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 3,
|
"input": 1,
|
||||||
"output": 3
|
"output": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": 0,
|
"input": 2,
|
||||||
"output": 5
|
"output": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -240,40 +147,10 @@
|
|||||||
},
|
},
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"custom.status": {
|
"custom.state_string": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"fallbackDelay": 2.5,
|
"expression": "case({view.custom.state},\r\n1, \"Started\",\r\n0, \"Stopped\",\r\n2, \"Disabled\",\r\n\"Unknown\")"
|
||||||
"mode": "indirect",
|
|
||||||
"references": {
|
|
||||||
"0": "{view.params.tagProps[0]}",
|
|
||||||
"fc": "{session.custom.fc}"
|
|
||||||
},
|
|
||||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
|
||||||
},
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "coalesce({value},{view.params.forceStatus},0)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "tag"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.status_string": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"expression": "case({view.custom.status},\r\n1, \"Started\",\r\n2, \"Stopped\",\r\n3, \"Disabled\",\r\n\"Unknown\")"
|
|
||||||
},
|
|
||||||
"type": "expr"
|
|
||||||
},
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"custom.visible_status": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"expression": "{view.custom.state} !\u003d 5"
|
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
},
|
},
|
||||||
@ -312,21 +189,15 @@
|
|||||||
"props.elements[0].fill.paint": {
|
"props.elements[0].fill.paint": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"expression": "\u0027#AAAAAA\u0027"
|
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#4F4F4F\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3,\r\n \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\",\r\n \"#FFFF00\"\r\n )\r\n)"
|
||||||
},
|
},
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props.elements[1].fill.paint": {
|
"props.elements[1].fill.paint": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"path": "view.custom.status"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
@ -338,15 +209,15 @@
|
|||||||
"output": "#00FF00"
|
"output": "#00FF00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": 3,
|
"input": 0,
|
||||||
"output": "#7E7E7E"
|
"output": "#00FF00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": 2,
|
"input": 2,
|
||||||
"output": "#007500"
|
"output": "#007400"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "color",
|
||||||
"type": "map"
|
"type": "map"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -356,7 +227,7 @@
|
|||||||
"props.elements[2].fill.paint": {
|
"props.elements[2].fill.paint": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"path": "view.custom.status"
|
"path": "view.custom.state"
|
||||||
},
|
},
|
||||||
"transforms": [
|
"transforms": [
|
||||||
{
|
{
|
||||||
@ -365,15 +236,15 @@
|
|||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"input": 2,
|
"input": 2,
|
||||||
"output": "#FF0003"
|
"output": "#940003"
|
||||||
},
|
|
||||||
{
|
|
||||||
"input": 3,
|
|
||||||
"output": "#7E7E7E"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": 1,
|
"input": 1,
|
||||||
"output": "#940003"
|
"output": "#940003"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "#940003"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputType": "scalar",
|
"outputType": "scalar",
|
||||||
@ -382,68 +253,6 @@
|
|||||||
],
|
],
|
||||||
"type": "property"
|
"type": "property"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"props.style.classes": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"props": {
|
"props": {
|
||||||
@ -482,7 +291,6 @@
|
|||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"style": {},
|
|
||||||
"viewBox": "0 0 40 20"
|
"viewBox": "0 0 40 20"
|
||||||
},
|
},
|
||||||
"type": "ia.shapes.svg"
|
"type": "ia.shapes.svg"
|
||||||
@ -492,7 +300,7 @@
|
|||||||
"dom": {
|
"dom": {
|
||||||
"onClick": {
|
"onClick": {
|
||||||
"config": {
|
"config": {
|
||||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
"script": "\tsystem.perspective.openDock(\u0027Docked-East-SS-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||||
},
|
},
|
||||||
"scope": "G",
|
"scope": "G",
|
||||||
"type": "script"
|
"type": "script"
|
||||||
@ -521,20 +329,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"propConfig": {
|
"propConfig": {
|
||||||
"meta.tooltip.style.backgroundColor": {
|
|
||||||
"binding": {
|
|
||||||
"config": {
|
|
||||||
"path": "view.custom.state"
|
|
||||||
},
|
|
||||||
"transforms": [
|
|
||||||
{
|
|
||||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"meta.tooltip.style.classes": {
|
"meta.tooltip.style.classes": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
@ -569,24 +363,10 @@
|
|||||||
"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#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
|
||||||
"type": "expression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "property"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"meta.tooltip.text": {
|
"meta.tooltip.text": {
|
||||||
"binding": {
|
"binding": {
|
||||||
"config": {
|
"config": {
|
||||||
"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\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
"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"
|
||||||
},
|
},
|
||||||
"type": "expr"
|
"type": "expr"
|
||||||
}
|
}
|
||||||
@ -598,32 +378,6 @@
|
|||||||
},
|
},
|
||||||
"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