347 lines
8.6 KiB
Plaintext
347 lines
8.6 KiB
Plaintext
{
|
|
"custom": {
|
|
"color": "#000000",
|
|
"priority": "value",
|
|
"state": "Offline"
|
|
},
|
|
"params": {
|
|
"demoColor": -1,
|
|
"tagProps": [
|
|
"System/MCM02/PS/NCS1_1_PS1",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value"
|
|
]
|
|
},
|
|
"propConfig": {
|
|
"custom.color": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"0": "{view.params.tagProps[0]}",
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "if(\r\n {view.params.demoColor} \u003e\u003d 0,\r\n {view.params.demoColor},\r\n coalesce({value}, -1)\r\n)\r\n",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"fallback": "#000000",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": 0,
|
|
"output": "#C2C2C2"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "#FF0000"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "#FFA500"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "#0008FF"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "#00FF00"
|
|
},
|
|
{
|
|
"input": 5,
|
|
"output": "#FFF700"
|
|
},
|
|
{
|
|
"input": 6,
|
|
"output": "#87CEEB"
|
|
},
|
|
{
|
|
"input": 7,
|
|
"output": "#90EE90"
|
|
},
|
|
{
|
|
"input": 8,
|
|
"output": "#964B00"
|
|
},
|
|
{
|
|
"input": 9,
|
|
"output": "#FFFFFF"
|
|
},
|
|
{
|
|
"input": 10,
|
|
"output": "#000000"
|
|
},
|
|
{
|
|
"input": 11,
|
|
"output": "#8B0000"
|
|
},
|
|
{
|
|
"input": 12,
|
|
"output": "#808080"
|
|
},
|
|
{
|
|
"input": 13,
|
|
"output": "#8B8000"
|
|
},
|
|
{
|
|
"input": 14,
|
|
"output": "#006400"
|
|
},
|
|
{
|
|
"input": 15,
|
|
"output": "#FFFFC5"
|
|
},
|
|
{
|
|
"input": 16,
|
|
"output": "#00008B"
|
|
},
|
|
{
|
|
"input": 17,
|
|
"output": "#FF7276"
|
|
},
|
|
{
|
|
"input": 18,
|
|
"output": "#556B2F"
|
|
},
|
|
{
|
|
"input": 19,
|
|
"output": "#B43434"
|
|
},
|
|
{
|
|
"input": 20,
|
|
"output": "#4682B4"
|
|
},
|
|
{
|
|
"input": 21,
|
|
"output": "#FFD700"
|
|
}
|
|
],
|
|
"outputType": "color",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.deviceName": {
|
|
"persistent": true
|
|
},
|
|
"custom.priority": {
|
|
"persistent": true
|
|
},
|
|
"custom.state": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"0": "{view.params.tagProps[0]}",
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": " coalesce({value}, -1)\r\n",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"fallback": "Offline",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": true,
|
|
"output": "INACTIVE"
|
|
},
|
|
{
|
|
"input": false,
|
|
"output": "ACTUATED"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.demoColor": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagProps": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 25,
|
|
"width": 30
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "PS"
|
|
},
|
|
"position": {
|
|
"height": 1,
|
|
"width": 1
|
|
},
|
|
"propConfig": {
|
|
"props.elements[0].fill.paint": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.color"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.elements[1].fill.paint": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if ({view.custom.color} \u003d \"#000000\", \"#fff\", \"#000\")"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"elements": [
|
|
{
|
|
"fill": {},
|
|
"height": 47.417244,
|
|
"id": "beaconSquare",
|
|
"name": "beaconSquare",
|
|
"stroke": {
|
|
"paint": "#000000",
|
|
"width": "2.36887"
|
|
},
|
|
"type": "rect",
|
|
"width": "47.337795",
|
|
"x": "1.450278",
|
|
"y": "1.3708278"
|
|
},
|
|
{
|
|
"fill": {},
|
|
"id": "beaconLabel",
|
|
"name": "beaconLabel",
|
|
"stroke": {
|
|
"width": 1
|
|
},
|
|
"style": {
|
|
"classes": "",
|
|
"fontSize": "25px",
|
|
"textAnchor": "middle"
|
|
},
|
|
"text": "PS",
|
|
"type": "text",
|
|
"x": 25,
|
|
"y": 33
|
|
}
|
|
],
|
|
"preserveAspectRatio": "none",
|
|
"viewBox": "0 0 50 50"
|
|
},
|
|
"type": "ia.shapes.svg"
|
|
}
|
|
],
|
|
"events": {
|
|
"dom": {
|
|
"onClick": {
|
|
"config": {
|
|
"script": "\t#create tags lists for the device\n\tprops \u003d self.view.params.tagProps\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, props[0])\n\tsystem.perspective.openDock(\u0027Docked-East-Device\u0027,params\u003d{\u0027tagProps\u0027:props, \"tags\":tags_table_dataset, \"name\":self.view.custom.deviceName} )"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
},
|
|
"onMouseEnter": {
|
|
"config": {
|
|
"draggable": false,
|
|
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
|
"modal": false,
|
|
"overlayDismiss": false,
|
|
"position": {
|
|
"relativeLocation": "top-right"
|
|
},
|
|
"positionType": "relative",
|
|
"resizable": false,
|
|
"showCloseIcon": false,
|
|
"type": "open",
|
|
"viewParams": {
|
|
"text": "{/root.meta.tooltip.text}"
|
|
},
|
|
"viewPath": "autStand/Custom_Views/Tooltip",
|
|
"viewportBound": false
|
|
},
|
|
"scope": "C",
|
|
"type": "popup"
|
|
},
|
|
"onMouseLeave": {
|
|
"config": {
|
|
"draggable": true,
|
|
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
|
"modal": false,
|
|
"overlayDismiss": false,
|
|
"resizable": true,
|
|
"showCloseIcon": true,
|
|
"type": "close",
|
|
"viewPath": "autStand/Custom_Views/Tooltip",
|
|
"viewportBound": false
|
|
},
|
|
"scope": "C",
|
|
"type": "popup"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "root",
|
|
"tooltip": {
|
|
"enabled": true
|
|
}
|
|
},
|
|
"propConfig": {
|
|
"meta.tooltip.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if(\n {view.custom.state} !\u003d \"Offline\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"meta.visible": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "session.custom.alarm_filter.show_px"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"mode": "percent",
|
|
"style": {
|
|
"cursor": "pointer",
|
|
"userSelect": "None"
|
|
}
|
|
},
|
|
"type": "ia.container.coord"
|
|
}
|
|
} |