SAT9/.resources/1d605d59c2da1fc23b9c53af4d1d05b9a2ced4787b5dce8d53af650b4ddd92eb
2025-04-18 19:44:27 +04:00

198 lines
5.4 KiB
Plaintext

{
"custom": {
"activityLogger": {
"alt_pageid": "card_view",
"start_time": {
"$": [
"ts",
192,
1710802671820
],
"$ts": 1710802671820
}
}
},
"events": {
"system": {
"onShutdown": {
"config": {
"script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)"
},
"scope": "G",
"type": "script"
},
"onStartup": {
"config": {
"script": "\tself.custom.activityLogger.start_time \u003d system.date.now()"
},
"scope": "G",
"type": "script"
}
}
},
"params": {
"page_name": "Home"
},
"propConfig": {
"custom.activityLogger": {
"persistent": true
},
"custom.activityLogger.pageid": {
"binding": {
"config": {
"expression": "{page.props.path}"
},
"transforms": [
{
"code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()",
"type": "script"
}
],
"type": "expr"
}
},
"params.page_name": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"basis": "1080px"
},
"props": {
"alignContent": "flex-start",
"alignItems": "flex-start",
"elementPosition": {
"grow": 0,
"shrink": 0
},
"path": "Symbol-Views/Controller-Views/ControllerStatus",
"style": {
"overflow": "visible"
},
"wrap": "wrap"
},
"type": "ia.display.flex-repeater"
}
],
"custom": {
"Devices": [
"ARSAW1301",
"PLC03",
"ARSAW1302",
"PLC01",
"PLC02",
"PLC98",
"ARSAW1305",
"ARSAW1503",
"PLC08",
"PLC99",
"ARSAW1306",
"ARSAW1504",
"ARSAW1501",
"ARSAW1303",
"PLC06",
"PLC07",
"ARSAW1304",
"ARSAW1502",
"ARSAW1309",
"ARSAW1507",
"ARSAW1508",
"PLC09",
"ARSAW1307",
"ARSAW1505",
"ARSAW1308",
"ARSAW1506",
"PLC20",
"ARSAW1509",
"PLC14",
"PLC80",
"PLC81",
"PLC82",
"PLC16",
"FSC10",
"PLC21",
"PLC22",
"PLC69",
"PLC25",
"PLC26",
"PLC23",
"PLC24",
"PLC97",
"PLC27",
"PLC61",
"PLC60",
"PLC1000",
"PLC13",
"ARSAW1312",
"ARSAW1510",
"ARSAW1511",
"ARSAW1310",
"ARSAW1311",
"ARSAW1512",
"PLC70",
"PLC71",
"PLC32",
"PLC30",
"PLC31",
"PLC15"
],
"count": "value",
"delay": 2000,
"run_update": true
},
"events": {
"system": {
"onStartup": [
{
"config": {
"script": "\tVisualisation.home_page.create_home_page(self)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)"
},
"scope": "G",
"type": "script"
}
]
}
},
"meta": {
"name": "root"
},
"propConfig": {
"custom.update": {
"binding": {
"config": {
"expression": "now({this.custom.delay})"
},
"type": "expr"
},
"onChange": {
"enabled": null,
"script": "\n if (self.session.custom.fc \u003d\u003d \u0027\u0027) or (self.session.custom.fc is None):\n \tself.getChild(\"FlexRepeater\").props.instances \u003d []\n \treturn\n \n if self.custom.run_update:\n \tVisualisation.home_page.update_home_status(self)\n# system_tags \u003d system.tag.readBlocking([\"Configuration/FC\", \"System/ActiveAlarms\"])\n# tag_provider \u003d \"[%s_SCADA_TAG_PROVIDER]\" % (system_tags[0].value)\n# status_decoded \u003d system.util.jsonDecode(self.session.custom.id_to_state)\n# if status_decoded:\n#\t values \u003d []\n#\t devices \u003d self.custom.Devices\n#\t for i in devices:\n#\t \tvalue \u003d status_decoded.get(i)\n#\t \tif value \u003d\u003d None:\n#\t \t\tvalues.append(5)\n#\t \telse:\n#\t \t\tvalues.append(value)\n#\t zipped_list \u003d zip(values, devices)\n#\t devices_sorted \u003d [y for x,y in sorted(zipped_list)]\n#\t for i,j in enumerate(devices_sorted):\n#\t try:\n#\t \tself.getChild(\"FlexRepeater\").props.instances[i].tagProps[0] \u003d j\n#\t except:\n#\t \tsystem.perspective.print(i)"
}
}
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}