BNA8/.resources/2bf93f0f35de268ff870a1c7ae0677d8cf1d2c0555cc2a30c7cbf20f4966f2af

273 lines
6.9 KiB
Plaintext

{
"custom": {
"color": "#AAAAAA",
"deviceName": "S03_CH101_PRX1",
"state": "INACTIVE"
},
"params": {
"demoColor": -1,
"tagProps": [
"System/MCM02/Chute/S03_CH101/PRX1",
"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}"
},
"transforms": [
{
"expression": "if(\r\n {view.params.demoColor} \u003e\u003d0,\r\n {view.params.demoColor},\r\n coalesce({value}, -1)\r\n)\r\n",
"type": "expression"
},
{
"fallback": "#000000",
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": "#47FF47"
},
{
"input": true,
"output": "#AAAAAA"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.deviceName": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"code": "\n\treturn value.split(\"/\")[-2] + \"_\" + value.split(\"/\")[-1] ",
"type": "script"
}
],
"type": "property"
},
"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}"
},
"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": "PX"
},
"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": {},
"fontSize": "20px",
"id": "beaconLabel",
"name": "beaconLabel",
"stroke": {
"width": 1
},
"text": "PRX",
"textAnchor": "middle",
"type": "text",
"x": 10,
"y": 30
}
],
"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"
}
}