BNA8/.resources/ad40ff5e990d1f515fe802bc49cc6205a85a9fa91b78861696d0ad5bfa75cdae

1026 lines
27 KiB
Plaintext

{
"custom": {
"largeView": false
},
"params": {
"params": {}
},
"propConfig": {
"custom.largeView": {
"binding": {
"config": {
"expression": "{page.props.dimensions.viewport.width} \u003e 800"
},
"type": "expr"
},
"persistent": true
},
"params.params": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 58
}
},
"root": {
"children": [
{
"children": [
{
"events": {
"dom": {
"onDoubleClick": {
"config": {
"page": "/Monitron"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Icon"
},
"position": {
"basis": "30px"
},
"props": {
"color": "#FFFFFF",
"path": "material/vibration",
"style": {
"classes": ""
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "41px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[IEC_SCADA_TAG_PROVIDER]Monitron/monitron_data"
},
"transforms": [
{
"code": "\treturn value.getRowCount()",
"type": "script"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"color": "#FFFFFF",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"basis": "80px",
"display": false
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"dom": {
"onDoubleClick": {
"config": {
"page": "/Oil"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Icon"
},
"position": {
"basis": "30px"
},
"props": {
"color": "#FFFFFF",
"path": "material/opacity",
"style": {
"classes": ""
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "41px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[IEC_SCADA_TAG_PROVIDER]Oil/oil_condition_monitoring"
},
"transforms": [
{
"code": "\treturn value.getRowCount()",
"type": "script"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"color": "#FFFFFF",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_1"
},
"position": {
"basis": "80px",
"display": false
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Image"
},
"position": {
"basis": "120px"
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.largeView"
},
"type": "property"
}
}
},
"props": {
"fit": {
"height": 30,
"mode": "fill"
},
"source": "/system/images/Builtin/amazon_rme_logo.png"
},
"type": "ia.display.image"
},
{
"meta": {
"hasDelegate": true,
"name": "Spacer Start"
},
"position": {
"basis": "16px",
"shrink": 0
},
"props": {
"text": " "
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"id": "Docked-West",
"type": "toggle"
},
"scope": "C",
"type": "dock"
}
}
},
"meta": {
"name": "Menu Dock"
},
"position": {
"basis": "24px",
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "!{view.custom.largeView}"
},
"type": "expr"
}
}
},
"props": {
"color": "#FFFFFF",
"path": "material/menu",
"style": {
"classes": "Header/Icon",
"marginRight": "10px"
}
},
"type": "ia.display.icon"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Back",
"tooltip": {
"enabled": true,
"text": "Go back to DEX"
}
},
"position": {
"basis": "24px",
"shrink": 0
},
"props": {
"color": "#FFFFFF",
"path": "material/arrow_back",
"style": {
"classes": "Header/Icon",
"cursor": "pointer",
"marginRight": "10px"
}
},
"type": "ia.display.icon"
},
{
"children": [
{
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "550px",
"grow": 1
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "300px",
"shrink": 0
},
"propConfig": {
"custom.area": {
"binding": {
"config": {
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"Area\"),\"\"))"
},
"type": "expr"
}
},
"custom.lookup_path": {
"binding": {
"config": {
"expression": "try(if({this.custom.path}[1,0]\u003d\"DetailedView\", {this.custom.path}[2,0],\r\n\"\"), \"\")\r\n"
},
"type": "expr"
}
},
"custom.path": {
"binding": {
"config": {
"path": "page.props.path"
},
"transforms": [
{
"expression": "split({value},\"/\")",
"type": "expression"
}
],
"type": "property"
}
},
"custom.path_to_display": {
"binding": {
"config": {
"expression": "if(len({this.custom.lookup_path})\u003c1, \"\",\r\nif(len({this.custom.area}) \u003c1, {this.custom.lookup_path},\r\nif(len({this.custom.sub_area}) \u003e 0, concat({this.custom.lookup_path} + \" / \" + {this.custom.area} + \" / \" + {this.custom.sub_area}),\r\nconcat({this.custom.lookup_path} + \" / \" + {this.custom.area}))))"
},
"type": "expr"
}
},
"custom.plc_dict": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
},
"transforms": [
{
"expression": "jsonGet({value},{this.custom.lookup_path})",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.sub_area": {
"binding": {
"config": {
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"SubArea\"), \"\"))"
},
"type": "expr"
}
},
"position.display": {
"binding": {
"config": {
"expression": "{view.params.size} \u003d \"large\""
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "this.custom.path_to_display"
},
"type": "property"
}
}
},
"props": {
"style": {
"color": "#FFFFFF",
"fontFamily": "Arial",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "FlexContainer_0"
},
"position": {
"basis": "150px",
"grow": 1
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Area"
},
"position": {
"basis": "200px",
"grow": 1
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Icon_1",
"tooltip": {
"enabled": true
}
},
"position": {
"basis": "30px"
},
"propConfig": {
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "{[System]Gateway/Database/MariaDB/Available}"
},
"transforms": [
{
"fallback": "Database Connection Status: LOST",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "Database Connection Status: GOOD"
},
{
"input": false,
"output": "Database Connection Status: LOST"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "expr"
}
},
"props.color": {
"binding": {
"config": {
"expression": "{[System]Gateway/Database/MariaDB/Available}"
},
"transforms": [
{
"fallback": "#FF0000",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "#47FF47"
},
{
"input": false,
"output": "#FF0000"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "expr"
},
"onChange": {
"enabled": null,
"script": " db_tag_path \u003d \"[System]Gateway/Database/MariaDB/Available\"\n\t\n if not (system.tag.readBlocking([db_tag_path])[0].value):\n \tsystem.perspective.openPopup(\"errorPopup\",\u0027PopUp-Views/DatabaseError\u0027, title\u003d\"Database Error\")\n\t"
},
"persistent": true
}
},
"props": {
"color": "#47FF47",
"path": "material/table_chart"
},
"type": "ia.display.icon"
},
{
"meta": {
"hasDelegate": true,
"name": "Spacer End_3"
},
"position": {
"basis": "20px",
"shrink": 0
},
"props": {
"text": " "
},
"type": "ia.display.label"
},
{
"custom": {
"buttonid": "HeaderLegendIcon"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"draggable": false,
"id": "TZyBcXB7",
"modal": true,
"overlayDismiss": true,
"resizable": false,
"showCloseIcon": false,
"type": "open",
"viewPath": "PopUp-Views/Legend_Popup/Legend-popup-view",
"viewportBound": true
},
"scope": "C",
"type": "popup"
},
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
}
]
}
},
"meta": {
"name": "Icon",
"tooltip": {
"delay": 250,
"enabled": true,
"sustain": 1000,
"text": "Legend"
}
},
"position": {
"basis": "35px"
},
"props": {
"color": "#FFFFFF",
"path": "material/legend_toggle",
"style": {
"classes": "",
"marginRight": 20
}
},
"type": "ia.display.icon"
},
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.navigate(page \u003d \"/Real-Time\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Icon"
},
"position": {
"basis": "30px"
},
"propConfig": {
"props.color": {
"binding": {
"config": {
"path": "../Label.props.text"
},
"transforms": [
{
"code": "\t\n\treturn \"red\" if value \u003e 0 else \"#fff\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"path": "material/notifications_active",
"style": {
"classes": ""
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "41px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"polling": {
"enabled": true,
"rate": "3"
},
"queryPath": "GetActiveAlarmsByLocationAndPriority",
"returnFormat": "json"
},
"transforms": [
{
"code": "\ttotal \u003d sum(row[\"Count\"] for row in value if \"Count\" in row and row[\"Count\"] is not None)\n\treturn total",
"type": "script"
}
],
"type": "query"
}
}
},
"props": {
"style": {
"color": "#FFFFFF",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer",
"tooltip": {
"enabled": true
}
},
"position": {
"basis": "80px"
},
"propConfig": {
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "{./Label.props.text} + \" active alarms in the system\""
},
"type": "expr"
}
}
},
"props": {
"justify": "flex-end",
"style": {
"cursor": "pointer"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"hasDelegate": true,
"name": "Spacer End_2"
},
"position": {
"basis": "20px",
"shrink": 0
},
"props": {
"text": " "
},
"type": "ia.display.label"
},
{
"custom": {
"covert": true
},
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tdevice_list \u003d tags.tag_utilities.get_devices(self.session.custom.fc)\n\ttags.tag_utilities.reset_disconnect_tags(self.session.custom.fc, device_list)\n\tAWS.wbsckt_abort.close_websckt()"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Icon_2",
"tooltip": {
"enabled": true
}
},
"position": {
"basis": "30px"
},
"propConfig": {
"custom.heartbeat_received": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_heartbeat_interval"
},
"transforms": [
{
"expression": "if(secondsBetween(todate({value}),todate(now())) \u003e 70, False, True)",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.wbsckt_running": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_running"
},
"transforms": [
{
"expression": "if({value} \u003d True \u0026\u0026 ({this.custom.heartbeat_received} \u003d True) , True, False)",
"type": "expression"
}
],
"type": "tag"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"path": "this.custom.wbsckt_running"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "websocket running"
},
{
"input": false,
"output": "websocket disconnected"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.color": {
"binding": {
"config": {
"path": "this.custom.wbsckt_running"
},
"transforms": [
{
"fallback": "#000000",
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": "#FF4747"
},
{
"input": true,
"output": "#FFFFFF"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"path": "material/location_city",
"style": {
"cursor": "pointer"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.basis": {
"binding": {
"config": {
"expression": "len({this.props.text}) * 11 + \"px\""
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "Configuration/FC"
},
"type": "tag"
}
}
},
"props": {
"icon": "material/building",
"style": {
"borderWidth": "0.25px",
"color": "#FFFFFF",
"textAlign": "",
"textIndent": 10
},
"textStyle": {
"lineBreak": "auto"
}
},
"type": "ia.display.label"
},
{
"meta": {
"hasDelegate": true,
"name": "Spacer End"
},
"position": {
"basis": "20px",
"shrink": 0
},
"props": {
"text": " "
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"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": "User"
},
"position": {
"basis": "30px",
"shrink": 0
},
"props": {
"path": "material/person",
"style": {
"classes": "Header/Icon",
"color": "#FFFFFF"
}
},
"type": "ia.display.icon"
},
{
"events": {
"dom": {
"onClick": {
"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": {
"hasDelegate": true,
"name": "Sign In"
},
"position": {
"basis": "50px",
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.params.size} !\u003d \"small\""
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "session.props.auth.user.userName"
},
"transforms": [
{
"code": "\tif len(value) \u003d\u003d 0 or value \u003d\u003d \"null\":\n\t return \"Sign In\"\n\telse:\n\t return value.split(\"@\")[0]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Header/Icon",
"color": "#FFFFFF",
"cursor": "pointer",
"marginLeft": "4px"
}
},
"type": "ia.display.label"
},
{
"meta": {
"hasDelegate": true,
"name": "Spacer End_0"
},
"position": {
"basis": "20px",
"shrink": 0
},
"props": {
"text": " "
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.closeSession()"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Exit",
"tooltip": {
"enabled": true,
"location": "bottom-left",
"style": {
"fontFamily": "Arial",
"fontSize": 12
},
"tail": false,
"text": "Exit Application"
}
},
"position": {
"basis": "30px",
"shrink": 0
},
"props": {
"path": "material/exit_to_app",
"style": {
"classes": "Header/Icon",
"color": "#FFFFFF",
"cursor": "pointer"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"hasDelegate": true,
"name": "Spacer End_1"
},
"position": {
"basis": "16px",
"shrink": 0
},
"props": {
"text": " "
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"justify": "flex-end",
"style": {
"background": "rgb(43,43,43)"
}
},
"type": "ia.container.flex"
}
}