1104 lines
31 KiB
Plaintext
1104 lines
31 KiB
Plaintext
{
|
|
"custom": {
|
|
"activityLogger": {
|
|
"alt_pageid": "Header",
|
|
"start_time": {
|
|
"$": [
|
|
"ts",
|
|
192,
|
|
1746010658533
|
|
],
|
|
"$ts": 1746010658516
|
|
}
|
|
}
|
|
},
|
|
"events": {
|
|
"system": {
|
|
"onShutdown": {
|
|
"config": {
|
|
"script": "\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": {
|
|
"params": {},
|
|
"size": "medium"
|
|
},
|
|
"propConfig": {
|
|
"custom.activityLogger": {
|
|
"persistent": true
|
|
},
|
|
"custom.activityLogger.pageid": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "page.props.path"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": " if value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n return self.custom.activityLogger.alt_pageid.lower()\n else:\n return value[1:].lower()\n\treturn value",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
},
|
|
"params.params": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.size": {
|
|
"paramDirection": "input"
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
{
|
|
"custom": {
|
|
"s3URI": "SCADA/rme-white-250.png"
|
|
},
|
|
"meta": {
|
|
"name": "Image"
|
|
},
|
|
"position": {
|
|
"basis": "120px"
|
|
},
|
|
"propConfig": {
|
|
"position.display": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.params.size} \u003d \"large\""
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.source": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "this.custom.s3URI"
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn AWS.s3.getPresignedURL(self, value)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"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.params.size} !\u003d \"large\""
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"color": "#FFFFFF",
|
|
"path": "material/menu",
|
|
"style": {
|
|
"classes": "Header/Icon",
|
|
"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": {
|
|
"hasDelegate": true,
|
|
"name": "Spacer 1"
|
|
},
|
|
"position": {
|
|
"basis": "20px"
|
|
},
|
|
"props": {
|
|
"text": " "
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"custom": {
|
|
"buttonid": "HeaderNotifyIcon",
|
|
"entries": [
|
|
{
|
|
"PrimaryKey": "2024-05-08 10:17:51",
|
|
"author": "pll",
|
|
"body": "Introducing our brand new Announcement Feature! 🎉 Stay in the loop with important updates, new features, planned downtime events, all in one place. Never miss out again! Check it out now and stay tuned for the latest updates. 🔊",
|
|
"childproj": "https://eu-preprod.scada2.rme.amazon.dev: MAN2",
|
|
"expire": "2024-05-09 05:00:00",
|
|
"link1": "https://",
|
|
"link1title": "",
|
|
"link2": "https://",
|
|
"link2title": "",
|
|
"priority": "Healthy",
|
|
"publish": "2024-05-08 10:08:33",
|
|
"title": "📢 Exciting News! 📢",
|
|
"whids": ""
|
|
}
|
|
],
|
|
"entryCount": 1,
|
|
"highestPriority": 5
|
|
},
|
|
"events": {
|
|
"dom": {
|
|
"onClick": [
|
|
{
|
|
"config": {
|
|
"draggable": true,
|
|
"id": "ioNP2CXn",
|
|
"modal": true,
|
|
"overlayDismiss": true,
|
|
"resizable": true,
|
|
"showCloseIcon": true,
|
|
"title": "Notifications",
|
|
"type": "open",
|
|
"viewParams": {
|
|
"entryCount": "{/root/Icon_0.custom.entryCount}",
|
|
"instances": "{/root/Icon_0.custom.entries}"
|
|
},
|
|
"viewPath": "PopUp-Views/Notify-Tool/Notify-Popup",
|
|
"viewportBound": false
|
|
},
|
|
"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_0",
|
|
"tooltip": {
|
|
"enabled": true,
|
|
"location": "bottom-right",
|
|
"style": {
|
|
"whiteSpace": "pre"
|
|
},
|
|
"text": "📢 Exciting News! 📢\n"
|
|
}
|
|
},
|
|
"position": {
|
|
"basis": "30px"
|
|
},
|
|
"propConfig": {
|
|
"custom.refreshMSG": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "now(600000)"
|
|
},
|
|
"type": "expr"
|
|
},
|
|
"onChange": {
|
|
"enabled": null,
|
|
"script": "\tsystem.perspective.sendMessage(\u0027refreshNotifyIcon\u0027)"
|
|
}
|
|
},
|
|
"position.display": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.EntriesList"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\tfrom datetime import datetime\n\t\n#\tRead entries from dynamo table\n\treturns \u003d notifyTool.ReadFromDynamo.DynamoReader()\n\tEntriesList \u003d returns[\u0027Items\u0027]\n\tEntriesList.reverse()\n#\treturn EntriesList\n\n#\tCreate empty list and now string\n\tpublishdates \u003d []\n\tnow \u003d datetime.now()\n\tnowstr \u003d str(now)[:19]\n\tactiveNotify \u003d False\n\twhid \u003d self.session.custom.fc\n\tstates \u003d {\u0027Healthy\u0027:5,\u0027Diagnostic\u0027:4, \u0027Low\u0027:3, \u0027Medium\u0027:2, \u0027High\u0027:1}\n#\tCheck EntriesList for active entries based on publish and expire times\n\tactiveEntries \u003d []\n\ttooltip \u003d []\n\tcount \u003d 0\n\thighestPriority \u003d 5\n\tfor e in EntriesList:\n\t\t\n\t\tif len(e[\u0027whids\u0027])\u003e0:\n\t\t\tif whid in e[\u0027whids\u0027]:\n\t\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\t\tactiveEntries.append(e)\n\t\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\t\tactiveNotify \u003d True\n\t\t\t\t\tcount +\u003d1\n\t\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\t\telse:\n\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\tactiveEntries.append(e)\n\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\tactiveNotify \u003d True\t\t\n\t\t\t\tcount +\u003d1\t\n\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\n\t\t\t\n\ttooltiptext \u003d \u0027\u0027\n\tfor i in tooltip:\n\t\ttooltiptext+\u003d i+\u0027\\n\u0027\n\tself.custom.entries \u003d activeEntries\n\tself.custom.highestPriority \u003d highestPriority\n\tself.custom.entryCount \u003d count\n\tself.meta.tooltip.text \u003d tooltiptext\t\n\n\n#\treturn returns\n#\treturn activeEntries\n\treturn activeNotify",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.color": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "this.custom.highestPriority"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"fallback": "state5",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": 1,
|
|
"output": "state1"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "state2"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "state3"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "state4"
|
|
},
|
|
{
|
|
"input": 5,
|
|
"output": "state5"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
},
|
|
{
|
|
"code": "\ttest \u003d self.session.custom.colours.colour_impaired\n\tstatecolor \u003d self.session.custom.colours[value]\n\treturn statecolor",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"path": "material/campaign",
|
|
"style": {
|
|
"marginLeft": 5,
|
|
"marginRight": 5
|
|
}
|
|
},
|
|
"scripts": {
|
|
"customMethods": [],
|
|
"extensionFunctions": null,
|
|
"messageHandlers": [
|
|
{
|
|
"messageType": "refreshNotifyIcon",
|
|
"pageScope": true,
|
|
"script": "\n\tself.refreshBinding(\u0027props.color\u0027)\n\tself.refreshBinding(\u0027position.display\u0027)",
|
|
"sessionScope": true,
|
|
"viewScope": false
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"props": {
|
|
"color": "#FFFFFF",
|
|
"path": "material/notifications_active",
|
|
"style": {
|
|
"classes": ""
|
|
}
|
|
},
|
|
"type": "ia.display.icon"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Label"
|
|
},
|
|
"position": {
|
|
"basis": "41px"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "direct",
|
|
"tagPath": "System/aws_data"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\tjson_decode \u003d system.util.jsonDecode(value)\n\treturn len(json_decode)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"color": "#FFFFFF",
|
|
"textAlign": "center"
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "FlexContainer"
|
|
},
|
|
"position": {
|
|
"basis": "80px"
|
|
},
|
|
"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": {
|
|
"basis": "50px"
|
|
},
|
|
"propConfig": {
|
|
"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
|
|
}
|
|
},
|
|
"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": {
|
|
"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"
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |