322 lines
8.1 KiB
Plaintext
322 lines
8.1 KiB
Plaintext
{
|
|
"custom": {
|
|
"beacon": false,
|
|
"flashingColor": "#808080",
|
|
"solidColor": "#FF8C00",
|
|
"state": "Offline"
|
|
},
|
|
"params": {
|
|
"demoColor": false,
|
|
"tagProps": [
|
|
"System/MCM02/Beacon/PS3_12_BCN1_A",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value"
|
|
]
|
|
},
|
|
"propConfig": {
|
|
"custom.beacon": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"0": "{view.params.tagProps[0]}",
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Beacon"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value},{view.params.demoColor})",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.flashingColor": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.beacon"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\t\n\tif value \u003d\u003d 0:\n\t\treturn \"#808080\" # Normal OFF\n\t\n\treturn self.custom.solidColor # Normal ON\n",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.solidColor": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.params.tagProps[0]}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value}, \"S\")\r\n",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"code": "\treturn value[-1]",
|
|
"type": "script"
|
|
},
|
|
{
|
|
"fallback": "#808080",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": "R",
|
|
"output": "#FF0000"
|
|
},
|
|
{
|
|
"input": "G",
|
|
"output": "#47FF47"
|
|
},
|
|
{
|
|
"input": "B",
|
|
"output": "#0000FF"
|
|
},
|
|
{
|
|
"input": "A",
|
|
"output": "#FF8C00"
|
|
},
|
|
{
|
|
"input": "H",
|
|
"output": "#FFFFFF"
|
|
}
|
|
],
|
|
"outputType": "color",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
},
|
|
"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)",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"fallback": "Offline",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": 0,
|
|
"output": "OFF"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "CLEARED / RESET REQUIRED"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "ACTIVE"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.demoColor": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagProps": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 20,
|
|
"width": 20
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "BCN"
|
|
},
|
|
"position": {
|
|
"height": 1,
|
|
"width": 1
|
|
},
|
|
"propConfig": {
|
|
"props.elements[0].fill.paint": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.flashingColor"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.elements[1].text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.tagProps[0]"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn value[-1]",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"paint": "#000"
|
|
},
|
|
"fontSize": "29.5834px",
|
|
"id": "beaconLabel",
|
|
"name": "beaconLabel",
|
|
"stroke": {
|
|
"width": "1.64352"
|
|
},
|
|
"style": {
|
|
"classes": "",
|
|
"fontSize": "30px",
|
|
"textAnchor": "middle"
|
|
},
|
|
"type": "text",
|
|
"x": 26.11241,
|
|
"y": 35.09856
|
|
}
|
|
],
|
|
"viewBox": "0 0 50 50"
|
|
},
|
|
"type": "ia.shapes.svg"
|
|
}
|
|
],
|
|
"events": {
|
|
"dom": {
|
|
"onClick": {
|
|
"config": {
|
|
"script": "\t#create tags lists for the device\n\tsystem.perspective.closeDock(\"Docked-East-Conv\")\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\":\"\"} )"
|
|
},
|
|
"preventDefault": true,
|
|
"scope": "G",
|
|
"stopPropagation": true,
|
|
"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_beacons"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"mode": "percent",
|
|
"style": {
|
|
"cursor": "pointer",
|
|
"overflow": "visible",
|
|
"userSelect": "None"
|
|
}
|
|
},
|
|
"type": "ia.container.coord"
|
|
}
|
|
} |