{ "custom": { "beacon": 0, "flashingColor": "#808080", "solidColor": "#FF8C00", "state": "CLEARED / RESET REQUIRED" }, "params": { "demoColor": "", "tagProps": [ "System/MCM02/Beacon/S03_CH113_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},0)", "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 return \"#808080\" # OFF \u003d gray\n\telse:\n\t return self.custom.solidColor", "type": "script" } ], "type": "property" }, "persistent": true }, "custom.solidColor": { "binding": { "config": { "expression": "{view.params.tagProps[0]}" }, "transforms": [ { "expression": "if(\r\n {view.params.demoColor} !\u003d \"\",\r\n {view.params.demoColor},\r\n coalesce({value}, \"S\")\r\n)\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\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\":\"\"} )" }, "scope": "G", "type": "script" } } }, "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": { "attributes": "data-tooltip: Fan motor overload – click to open details", "classes": "tooltip", "cursor": "pointer", "userSelect": "None" } }, "type": "ia.container.coord" } }