Files
Stream_PHX_A7/Gateways/FE/projects/.resources/92de139e8d86c2123f2387605ca914ffe670255e652f81c19f349ecbd75e23aa

771 lines
22 KiB
Plaintext

{
"custom": {
"path": "/",
"test": 0
},
"params": {},
"propConfig": {
"custom.path": {
"binding": {
"config": {
"expression": "\u0027/\u0027"
},
"enabled": false,
"type": "expr"
},
"persistent": true
},
"custom.test": {
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 80,
"width": 1094
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tmenuOpen \u003d \u0027material/menu_open\u0027\n\tmenuClosed \u003d \u0027material/menu\u0027\n\t\n\tpath \u003d self.props.path\n\tif path \u003d\u003d menuOpen:\n\t\tself.props.path \u003d menuClosed\n\t\tsystem.perspective.closeDock(\u0027mainNav\u0027)\n\telse:\n\t\tself.props.path \u003d menuOpen\n\t\tsystem.perspective.openDock(\u0027mainNav\u0027)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "NavMenu"
},
"position": {
"basis": "28px",
"shrink": 0
},
"propConfig": {
"props.path": {
"binding": {
"config": {
"expression": "\u0027material/menu_open\u0027"
},
"type": "expr"
}
},
"props.style.width": {
"binding": {
"config": {
"path": "this.position.basis"
},
"type": "property"
}
}
},
"props": {
"color": "currentcolor",
"style": {
"cursor": "pointer",
"margin-left": "20px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"grow": 1
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"expression": "{view.custom.path}"
},
"transforms": [
{
"code": "\tinstances \u003d []\n\tpages \u003d self.view.custom.path.split(\"/\")[1:]\n\tfor i, label in enumerate(pages):\n\t\tif label !\u003d \"\":\n\t\t\tinstances.append({\n\t\t\t \"label\": label,\n\t\t\t \"showArrow\": True\n\t\t\t})\t\n\tif len(instances) \u003e 0:\n\t\tinstances[-1][\u0027showArrow\u0027] \u003d False\n\treturn instances",
"type": "script"
}
],
"type": "expr"
}
}
},
"props": {
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"path": "Library/Layouts/Docked/Breadcrumb",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
},
{
"custom": {
"gtwys": [
"[Ignition_Common_IO_Gtwy]",
"[Ignition_SATB1_IO1_default]",
"[Ignition_SATB1_IO2_default]",
"[Ignition_SATB1_IO3_default]"
],
"paths": [
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL01/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL03/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL04/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL05/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL06/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL07/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL08/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL09/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL10/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL11/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL12/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL13/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL14/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL15/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL18/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL22/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL24/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL60/Delta"
]
},
"meta": {
"name": "EmbeddedView"
},
"position": {
"display": false
},
"propConfig": {
"custom.paths": {
"binding": {
"config": {
"struct": {
"tagPaths": "{this.custom.gtwys}",
"time": "now(3000)"
},
"waitOnAll": false
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\tpaths \u003d value[\u0027tagPaths\u0027]\n\tfor path in paths:\n\t\ttags \u003d system.tag.browse(path,{\"typeId\":\"Objects/Network/PLC_Data v2\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\t\tfor item in tags:\n\t\t\ttag \u003d str(item[\"fullPath\"]) + \"/Delta\"\n\t\t\toutput.append(tag)\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"struct": {
"hb": "now(3000)\r",
"paths": "{this.custom.paths}"
},
"waitOnAll": true
},
"enabled": false,
"transforms": [
{
"code": "\tvalues \u003d system.tag.readBlocking(value[\u0027paths\u0027])\n\tfor item in values:\n\t\tif item.value \u003e 150:\n\t\t\treturn True\n\treturn False",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"path": "Library/Widgets/PLC Healt",
"style": {
"padding": "10px"
},
"useDefaultViewWidth": true
},
"type": "ia.display.view"
},
{
"events": {
"component": {
"onRowClick": {
"config": {
"script": "\tself.view.custom.test \u003d event.row"
},
"scope": "G",
"type": "script"
},
"onRowDoubleClick": {
"config": {
"params": {},
"view": "Pages/Alarms/Active Alarms"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Table"
},
"position": {
"basis": "650px",
"shrink": 0
},
"propConfig": {
"props.data": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[default]System/Top3Alarms"
},
"type": "tag"
}
}
},
"props": {
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "label",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": false,
"number": {
"condition": "",
"value": ""
},
"string": {
"condition": "",
"value": ""
},
"visible": "on-hover"
},
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "left",
"nullFormat": {
"includeNullStrings": false,
"nullFormatValue": "",
"strict": false
},
"number": "value",
"numberFormat": "0,0.##",
"progressBar": {
"bar": {
"color": "",
"style": {
"classes": ""
}
},
"max": 100,
"min": 0,
"track": {
"color": "",
"style": {
"classes": ""
}
},
"value": {
"enabled": true,
"format": "0,0.##",
"justify": "center",
"style": {
"classes": ""
}
}
},
"render": "auto",
"resizable": true,
"sort": "none",
"sortable": true,
"strictWidth": true,
"style": {
"classes": "",
"paddingLeft": 5
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 250
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "dispPath",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": false,
"number": {
"condition": "",
"value": ""
},
"string": {
"condition": "",
"value": ""
},
"visible": "on-hover"
},
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"nullFormat": {
"includeNullStrings": false,
"nullFormatValue": "",
"strict": false
},
"number": "value",
"numberFormat": "0,0.##",
"progressBar": {
"bar": {
"color": "",
"style": {
"classes": ""
}
},
"max": 100,
"min": 0,
"track": {
"color": "",
"style": {
"classes": ""
}
},
"value": {
"enabled": true,
"format": "0,0.##",
"justify": "center",
"style": {
"classes": ""
}
}
},
"render": "auto",
"resizable": true,
"sort": "none",
"sortable": true,
"strictWidth": false,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": ""
}
],
"enableHeader": false,
"pager": {
"bottom": false
},
"resizeMode": "fixed",
"rows": {
"height": 6,
"highlight": {
"enabled": false
},
"striped": {
"enabled": false
},
"style": {
"fontSize": 16
}
},
"style": {
"marginBottom": "5px",
"marginTop": "5px",
"minHeight": "40px"
}
},
"type": "ia.display.table"
},
{
"meta": {
"name": "Help"
},
"position": {
"basis": "28px",
"display": false,
"shrink": 0
},
"propConfig": {
"props.style.width": {
"binding": {
"config": {
"path": "this.position.basis"
},
"type": "property"
}
}
},
"props": {
"color": "currentcolor",
"path": "material/help_outline",
"style": {
"cursor": "pointer"
}
},
"type": "ia.display.icon"
},
{
"children": [
{
"events": {
"dom": {
"onClick": [
{
"config": {},
"enabled": false,
"scope": "C",
"type": "login"
},
{
"config": {
"script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()"
},
"scope": "G",
"type": "script"
}
]
}
},
"meta": {
"name": "Icon"
},
"position": {
"basis": "28px",
"shrink": 0
},
"propConfig": {
"props.style.width": {
"binding": {
"config": {
"path": "this.position.basis"
},
"type": "property"
}
}
},
"props": {
"color": "currentcolor",
"path": "material/account_circle",
"style": {
"cursor": "pointer"
}
},
"type": "ia.display.icon"
},
{
"events": {
"dom": {
"onClick": [
{
"config": {},
"enabled": false,
"scope": "C",
"type": "login"
},
{
"config": {
"script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()"
},
"scope": "G",
"type": "script"
}
]
}
},
"meta": {
"contextMenu": {
"enabled": true,
"items": [
{
"children": [],
"icon": {
"color": "",
"path": "",
"style": {}
},
"link": {
"target": "self",
"url": "/Admin/UserSettings"
},
"message": {
"payload": {},
"scope": "page",
"type": ""
},
"method": {
"name": "",
"params": {}
},
"style": {
"classes": ""
},
"text": "Edit Preferences",
"type": "link"
}
]
},
"name": "Label"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{session.props.auth.authenticated}"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"expression": "{session.props.auth.user.userName}"
},
"type": "expr"
}
}
},
"props": {
"style": {
"cursor": "pointer"
},
"textStyle": {
"fontWeight": "bold"
}
},
"type": "ia.display.label"
}
],
"meta": {
"contextMenu": {
"enabled": true
},
"name": "User"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"gap": "5px",
"margin-left": "auto",
"margin-right": "20px"
}
},
"type": "ia.container.flex"
}
],
"custom": {
"alarmCounts": [
0,
0,
0,
0,
0,
0
],
"totalCount": 0
},
"events": {
"system": {
"onStartup": {
"config": {
"name": "stream-light"
},
"scope": "C",
"type": "theme"
}
}
},
"meta": {
"name": "root"
},
"propConfig": {
"custom.alarmCounts[0]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_Common_IO_Gtwy]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[1]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO1_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[2]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO2_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[3]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO3_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[4]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO4_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[5]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO5_default]AlarmActiveCount"
},
"enabled": false,
"type": "tag"
}
},
"custom.totalCount": {
"binding": {
"config": {
"path": "this.custom.alarmCounts"
},
"enabled": false,
"transforms": [
{
"code": "\ttotal \u003d 0\n\tfor item in value:\n\t\ttotal +\u003d item\n\treturn total",
"type": "script"
}
],
"type": "property"
},
"onChange": {
"enabled": null,
"script": "\tif previousValue is not None and previousValue.value is not None:\n\t\t\n\t\tif currentValue.value \u003e previousValue.value:\n\t\t\tsound_component \u003d self.getChild(\"Audio\")\n\t\t\tsound_component.props.play \u003d False # Reset just in case\n\t\t\tsound_component.props.play \u003d True\n\t\t\t\n\t\t\t# Logger for debugging (check your Gateway or Browser logs)\n\t\t\tsystem.perspective.print(\"New Alarm Detected! Playing Sound.\")"
}
}
},
"props": {
"justify": "space-between",
"style": {
"backgroundColor": "#143663",
"color": "var(--navtree-color)",
"gap": "10px"
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "updateBreadcrumb",
"pageScope": true,
"script": "\tself.view.custom.path \u003d payload[\u0027target\u0027]",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "eqFaceplateMsg",
"pageScope": true,
"script": "\t# implement your handler here\n\tutils.nav.eqPopup(self, payload)",
"sessionScope": true,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}