296 lines
8.1 KiB
JSON

{
"custom": {
"activityLogger": {
"alt_pageid": "card_view",
"start_time": {
"$": [
"ts",
192,
1754319546004
],
"$ts": 1754319545822
}
}
},
"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
},
"instances": [
{
"Counts": {
"Diag": 0,
"High": 0,
"Low": 0,
"Medium": 0
},
"area": "Bulk Inbound",
"instancePosition": {},
"instanceStyle": {
"classes": "",
"margin": "5px"
},
"subarea": "",
"tagProps": [
"MCM05",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
{
"Counts": {
"Diag": 0,
"High": 0,
"Low": 0,
"Medium": 0
},
"area": "Fluid Inbound",
"instancePosition": {},
"instanceStyle": {
"classes": "",
"margin": "5px"
},
"subarea": "",
"tagProps": [
"MCM04",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
{
"Counts": {
"Diag": 0,
"High": 0,
"Low": 0,
"Medium": 0
},
"area": "Fluid Inbound",
"instancePosition": {},
"instanceStyle": {
"classes": "",
"margin": "5px"
},
"subarea": "",
"tagProps": [
"MCM03",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
{
"Counts": {
"Diag": 0,
"High": 0,
"Low": 0,
"Medium": 0
},
"area": "Sorter Destination and Chutes",
"instancePosition": {},
"instanceStyle": {
"classes": "",
"margin": "5px"
},
"subarea": "",
"tagProps": [
"MCM02",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
{
"Counts": {
"Diag": 0,
"High": 0,
"Low": 0,
"Medium": 0
},
"area": "Sorter Destination, Chutes and Bypass",
"instancePosition": {},
"instanceStyle": {
"classes": "",
"margin": "5px"
},
"subarea": "",
"tagProps": [
"MCM01",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
}
],
"path": "Symbol-Views/Controller-Views/ControllerStatus",
"style": {
"overflow": "visible"
},
"wrap": "wrap"
},
"type": "ia.display.flex-repeater"
}
],
"custom": {
"Devices": [
[
"MCM01",
"Bulk Inbound"
],
[
"MCM02",
"Fluid Inbound"
],
[
"MCM03",
"Fluid Inbound"
],
[
"MCM05",
"Sorter Destination and Chutes"
],
[
"MCM04",
"Sorter Destination, Chutes and Bypass"
]
],
"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"
}
}