Updated Parent Project
This commit is contained in:
parent
a23c3dcaf8
commit
74005f7126
@ -34,6 +34,7 @@
|
||||
"viewPath": "Main-Views/OilMonitoring"
|
||||
},
|
||||
"/Real-Time": {
|
||||
"title": "",
|
||||
"viewPath": "Alarm-Views/RealTime"
|
||||
},
|
||||
"/Temperature": {
|
||||
@ -105,6 +106,118 @@
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-JR",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-VFD",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-VFD"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-SNP",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-DS",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-MCM",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-MCM"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-Extendo",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-BTN",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
"autoBreakpoint": 480,
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East-SS-BTN",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button"
|
||||
}
|
||||
],
|
||||
"top": [
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(88, 158, 249, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(88, 158, 249, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(88, 158, 249, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(245, 95, 89, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(245, 95, 89, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(245, 95, 89, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(255, 255, 0, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(255, 255, 0, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(255, 255, 0, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(247, 160, 96, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(247, 160, 96, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(247, 160, 96, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(255, 255, 0, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(255, 255, 0, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(255, 255, 0, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -6,9 +6,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747730947188
|
||||
1751966913728
|
||||
],
|
||||
"$ts": 1747730947187
|
||||
"$ts": 1751966913727
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -212,9 +212,6 @@
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"custom": {
|
||||
"s3URI": "SCADA/rme-white-250.png"
|
||||
},
|
||||
"meta": {
|
||||
"name": "Image"
|
||||
},
|
||||
@ -229,21 +226,6 @@
|
||||
},
|
||||
"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": {
|
||||
@ -512,7 +494,7 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"color": "#FF0000",
|
||||
"color": "#47FF47",
|
||||
"path": "material/table_chart"
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
@ -780,8 +762,23 @@
|
||||
"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": {
|
||||
"color": "#FFFFFF",
|
||||
"path": "material/notifications_active",
|
||||
"style": {
|
||||
"classes": ""
|
||||
@ -800,17 +797,20 @@
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "System/aws_data"
|
||||
"polling": {
|
||||
"enabled": true,
|
||||
"rate": "3"
|
||||
},
|
||||
"queryPath": "GetActiveAlarmsByLocationAndPriority",
|
||||
"returnFormat": "json"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tjson_decode \u003d system.util.jsonDecode(value)\n\treturn len(json_decode)",
|
||||
"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": "tag"
|
||||
"type": "query"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -824,11 +824,24 @@
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
"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": {
|
||||
@ -980,9 +993,17 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"position.basis": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "len({this.props.text}) * 11 + \"px\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -1001,6 +1022,9 @@
|
||||
"color": "#FFFFFF",
|
||||
"textAlign": "",
|
||||
"textIndent": 10
|
||||
},
|
||||
"textStyle": {
|
||||
"lineBreak": "auto"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
@ -1064,6 +1088,7 @@
|
||||
"name": "Sign In"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,650 @@
|
||||
{
|
||||
"custom": {
|
||||
"PLC_list": null,
|
||||
"running_state": -1,
|
||||
"state": 0,
|
||||
"views_data": []
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM01/Station/EPC/UL1_3_EPC1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.PLC_list": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), 0, {value})",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.views_data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"equipment_id": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closeDock(\u0027Docked-East-BTN\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
},
|
||||
"text": "Close faceplate"
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/close",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px",
|
||||
"display": false
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Labels/Label_1",
|
||||
"marginTop": 20
|
||||
},
|
||||
"text": "No Active Alarms"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "AlarmStatusTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.filters.active.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value[1:]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"columns": {
|
||||
"active": {
|
||||
"displayPath": {
|
||||
"enabled": false
|
||||
},
|
||||
"priority": {
|
||||
"enabled": false
|
||||
},
|
||||
"source": {
|
||||
"enabled": false
|
||||
},
|
||||
"state": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"active": {
|
||||
"priorities": {
|
||||
"critical": false,
|
||||
"high": false,
|
||||
"low": false,
|
||||
"medium": false
|
||||
},
|
||||
"states": {
|
||||
"clearUnacked": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"refreshRate": 500,
|
||||
"toolbar": {
|
||||
"enabled": false
|
||||
}
|
||||
},
|
||||
"type": "ia.display.alarmstatustable"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Active_tab"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "NAME"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " return value.rsplit(\u0027/\u0027, 1)[-1]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "LIGHT"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PB_Light"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#D5D5D5",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "UNKNOWN",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(\r\n indexOf({view.params.tagProps[0]}, \"EPC\") \u003e\u003d 0,\r\n coalesce(\r\n if({value} \u003d 0, 1, {value}),\r\n {view.params.forceFaultStatus},\r\n \"UNKNOWN\"\r\n ),\r\n coalesce({value}, {view.params.forceFaultStatus}, \"UNKNOWN\")\r\n)\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "OFF"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "ON"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.textStyle.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "ON",
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": "OFF",
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Property"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px",
|
||||
"shrink": 2
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Info_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"margin-left": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "tabs"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"classes": "",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
},
|
||||
"inactive": {
|
||||
"classes": "",
|
||||
"color": "#B8B8B8",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"tabs": [
|
||||
"Alarms",
|
||||
"Info"
|
||||
]
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "670px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"border-top": "1px solid white",
|
||||
"gap": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Buttons/Button-Menu"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,643 @@
|
||||
{
|
||||
"custom": {
|
||||
"PLC_list": null,
|
||||
"running_state": -1,
|
||||
"state": 0,
|
||||
"views_data": []
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"/System/Station/Buttons/UL1_3_JR_PB2",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.PLC_list": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), 0, {value})",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.views_data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"equipment_id": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closeDock(\u0027Docked-East-DS\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
},
|
||||
"text": "Close faceplate"
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/close",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px",
|
||||
"display": false
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Labels/Label_1",
|
||||
"marginTop": 20
|
||||
},
|
||||
"text": "No Active Alarms"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "AlarmStatusTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.filters.active.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value[1:]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"columns": {
|
||||
"active": {
|
||||
"displayPath": {
|
||||
"enabled": false
|
||||
},
|
||||
"priority": {
|
||||
"enabled": false
|
||||
},
|
||||
"source": {
|
||||
"enabled": false
|
||||
},
|
||||
"state": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"active": {
|
||||
"priorities": {
|
||||
"critical": false,
|
||||
"high": false,
|
||||
"low": false,
|
||||
"medium": false
|
||||
},
|
||||
"states": {
|
||||
"clearUnacked": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"refreshRate": 500,
|
||||
"toolbar": {
|
||||
"enabled": false
|
||||
}
|
||||
},
|
||||
"type": "ia.display.alarmstatustable"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Active_tab"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "NAME"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " return value.rsplit(\u0027/\u0027, 1)[-1]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "COMMUNICATION FAULTED"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PB_Light"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#D5D5D5",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "UNKNOWN",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "FAULTED"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "NOT FAULTED"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.textStyle.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "NOT FAULTED",
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": "FAULTED",
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Property"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px",
|
||||
"shrink": 2
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Info_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"margin-left": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "tabs"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"currentTabIndex": 1,
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"classes": "",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
},
|
||||
"inactive": {
|
||||
"classes": "",
|
||||
"color": "#B8B8B8",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"tabs": [
|
||||
"Alarms",
|
||||
"Info"
|
||||
]
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "670px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"border-top": "1px solid white",
|
||||
"gap": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Buttons/Button-Menu"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,788 @@
|
||||
{
|
||||
"custom": {
|
||||
"PLC_list": [
|
||||
"MCM01",
|
||||
"MCM02",
|
||||
"MCM03",
|
||||
"MCM04",
|
||||
"MCM05",
|
||||
"MCM06",
|
||||
"MCM07"
|
||||
],
|
||||
"running_state": -1,
|
||||
"state": 0,
|
||||
"views_data": []
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM01/Station/JR/S011050_JR1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.PLC_list": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), 0, {value})",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.views_data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"equipment_id": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closeDock(\u0027Docked-East-JR\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
},
|
||||
"text": "Close faceplate"
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/close",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px",
|
||||
"display": false
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Labels/Label_1",
|
||||
"marginTop": 20
|
||||
},
|
||||
"text": "No Active Alarms"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "AlarmStatusTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.filters.active.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value[1:]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"columns": {
|
||||
"active": {
|
||||
"displayPath": {
|
||||
"enabled": false
|
||||
},
|
||||
"priority": {
|
||||
"enabled": false
|
||||
},
|
||||
"source": {
|
||||
"enabled": false
|
||||
},
|
||||
"state": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"active": {
|
||||
"priorities": {
|
||||
"critical": false,
|
||||
"high": false,
|
||||
"low": false,
|
||||
"medium": false
|
||||
},
|
||||
"states": {
|
||||
"clearUnacked": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"refreshRate": 500,
|
||||
"toolbar": {
|
||||
"enabled": false
|
||||
}
|
||||
},
|
||||
"type": "ia.display.alarmstatustable"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Active_tab"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "NAME"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " return value.rsplit(\u0027/\u0027, 1)[-1]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "LIGHT"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PB_Light"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#D5D5D5",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "UNKNOWN",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Pressed"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "OFF"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.textStyle.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "ON",
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": "OFF",
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px",
|
||||
"shrink": 2
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Info_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"margin-left": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/JR_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#B17B50\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET PRESSED\",\r\n \"#FE9240\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET\",\r\n \"#EB6700\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start_PB"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "JAM RESET",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "JAM RESET PRESSED"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"icon": {
|
||||
"path": "material/sync_problem"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"classes": "Background-Styles/Controller"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Reset Jam"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"padding": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"gap": 6,
|
||||
"paddingBottom": 20,
|
||||
"paddingLeft": 10,
|
||||
"paddingRight": 10,
|
||||
"paddingTop": 13
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Commands_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 2
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"paddingTop": 1
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "tabs"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"classes": "",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
},
|
||||
"inactive": {
|
||||
"classes": "",
|
||||
"color": "#B8B8B8",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"tabs": [
|
||||
"Alarms",
|
||||
"Info",
|
||||
"Commands"
|
||||
]
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "670px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"border-top": "1px solid white",
|
||||
"gap": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Buttons/Button-Menu"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,935 @@
|
||||
{
|
||||
"custom": {
|
||||
"PLC_list": [
|
||||
"MCM01",
|
||||
"MCM02",
|
||||
"MCM03",
|
||||
"MCM04",
|
||||
"MCM05",
|
||||
"MCM06",
|
||||
"MCM07"
|
||||
],
|
||||
"running_state": -1,
|
||||
"state": null,
|
||||
"views_data": []
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM01/Station/SSPB/UL6_1_SS1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.PLC_list": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), 0, {value})",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.views_data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"equipment_id": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closeDock(\u0027Docked-East-SS-BTN\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
},
|
||||
"text": "Close faceplate"
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/close",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px",
|
||||
"display": false
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Labels/Label_1",
|
||||
"marginTop": 20
|
||||
},
|
||||
"text": "No Active Alarms"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "AlarmStatusTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.filters.active.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value[1:]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"columns": {
|
||||
"active": {
|
||||
"displayPath": {
|
||||
"enabled": false
|
||||
},
|
||||
"priority": {
|
||||
"enabled": false
|
||||
},
|
||||
"source": {
|
||||
"enabled": false
|
||||
},
|
||||
"state": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"active": {
|
||||
"priorities": {
|
||||
"critical": false,
|
||||
"high": false,
|
||||
"low": false,
|
||||
"medium": false
|
||||
},
|
||||
"states": {
|
||||
"clearUnacked": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"refreshRate": 500,
|
||||
"toolbar": {
|
||||
"enabled": false
|
||||
}
|
||||
},
|
||||
"type": "ia.display.alarmstatustable"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Active_tab"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "NAME"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " return value.rsplit(\u0027/\u0027, 1)[-1]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "LIGHT"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PB_Light"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#D5D5D5",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "UNKNOWN",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "OFF"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "OFF"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "ON"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "ON"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.textStyle.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "ON",
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": "OFF",
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Property"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px",
|
||||
"shrink": 2
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Info_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"margin-left": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({this.props.enabled} \u003d false, 8, coalesce({value}, {view.params.forceFaultStatus}, 0))\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#00A700",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#00A700"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#00A700"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "#7DB17D"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"icon": {
|
||||
"path": "material/not_started"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"classes": "Background-Styles/Controller"
|
||||
},
|
||||
"text": "START"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Start"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"padding": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Stop_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({this.props.enabled} \u003d false, 3, coalesce({value}, {view.params.forceFaultStatus}, 0))\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#CA0D0D",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#CA0D0D"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#CA0D0D"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#CA0D0D"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#BB5050"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"icon": {
|
||||
"path": "material/stop_circle"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"classes": "Background-Styles/Controller"
|
||||
},
|
||||
"text": "STOP"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Stop"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"padding": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"gap": 6,
|
||||
"paddingBottom": 20,
|
||||
"paddingLeft": 10,
|
||||
"paddingRight": 10,
|
||||
"paddingTop": 13
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Commands"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 2
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "tabs"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"currentTabIndex": 1,
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"classes": "",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
},
|
||||
"inactive": {
|
||||
"classes": "",
|
||||
"color": "#B8B8B8",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"tabs": [
|
||||
"Alarms",
|
||||
"Info",
|
||||
"Commands"
|
||||
]
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "670px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"border-top": "1px solid white",
|
||||
"gap": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Buttons/Button-Menu"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -367,6 +367,82 @@
|
||||
},
|
||||
"type": "ia.input.checkbox"
|
||||
},
|
||||
{
|
||||
"custom": {
|
||||
"buttonid": "status_filters/low_alarms"
|
||||
},
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Show-Buttons",
|
||||
"tooltip": {
|
||||
"delay": 250
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "36px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.selected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"bidirectional": true,
|
||||
"path": "session.custom.alarm_filter.show_buttons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"checkedIcon": {
|
||||
"color": {
|
||||
"disabled": "#FFFFFF",
|
||||
"enabled": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"marginLeft": 10,
|
||||
"marginRight": 10
|
||||
},
|
||||
"text": "Show Buttons"
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "select-all-filters",
|
||||
"pageScope": false,
|
||||
"script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data\n\tsystem.perspective.print(data)",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.input.checkbox"
|
||||
},
|
||||
{
|
||||
"custom": {
|
||||
"buttonid": "status_filters/estops_pullChords"
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/AUS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Button"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Camera"
|
||||
},
|
||||
@ -30,6 +33,9 @@
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/ControlCabinet"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Divert_Arm"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Estop"
|
||||
},
|
||||
@ -39,6 +45,15 @@
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/JAM"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/JR_Button"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Kobukuro"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Lift"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Light_Curtain"
|
||||
},
|
||||
@ -48,6 +63,18 @@
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Network"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PPI"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Photocell2_Lift"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Photocell_Lift"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PinDetection"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Pointer"
|
||||
},
|
||||
@ -75,9 +102,18 @@
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SLAMs"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SS_Button"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SafetyGate"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SmartPac"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Spiral"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Stacker_Destacker"
|
||||
},
|
||||
@ -121,6 +157,16 @@
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Button",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Camera",
|
||||
"forceFault": null,
|
||||
@ -151,6 +197,16 @@
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Divert_Arm",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Estop",
|
||||
"forceFault": null,
|
||||
@ -181,6 +237,36 @@
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/JR_Button",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Kobukuro",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Lift",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Light_Curtain",
|
||||
"forceFault": null,
|
||||
@ -211,6 +297,46 @@
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/PPI",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Photocell2_Lift",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Photocell_Lift",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/PinDetection",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Pointer",
|
||||
"forceFault": null,
|
||||
@ -301,6 +427,16 @@
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/SS_Button",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/SafetyGate",
|
||||
"forceFault": null,
|
||||
@ -311,6 +447,26 @@
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/SmartPac",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Spiral",
|
||||
"forceFault": null,
|
||||
"forceRunning": 3,
|
||||
"has_state": true,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Path": "Symbol-Views/Equipment-Views/Stacker_Destacker",
|
||||
"forceFault": null,
|
||||
@ -400,6 +556,54 @@
|
||||
"name": "Table"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.data[11].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state5"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[11].Color.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) "
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.data[12].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state4"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[13].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state3"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[14].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state2"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[15].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state1"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[1].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -408,7 +612,7 @@
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[2].Color.style.backgroundColor": {
|
||||
"props.data[3].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state5"
|
||||
@ -416,61 +620,13 @@
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[2].Color.style.color": {
|
||||
"props.data[3].Color.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) "
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.data[4].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state5"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[4].Color.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) "
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.data[5].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state4"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[6].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state3"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[7].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state2"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data[8].Color.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state1"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
@ -710,7 +866,20 @@
|
||||
},
|
||||
"value": "Stopped"
|
||||
},
|
||||
"Description": "MHE is stopped (State2)"
|
||||
"Description": "MHE is Stopped/Disabled\n"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#c9fcc0",
|
||||
"classes": "",
|
||||
"color": "#000000"
|
||||
},
|
||||
"value": "Enabled"
|
||||
},
|
||||
"Description": "MHE is Enabled (Not Running)"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
@ -721,7 +890,85 @@
|
||||
},
|
||||
"value": "Running"
|
||||
},
|
||||
"Description": "MHE is running (State 3)"
|
||||
"Description": "MHE is Running"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#00ffd0",
|
||||
"classes": "",
|
||||
"color": "#000000"
|
||||
},
|
||||
"value": "Power Saving"
|
||||
},
|
||||
"Description": "MHE is in Power Saving Mode"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#ff8c00",
|
||||
"classes": "",
|
||||
"color": "#000000"
|
||||
},
|
||||
"value": "Jammed"
|
||||
},
|
||||
"Description": "MHE is Jammed"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#0008ff",
|
||||
"classes": "",
|
||||
"color": "#FFFFFF"
|
||||
},
|
||||
"value": "Full"
|
||||
},
|
||||
"Description": "MHE is Full"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#946446",
|
||||
"classes": "",
|
||||
"color": "#FFFFFF"
|
||||
},
|
||||
"value": "Maint Mode"
|
||||
},
|
||||
"Description": "MHE is in Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#B45C5C",
|
||||
"classes": "",
|
||||
"color": "#FFFFFF"
|
||||
},
|
||||
"value": "Maint Running Mode"
|
||||
},
|
||||
"Description": "MHE Running in Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"backgroundColor": "#ff0000",
|
||||
"classes": "",
|
||||
"color": "#FFFFFF"
|
||||
},
|
||||
"value": "Estop / Faulted\n"
|
||||
},
|
||||
"Description": "MHE is Estopped / Faulted\n"
|
||||
},
|
||||
{
|
||||
"Color": {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"params": {
|
||||
"value": {
|
||||
"tagProps": [
|
||||
"",
|
||||
"MCM01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -25,7 +25,7 @@
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 50,
|
||||
"width": 300
|
||||
"width": 396
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
@ -35,7 +35,7 @@
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tid \u003d self.view.params.value.tagProps[0]\n\tcommandTarget\u003dstr(id)+\"/0\"#PLC01/0 --\u003etarget is the plc\n\tcommandParams\u003d\"\"\n\tif whid\u003d\u003d\"MAN2\" or whid\u003d\u003d\"BRS1\" or whid\u003d\u003d\"MAD6\":\n\t\tcommandTarget\u003d\"databridge/0\"\n\t\tcommandParams\u003d\"PLC\u003d\"+str(id)#this tells the target to data bridge\n\taction \u003d 1\n\tparameters\u003d{\"commandTarget\":commandTarget,\n\t\t\t\t\"commandCode\":1,\n\t\t\t\t\"commandTimestamp\":system.date.toMillis(system.date.now()),\n\t\t\t\t\"commandParams\":commandParams}\n\tCommands.button_commands.send_request(whid, action, parameters)"
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\t"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
@ -56,7 +56,7 @@
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Start \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\")"
|
||||
"expression": "if({this.props.enabled},\u0027Start \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -64,7 +64,7 @@
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}"
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -72,11 +72,47 @@
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)"
|
||||
"expression": "if({this.props.enabled},\u0027#FFFFFF\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Start_PB_STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#00A700",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#41E841"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#41E841"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -96,7 +132,6 @@
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"backgroundColor": "#D4D4D4",
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
@ -107,6 +142,7 @@
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"color": "#000000",
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
@ -119,164 +155,7 @@
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tid \u003d self.view.params.value.tagProps[0]\n\tcommandTarget\u003dstr(id)+\"/0\"#PLC01/0 --\u003etarget is the plc\n\tcommandParams\u003d\"\"\n\tif whid\u003d\u003d\"MAN2\" or whid\u003d\u003d\"BRS1\" or whid\u003d\u003d\"MAD6\":\n\t\tcommandTarget\u003d\"databridge/0\"\n\t\tcommandParams\u003d\"PLC\u003d\"+str(id)#this tells the target to data bridge\n\taction \u003d 3\n\tparameters\u003d{\"commandTarget\":commandTarget,\n\t\t\t\t\"commandCode\":3,\n\t\t\t\t\"commandTimestamp\":system.date.toMillis(system.date.now()),\n\t\t\t\t\"commandParams\":commandParams}\n\tCommands.button_commands.send_request(whid, action, parameters)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Reset",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Reset \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\") "
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/refresh"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"backgroundColor": "#D4D4D4",
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "JAM_Reset",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Jam Reset \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/sync_problem"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"backgroundColor": "#D4D4D4",
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttags_to_read \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\twhid \u003d tags_to_read[0].value\n\tid \u003d self.view.params.value.tagProps[0]\n\tcommandTarget\u003dstr(id)+\"/0\"#PLC01/0 --\u003etarget is the plc\n\tcommandParams\u003d\"\"\n\tif whid\u003d\u003d\"MAN2\" or whid\u003d\u003d\"BRS1\" or whid\u003d\u003d\"MAD6\":\n\t\tcommandTarget\u003d\"databridge/0\"\n\t\tcommandParams\u003d\"PLC\u003d\"+str(id)#this tells the target to data bridge\n\taction \u003d 2\n\tparameters\u003d{\"commandTarget\":commandTarget,\n\t\t\t\t\"commandCode\":2,\n\t\t\t\t\"commandTimestamp\":system.date.toMillis(system.date.now()),\n\t\t\t\t\"commandParams\":commandParams}\n\tCommands.button_commands.send_request(whid, action, parameters)"
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Stop_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
@ -297,7 +176,7 @@
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Stop \u0027 + {view.params.value.tagProps[0]},\"Re-Authentication Required - Press \u0027Enable Controls\u0027 button and re-enter password\") "
|
||||
"expression": "if({this.props.enabled},\u0027Stop \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -305,7 +184,7 @@
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.command_auth.enabled} \u0026\u0026 {parent.custom.has_role}"
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -313,11 +192,43 @@
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#4A4A4A\u0027,\u0027#979797\u0027)"
|
||||
"expression": "if({this.props.enabled},\u0027#FFFFFF\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Stop_PB"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#CA0D0D",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -337,7 +248,597 @@
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"backgroundColor": "#D4D4D4",
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Motor_Fault_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "MotorFaultReset",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Motor Fault Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Motor_Fault_Reset_PB_STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#DCDC03",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FCFF86"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#FCFF86"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/refresh"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Power_Branch_Fault_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "PowerBranchFaultReset",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Power Branch Fault Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Power_Branch_Fault_Reset_PB_STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#DCDC03",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FCFF86"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#FCFF86"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/power"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Low_Air_Pressure_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "LowAirPressureReset",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Low Air Pressure Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#FFFFFF\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Low_Air_Pressure_Reset_PB_STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#0A0AA4",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#5D5DFF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#5D5DFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/waves"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Jam_Restart_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "JAM_Reset",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Jam Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Jam_Restart_PB_STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#D4D4D4",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/sync_problem"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"text": "",
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Setup_Motor_Speeds\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "SetupMotorSpeeds",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027Setup Motor Speeds \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Setup_Motor_Speeds"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#D4D4D4",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"height": 32,
|
||||
"icon": {
|
||||
"path": "material/speed"
|
||||
},
|
||||
"position": "top",
|
||||
"width": 32
|
||||
},
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderWidth": 2,
|
||||
"classes": "\n",
|
||||
|
||||
@ -3,16 +3,52 @@
|
||||
"counts": {
|
||||
"Critical": 0,
|
||||
"Diagnostic": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"High": 1,
|
||||
"Low": 1,
|
||||
"Medium": 0,
|
||||
"Total": 0
|
||||
"Total": 2
|
||||
},
|
||||
"totalAlarms": {
|
||||
"$": [
|
||||
"ds",
|
||||
192,
|
||||
1752066852881
|
||||
],
|
||||
"$columns": [
|
||||
{
|
||||
"data": [
|
||||
null,
|
||||
"MCM01",
|
||||
"MCM01"
|
||||
],
|
||||
"name": "Location",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
"Low",
|
||||
"High",
|
||||
"Low"
|
||||
],
|
||||
"name": "Priority",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"name": "Count",
|
||||
"type": "Long"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"value": {
|
||||
"tagProps": [
|
||||
"",
|
||||
"MCM01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -27,27 +63,34 @@
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.counts": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.totalAlarms": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"PLC": "{view.params.value.tagProps[0]}",
|
||||
"device_count": "tag(\u0027[\u0027+ {session.custom.fc} +\u0027_SCADA_TAG_PROVIDER]System/device_count\u0027)"
|
||||
"polling": {
|
||||
"enabled": true,
|
||||
"rate": "3"
|
||||
},
|
||||
"waitOnAll": true
|
||||
"queryPath": "GetActiveAlarmsByLocationAndPriority"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tcount_dict \u003d system.util.jsonDecode(value.device_count)\n\tvalues \u003d count_dict.get(value.PLC)\n\tif values !\u003d None:\n\t\tvalues[\u0027Total\u0027] \u003d values[\u0027Critical\u0027] + values[\u0027High\u0027] + values[\u0027Medium\u0027] + values[\u0027Low\u0027] + values[\u0027Diagnostic\u0027]\n\t\treturn values\n\telse:\n\t\treturn {\"Critical\":0,\"High\":0,\"Medium\":0,\"Low\":0,\"Diagnostic\":0, \"Total\":0}",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
"type": "query"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tMCM \u003d self.params.value.tagProps[0]\n\tqueryData \u003d currentValue.value\n\t\n\t# Initialize counts\n\tcounts \u003d {\n\t \"Critical\": 0,\n\t \"High\": 0,\n\t \"Medium\": 0,\n\t \"Low\": 0,\n\t \"Diagnostic\": 0,\n\t \"Total\": 0\n\t}\n\t\n\t# Loop through dataset and aggregate\n\tfor row in range(queryData.rowCount):\n\t mcm_val \u003d queryData.getValueAt(row, 0)\n\t severity \u003d queryData.getValueAt(row, 1)\n\t count \u003d queryData.getValueAt(row, 2)\n\t\n\t if mcm_val \u003d\u003d MCM:\n\t key \u003d severity.capitalize()\n\t if key in counts:\n\t counts[key] +\u003d count\n\t counts[\"Total\"] +\u003d count\n\t \n\tself.custom.counts \u003d counts"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.value": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.value.tagProps": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tsystem.perspective.print(currentValue.value[0])"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
|
||||
@ -1,9 +1,41 @@
|
||||
{
|
||||
"custom": {},
|
||||
"custom": {
|
||||
"state": {
|
||||
"$": [
|
||||
"ds",
|
||||
192,
|
||||
1751989861336
|
||||
],
|
||||
"$columns": [
|
||||
{
|
||||
"data": [
|
||||
null
|
||||
],
|
||||
"name": "Location",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
"Low"
|
||||
],
|
||||
"name": "Priority",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1
|
||||
],
|
||||
"name": "Count",
|
||||
"type": "Long"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": ""
|
||||
},
|
||||
"params": {
|
||||
"value": {
|
||||
"tagProps": [
|
||||
"",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -17,6 +49,26 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"polling": {
|
||||
"enabled": true,
|
||||
"rate": "1"
|
||||
},
|
||||
"queryPath": "GetActiveAlarmsByLocationAndPriority"
|
||||
},
|
||||
"type": "query"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tMCM \u003d self.params.value.tagProps[0]\n\tqueryData \u003d currentValue.value\n\t\n\tif not queryData:\n\t self.custom.status \u003d \"\"\n\t\n\t# Define priority order from highest to lowest\n\tpriority_order \u003d [\"Critical\", \"High\", \"Medium\", \"Low\", \"Diagnostic\"]\n\texisting_priorities \u003d set()\n\tmyPriority \u003d \"\"\n\t\n\t# Populate the set\n\tfor row in range(queryData.rowCount):\n\t mcm_val \u003d queryData.getValueAt(row, 0)\n\t severity \u003d queryData.getValueAt(row, 1).capitalize()\n\t count \u003d queryData.getValueAt(row, 2)\n\t\n\t if mcm_val \u003d\u003d MCM and count \u003e 0:\n\t existing_priorities.add(severity)\n\t\n\t# Find the highest one that exists\n\tfor priority in priority_order:\n\t if priority in existing_priorities:\n\t myPriority \u003d priority\n\t break\n\t\n\tself.custom.status \u003d myPriority"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.status": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.value": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
@ -49,59 +101,35 @@
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.status"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.status"
|
||||
"path": "view.custom.status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "State-Styles/State0",
|
||||
"fallback": "State-Styles/Background-Fill/State5",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"input": "High",
|
||||
"output": "State-Styles/Background-Fill/State1"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"input": "Medium",
|
||||
"output": "State-Styles/Background-Fill/State2"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"input": "Low",
|
||||
"output": "State-Styles/Background-Fill/State3"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"input": "Diagnostic",
|
||||
"output": "State-Styles/Background-Fill/State4"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "State-Styles/Background-Fill/State5"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "State-Styles/Background-Fill/State6"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "State-Styles/State0"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},{value}+\u0027_Alt\u0027,{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
@ -110,36 +138,28 @@
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.status"
|
||||
"path": "view.custom.status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"fallback": "HEALTHY",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 5,
|
||||
"output": "HEALTHY"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"input": "Diagnostic",
|
||||
"output": "DIAGNOSTIC"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "PROCESS DEGRADED"
|
||||
"input": "Low",
|
||||
"output": "HALF WORKFLOW"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "STOPPED"
|
||||
"input": "Medium",
|
||||
"output": "CONTROLLED STOP"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "FAULTED"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": null
|
||||
"input": "High",
|
||||
"output": "UNCONTROLLED STOP"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
@ -169,78 +189,6 @@
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.has_role": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.fc}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\trme_role \u003d value +\"-rme-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles):\n\t\treturn True\n\telse:\n\t\treturn False",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.value.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), 0, {value})",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.tag_path_to_lookup": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": " \"[\\\"\" + {view.params.value.tagProps[0]} + \"\\\"]\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Counts": {
|
||||
"Diag": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
},
|
||||
"Status": "",
|
||||
"tagProps": [
|
||||
"PLC03",
|
||||
"MCM01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -22,10 +16,6 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Counts": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.Status": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
@ -39,8 +29,7 @@
|
||||
"defaultSize": {
|
||||
"height": 212,
|
||||
"width": 336
|
||||
},
|
||||
"key": "value"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
@ -219,146 +208,43 @@
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.covert\u003d False\n\tnavigation.navigate_to_page.detailed_view(self, self.view.params.tagProps[0],self.view.params.tagProps[0], self.view.params.tagProps[3])"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "236px"
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.status": {
|
||||
"props.params.value.tagProps[0]": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.status"
|
||||
"expression": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "State-Styles/State0",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "State-Styles/Background-Fill/State1"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "State-Styles/Background-Fill/State2"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "State-Styles/Background-Fill/State3"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "State-Styles/Background-Fill/State4"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "State-Styles/Background-Fill/State5"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "State-Styles/Background-Fill/State6"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "State-Styles/State0"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},{value}+\u0027_Alt\u0027,{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 5,
|
||||
"output": "HEALTHY"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "DIAGNOSTIC"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "PROCESS DEGRADED"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "STOPPED"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "FAULTED"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": null
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 5,
|
||||
"borderBottomRightRadius": 5,
|
||||
"borderColor": "#555555",
|
||||
"borderStyle": "solid",
|
||||
"borderTopLeftRadius": 5,
|
||||
"borderTopRightRadius": 5,
|
||||
"borderWidth": 2,
|
||||
"marginBottom": 10,
|
||||
"marginLeft": 50,
|
||||
"marginRight": 10,
|
||||
"marginTop": 10
|
||||
"params": {
|
||||
"key": "value",
|
||||
"value": {
|
||||
"tagProps": [
|
||||
null,
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
},
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"textAlign": "center"
|
||||
}
|
||||
"path": "Symbol-Views/Controller-Views/CommandControlStatus"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
@ -368,6 +254,7 @@
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-around",
|
||||
"style": {
|
||||
"borderBottomColor": "#555555",
|
||||
"borderBottomStyle": "solid",
|
||||
@ -385,9 +272,26 @@
|
||||
"position": {
|
||||
"basis": "25px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.counts"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tfor v in value.values():\n\t\tif v \u003e 0:\n\t\t\treturn \"red\"\n\treturn \"\"",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/notifications_active",
|
||||
"style": {
|
||||
"classes": "",
|
||||
"marginLeft": 10
|
||||
}
|
||||
},
|
||||
@ -704,7 +608,11 @@
|
||||
],
|
||||
"custom": {
|
||||
"counts": {
|
||||
"Critical": 0
|
||||
"Critical": 0,
|
||||
"Diagnostic": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
@ -752,38 +660,6 @@
|
||||
"script": "\tsystem.perspective.sendMessage(\"update-alarm-count\", self.custom.counts, \"view\")"
|
||||
}
|
||||
},
|
||||
"custom.counts.Diagnostic": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Counts.Diag"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.counts.High": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Counts.High"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.counts.Low": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Counts.Low"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.counts.Medium": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Counts.Medium"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.plc_dict": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -867,6 +743,22 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.table": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"polling": {
|
||||
"enabled": true,
|
||||
"rate": "3"
|
||||
},
|
||||
"queryPath": "GetActiveAlarmsByLocationAndPriority"
|
||||
},
|
||||
"type": "query"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\ttry:\n\t\tMCM \u003d self.view.params.tagProps[0]\n\t\tdata \u003d currentValue.value\n\t\t\n\t\t# Convert dataset to PyDataSet\n\t\trows \u003d system.dataset.toPyDataSet(data)\n\t\t\n\t\t# Initialize counts dictionary with first-letter uppercase keys\n\t\tcounts \u003d {\n\t\t\t\"Low\": 0,\n\t\t\t\"Medium\": 0,\n\t\t\t\"High\": 0,\n\t\t\t\"Critical\": 0,\n\t\t\t\"Diagnostic\": 0\n\t\t}\n\t\t\n\t\t# Loop through rows and filter for current MCM\n\t\tfor row in rows:\n\t\t\tif row[\"Location\"] \u003d\u003d MCM:\n\n\t\t\t\tpriority \u003d row[\"Priority\"].capitalize()\n\t\t\t\tif priority in counts:\n\t\t\t\t\tcounts[priority] \u003d row[\"Count\"]\n\t\t\n\t\tself.custom.counts \u003d counts\n\t\n\texcept Exception as e:\n\t\tsystem.perspective.print(\"Error gaq dzma: \" + str(e))"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
|
||||
@ -1,10 +1,19 @@
|
||||
{
|
||||
"custom": {},
|
||||
"custom": {
|
||||
"disconnected": false,
|
||||
"plc": "",
|
||||
"priority": 0,
|
||||
"priority_string": "No Active Alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"tagProps": [
|
||||
"PLC15/OPC/inAlarms0",
|
||||
"1_Profinet node fault",
|
||||
"",
|
||||
"/System/Field_Devices/SIO/SIO1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -15,6 +24,135 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n0, \"Normal\",\r\n1, \"Communication Faulted\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
@ -77,97 +215,36 @@
|
||||
"basis": "264px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "true"
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#D3D3D3\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#FF0000\u0027,\r\n if(\r\n {view.custom.state} \u003d 0,\r\n \u0027#00D900\u0027,\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.custom.ref_state}"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "State-Styles/State106",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "State-Styles/State0"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "State-Styles/State1"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "State-Styles/State2"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "State-Styles/State3"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "State-Styles/State4"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "State-Styles/State5"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "State-Styles/State6"
|
||||
},
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/place"
|
||||
"path": "material/place",
|
||||
"style": {
|
||||
"classes": "State-Styles/State1"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\t\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"DevicePopUP\", \"PopUp-Views/Device/Information-Device\", params \u003d{\"tagProps\":tagProps},resizable \u003d 1)\n\t"
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
@ -175,98 +252,48 @@
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
"name": "root",
|
||||
"text": "",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_active": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.IsActive"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.alarm_priority_int": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.Priority"
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\n\"Critical\",1,\n\"High\",1,\n\"Medium\",2,\n\"Low\",3,\n\"Diagnostic\",4,0)",
|
||||
"type": "expression"
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.alarm_shelved": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.IsShelved"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.covert"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.deviceSearchId} \u003d {this.custom.search_path},1,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tif currentValue.value \u003d\u003d 1:\n\t\tself.print(self.custom.search_path)\n\t\tself.session.custom.searchId \u003d \"\""
|
||||
},
|
||||
"persistent": false
|
||||
},
|
||||
"custom.ref_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d1,{this.custom.alarm_priority_int} + 100,\nif({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d0,{this.custom.alarm_priority_int},\nif({this.custom.state}\u003d0 \u0026\u0026 {this.custom.isMatch}\u003d1,105,5)))"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.search_path": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagProps[0]}+\"/\"+{view.params.tagProps[1]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.custom.alarm_shelved},0,\nif({this.custom.alarm_active},1,0))"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"pageid": "value",
|
||||
"panel_id": "value",
|
||||
"text": "value"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.pageid": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.panel_id": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.text": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 30,
|
||||
"width": 160
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.navigate(\"/\" + self.view.params.pageid)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.tagProps[0]": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.panel_id"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.text"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "0.5px",
|
||||
"cursor": "pointer"
|
||||
},
|
||||
"tagProps": [
|
||||
null,
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
],
|
||||
"textStyle": {
|
||||
"color": "#000000",
|
||||
"fontFamily": "inherit",
|
||||
"fontSize": "1vmin",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"alignContent": "flex-start",
|
||||
"justify": "center"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,306 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"disconnected": false,
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "Unknown",
|
||||
"searchId": "value",
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"color": 1,
|
||||
"forceFaultStatus": null,
|
||||
"tagProps": [
|
||||
"System/MCM01/StationR/UL1_3_JR_PB1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Pressed"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Low\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/PR_Pressed"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Package Release Pressed\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.color": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 25,
|
||||
"width": 25
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#999999\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#D5D5D5\u0027,\r\n if(\r\n {view.custom.state} \u003d 0,\r\n \u0027#D5D5D5\u0027,\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected} \u0026\u0026 {view.params.color} \u003d 1,\r\n \"#D5D5D5\",\r\n if(\r\n {view.custom.disconnected} \u0026\u0026 {view.params.color} \u003d 2,\r\n \"#00D900\",\r\n if(\r\n {view.params.color} \u003d 1,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \"#FF0000\",\r\n \"#D5D5D5\"\r\n ),\r\n if(\r\n {view.params.color} \u003d 2,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \"#FF0000\",\r\n \"#00D900\"\r\n ),\r\n \"#D5D5D5\"\r\n )\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,0 H 20 V 20 H 0 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1.5"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 20 20"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_buttons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -719,7 +719,8 @@
|
||||
"aspectRatio": "40:25",
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
|
||||
@ -1,18 +1,13 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"disconnected": true,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"running_status": 0,
|
||||
"searchId": "value",
|
||||
"state": 5,
|
||||
"state_string": "Unknown"
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
@ -32,38 +27,20 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_gateways},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm}||{session.custom.alarm_filter.show_gateways},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic}||{session.custom.alarm_filter.show_gateways},\r\n\t\t5, {session.custom.alarm_filter.show_gateways},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -71,39 +48,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -157,33 +101,12 @@
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n0, \"No active alarms\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -202,40 +125,12 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
@ -245,7 +140,7 @@
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
|
||||
"expression": "case({view.custom.state},\r\n1, \"Communication Faulted\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
@ -288,80 +183,8 @@
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#808080\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#FF0000\u0027,\r\n if(\r\n {view.custom.state} \u003d 0,\r\n \u0027#00D900\u0027,\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
@ -393,7 +216,6 @@
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"style": {},
|
||||
"viewBox": "-0.5 -0.5 62 41"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
@ -403,7 +225,7 @@
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
@ -434,20 +256,6 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -482,68 +290,22 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Disconnects/Device-Connected",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Disconnects/Device-Disconnected"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "Disconnects/Device-Connected"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"aspectRatio": "68:47",
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
"classes": "Disconnects/Device-Connected",
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
|
||||
@ -0,0 +1,537 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": false,
|
||||
"openDiverter": false,
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "value",
|
||||
"state": 0,
|
||||
"state_string": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"mirror": true,
|
||||
"tagProps": [
|
||||
"System/MCM01/Station/EPC/UL1_3_EPC1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.openDiverter": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": false
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Low\",\r\n0, \"No active alarms\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n0, \"Closed\",\r\n1, \"Open\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 16,
|
||||
"width": 15
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "OpenDiverterArm"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.openDiverter} \u0026\u0026 {view.params.mirror}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#808080\", \"#FF0000\", \"#FFF000\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,40 32.820217,3.3897904 c 2.588185,-2.76545766 5.724342,-0.1926117 3.552046,2.114172 L 8,40 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "xMidYMax",
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "0 1.3 38 46"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ClosedDiverterArm"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{view.custom.openDiverter} \u0026\u0026 {view.params.mirror}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#808080\", \"#FF0000\", \"#FFF000\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0 0 L 96 0 L 96 16 L 0 16 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "xMidYMax",
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-1 0 98 17"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "OpenDiverterArmLeft"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.openDiverter} \u0026\u0026 !{view.params.mirror}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#808080\", \"#FF0000\", \"#FFF000\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,40 32.820217,3.3897904 c 2.588185,-2.76545766 5.724342,-0.1926117 3.552046,2.114172 L 8,40 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "xMidYMax",
|
||||
"style": {
|
||||
"overflow": "hidden",
|
||||
"transform": "scaleX(-1)"
|
||||
},
|
||||
"viewBox": "0 1.3 38 46"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ClosedDiverterArmLeft"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{view.custom.openDiverter} \u0026\u0026 !{view.params.mirror}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#808080\", \"#FF0000\", \"#FFF000\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0 0 L 96 0 L 96 16 L 0 16 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "xMidYMax",
|
||||
"style": {
|
||||
"overflow": "hidden",
|
||||
"transform": "scaleX(-1)"
|
||||
},
|
||||
"viewBox": "-1 0 98 17"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left",
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Low"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "solid"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "none"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"borderColor": "#FF0000",
|
||||
"borderStyle": "none",
|
||||
"borderWidth": "2px",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -481,7 +481,7 @@
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
"path": "session.custom.alarm_filter.show_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
|
||||
@ -0,0 +1,390 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": true,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No Active Alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Loading Not Allowed"
|
||||
},
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tif self.custom.priority not in [1, 2, 3, 4, 5, 6, 0]:\n\t self.custom.priority_string \u003d \"Unknown\""
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n0, \"Loading Not Allowed\",\r\n1, \"Loading Allowed\",\r\n2, \"Running\",\r\n3, \"Full\",\r\n4, \"Communication Faulted\",\r\n5, \"Extendo Faulted\",\r\n6, \"Estopped\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.directionLeft": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 29
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#0000FF\",\r\n \"#FF0000\", \"#FF0000\", \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#0000FF\",\r\n \"#FF0000\", \"#FF0000\", \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#0000FF\",\r\n \"#FF0000\", \"#FF0000\", \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 50 0 L 65 0 L 80 30 L 65 60 L 50 60 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 45 0 L 25 0 L 25 30 L 25 60 L 45 60 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 0 0 L 20 0 L 20 30 L 20 60 L 0 60 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-1.5 -1.5 73 63"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-Extendo\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left",
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"justify": "center"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,442 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"disconnected": false,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 0
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 3,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No active alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 25,
|
||||
"width": 25
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "JR_Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#585858",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "#000000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#D5D5D5"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#FFFF47"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,0 H 20 V 20 H 0 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1.5"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {},
|
||||
"viewBox": "0 0 20 20"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-JR\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_buttons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,334 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": true,
|
||||
"plc": "MCM",
|
||||
"priority": 0,
|
||||
"priority_string": "No Active Alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": false,
|
||||
"tagProps": [
|
||||
"MCM",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.priority},\r\n1, \"High\",\r\n0, \"No Active Alarms\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Motor Was Faulted\",\r\n2, \"Power Branch Was Faulted\",\r\n3, \"Low Air Pressure Fault Was Present\",\r\n4, \"Encoder Fault\",\r\n5, \"Jam Fault\",\r\n6, \"Communication Faulted\",\r\n7, \"Estop Was Actuated\",\r\n8, \"Estopped Locally\",\r\n9, \"System Started\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.has_state": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 46,
|
||||
"width": 68
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "MCM"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, \r\n \"#B3B3B3\", \"#FF0000\", \"#FF0000\", \"#FF0000\", \"#FF8C00\",\r\n \"#FF8C00\", \"#FF0000\", \"#FF0000\", \"#FF0000\", \"#00FF00\",\r\n \"#FFFF00\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": false,
|
||||
"script": ""
|
||||
}
|
||||
},
|
||||
"props.elements[1].style.fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 1 0 H 60 V 40 H 1 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 4
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontWeight": "bold"
|
||||
},
|
||||
"text": "MCM",
|
||||
"type": "text",
|
||||
"x": 11,
|
||||
"y": 26
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"viewBox": "-0.5 -0.5 62 41"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-MCM\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left",
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"aspectRatio": "68:47",
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -1,22 +1,18 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"plc": "value",
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "value",
|
||||
"state": 5
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"System/Station/EPC/UL1_3_EPC1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -29,38 +25,20 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -68,39 +46,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -128,18 +73,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
@ -154,9 +87,23 @@
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"type": "expr"
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "No active alarms",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
@ -178,46 +125,27 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
@ -253,14 +181,8 @@
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\u0027#AAAAAA\u0027"
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#AAAAAA\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#AAAAAA\", \"#AAAAAA\", \r\n \"#FFFF00\"\r\n )\r\n)"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
@ -271,7 +193,7 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n{session.custom.colours.state5}\r\n)",
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n{session.custom.colours.state1}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -281,90 +203,16 @@
|
||||
"props.elements[2].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.error"
|
||||
"expression": "if(\r\n {view.custom.state} \u003d 0 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(!{value} \u0026\u0026 {view.custom.display_icon}, \u0027visible\u0027, \u0027hidden\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[3].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.error"
|
||||
"expression": "if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} \u0026\u0026 {view.custom.display_icon}, \u0027visible\u0027, \u0027hidden\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
@ -428,7 +276,6 @@
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {},
|
||||
"viewBox": "-0.5 -0.5 27 42"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
@ -469,20 +316,6 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -495,18 +328,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
@ -517,24 +338,10 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -542,36 +349,10 @@
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
"path": "session.custom.alarm_filter.show_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Disconnects/Device-Connected",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Disconnects/Device-Disconnected"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "Disconnects/Device-Connected"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "value",
|
||||
"state": 5
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
@ -29,38 +25,20 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -68,39 +46,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -128,18 +73,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
@ -154,9 +87,23 @@
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"type": "expr"
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "No active alarms",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
@ -178,46 +125,27 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
@ -248,65 +176,11 @@
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.classes": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#AAAAAA\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#AAAAAA\", \"#FF0000\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
@ -315,9 +189,7 @@
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z",
|
||||
"fill": {
|
||||
"paint": "#D5D5D5"
|
||||
},
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
@ -327,7 +199,6 @@
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"style": {},
|
||||
"viewBox": "-0.5 -0.5 27 42"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
@ -368,20 +239,6 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -394,18 +251,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
@ -416,24 +261,10 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -441,36 +272,10 @@
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
"path": "session.custom.alarm_filter.show_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Disconnects/Device-Connected",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Disconnects/Device-Disconnected"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "Disconnects/Device-Connected"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"disconnected": true,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "value",
|
||||
"state": 5
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
@ -29,38 +25,20 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -68,39 +46,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -128,18 +73,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
@ -154,9 +87,23 @@
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"type": "expr"
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "No active alarms",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
@ -178,46 +125,27 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
@ -248,137 +176,25 @@
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].stroke.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#00D900\", \"#FF0000\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.error"
|
||||
"expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.error"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].stroke.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n\u0027#000000\u0027\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "m -0.38931298,0.28431365 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m -0.38931298,10.850587 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m -0.38931298,5.5674501 c 33.95623398,0 67.91246898,0 101.86870298,0",
|
||||
"fill": {
|
||||
@ -387,7 +203,7 @@
|
||||
"name": "path",
|
||||
"opacity": 1,
|
||||
"stroke": {
|
||||
"dasharray": "8, 8, 8",
|
||||
"dasharray": "0, 0, 0",
|
||||
"dashoffset": "\"20\"",
|
||||
"key": "\"2.15848\"",
|
||||
"miterlimit": "\"10\"",
|
||||
@ -397,7 +213,6 @@
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"style": {},
|
||||
"viewBox": "-0.5 -0.5 102 12"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
@ -438,20 +253,6 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -464,18 +265,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
@ -486,24 +275,10 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -511,41 +286,16 @@
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
"path": "session.custom.alarm_filter.show_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Disconnects/Device-Connected",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Disconnects/Device-Disconnected"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "Disconnects/Device-Connected"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"borderStyle": "none",
|
||||
"cursor": "pointer",
|
||||
"overflow": "visible"
|
||||
}
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "value",
|
||||
"state": 5
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
@ -29,24 +25,6 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -68,39 +46,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -123,24 +68,12 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"fallback": 1,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
@ -154,9 +87,27 @@
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"type": "expr"
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No active alarms"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
@ -178,7 +129,7 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
@ -190,24 +141,12 @@
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
@ -218,6 +157,15 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
@ -251,11 +199,11 @@
|
||||
"props.elements[0].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.error"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)",
|
||||
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -265,11 +213,11 @@
|
||||
"props.elements[1].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.error"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)",
|
||||
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -283,8 +231,20 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n\u0027#000000\u0027\r\n)",
|
||||
"type": "expression"
|
||||
"fallback": "#800000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#000000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
@ -293,7 +253,7 @@
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
@ -445,7 +405,7 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -464,18 +424,6 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
@ -493,7 +441,7 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -503,7 +451,7 @@
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown\")"
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -511,7 +459,7 @@
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
"path": "session.custom.alarm_filter.show_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
|
||||
@ -0,0 +1,471 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"disconnected": false,
|
||||
"plc": "System",
|
||||
"priority": 5,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 4,
|
||||
"state_string": "Disabled"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceStatus": null,
|
||||
"tagProps": [
|
||||
"System/MCM01/Station/SSPB/UL6_1_SS1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 5,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 5
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": 5
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": 5
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": 3
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.priority},\r\n3, \"Medium\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 1,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": 5
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": 6
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": 7
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n0, \"Stopped\",\r\n1, \"Started\",\r\n2, \"Stopped\",\r\n3, \"Stopped\",\r\n4, \"Disabled\",\r\n5, \"Started\",\r\n6, \"Started\",\r\n7, \"Stopped\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 25,
|
||||
"width": 50
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "SS_button"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6 ,7,\r\n \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\",\r\n \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#00CC00",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#007400"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#007400"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#00FF00"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#940003",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#940003"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#940003"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#940003"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#D90000"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#940003"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#940003"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#940003"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,0 H 40 V 20 H 0 Z",
|
||||
"fill": {},
|
||||
"id": "outer-rect",
|
||||
"name": "outer-rect",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1.5"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 17,10.5 c 0,3.865993 -3.134007,7 -7,7 -3.8659932,0 -7,-3.134007 -7,-7 0,-3.8659932 3.1340068,-7 7,-7 3.865993,0 7,3.1340068 7,7 z",
|
||||
"fill": {},
|
||||
"id": "inner-circle",
|
||||
"name": "inner-circle",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 36.642136,10.376001 c 0,3.865993 -3.134007,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.8659928 3.134007,-6.9999998 7,-6.9999998 3.865993,0 7,3.134007 7,6.9999998 z",
|
||||
"fill": {},
|
||||
"id": "inner-circle-8",
|
||||
"name": "inner-circle-8",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 40 20"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-SS-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_buttons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -2,27 +2,23 @@
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"disconnected": true,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"plc": "value",
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"priority_string": "No Active Alarms",
|
||||
"running": false,
|
||||
"searchId": "value",
|
||||
"show_error": false,
|
||||
"show_running": true,
|
||||
"state": 5,
|
||||
"state_string": "Unknown",
|
||||
"visible_status": false
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Off(Inactive)"
|
||||
},
|
||||
"params": {
|
||||
"angle": 0,
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"System/MCM01/Conveyor/UL1_3_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -35,9 +31,6 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -45,7 +38,7 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
|
||||
"expression": "case(\t{value},\r\n\t\t0, True,\r\n\t\t1, True,\r\n\t\t2, {session.custom.alarm_filter.show_running},\r\n\t\t3, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t4, True,\r\n\t\t5, True,\r\n\t\t6, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t7, True,\r\n\t\t8, True,\r\n\t\t9, True,\r\n\t\t13, True,\r\n\t\t14, True,\r\n\t\t61, True,\r\n 131, True,\t\r\n\t\tFalse )",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -59,14 +52,14 @@
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -77,31 +70,7 @@
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
"expression": "{this.custom.covert_mode} \u003e 0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
@ -132,21 +101,57 @@
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 61,
|
||||
"output": 4
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
@ -160,41 +165,87 @@
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"type": "expr"
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 61,
|
||||
"output": "Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 131,
|
||||
"output": "Medium"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.running_status} \u003d 3"
|
||||
"expression": "{view.custom.state} \u003d 1"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -204,36 +255,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.show_error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.show_running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -243,40 +264,12 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
@ -286,19 +279,14 @@
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
|
||||
"expression": "case({view.custom.state},\r\n0, \"Off(Inactive)\",\r\n1, \"Enabled, Not Running\",\r\n2, \"Running\",\r\n3, \"Energy Management\",\r\n4, \"Jammed\",\r\n5, \"Full\",\r\n6, \"Maintenance Mode / Conveyor Stopped In Maintenance Mode\",\r\n7, \"Communication Fault\",\r\n8, \"VFD Fault\",\r\n9, \"E-Stop\",\r\n13,\"Encoder_Fault\",\r\n14,\"Stopped\",\r\n61,\"Conveyor Running In Maintenance Mode\",\r\n131, \"Disconnected\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.visible_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.state} !\u003d 5"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"params.angle": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.directionLeft": {
|
||||
@ -326,265 +314,6 @@
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ErrorStatus",
|
||||
"tooltip": {
|
||||
"style": {
|
||||
"fontSize": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.running_status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({session.custom.alarm_filter.show_running},{value},{value}+\u002700\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].stroke.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.alarm_filter.show_running},2,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.priority"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 32 2 L 62 32 L 32 62 L 2 32 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 38 2 L 57.96 2 L 57.96 2 L 88 32 L 57.96 62 L 57.96 62 L 38 62 L 67.96 32 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": 42,
|
||||
"fontWeight": "bolder"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 20,
|
||||
"y": 44.5
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "0.5 0.5 89 64"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ErrorStatus_Left"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.running_status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({session.custom.alarm_filter.show_running},{value},{value}+\u002700\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].stroke.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.alarm_filter.show_running},2,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.priority"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 56,2 C 66,12 76,22 86,32 76,42 66,52 56,62 46,52 36,42 26,32 36,22 46,12 56,2 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 50,2 C 43.346667,2 36.693333,2 30.04,2 20.026667,12 10.013333,22 0,32 10.013333,42 20.026667,52 30.04,62 36.693333,62 43.346667,62 50,62 40.013333,52 30.026667,42 20.04,32 30.026667,22 40.013333,12 50,2 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": 42,
|
||||
"fontWeight": "bolder",
|
||||
"textOrientation": "upright",
|
||||
"writingMode": "horizontal-tb"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 44.5,
|
||||
"y": 44.5
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "0.5 0.5 89 64"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus"
|
||||
@ -596,37 +325,49 @@
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionLeft},True, False)"
|
||||
"expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.running_status"
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 61, 131,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#00ffd0\", \"#ff8c00\",\r\n \"#0008ff\", \"#946446\", \"#ff0000\", \"#ff0000\", \"#ff0000\", \"#ff8c00\", \"#c2c2c2\", \"#B45C5C\", \"#c2c2c2\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.transform": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)\r\n\t\t\r\n",
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},\"\")",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scaleX(-1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -649,78 +390,13 @@
|
||||
"viewBox": "-1.5 -1.5 73 63"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus_Left"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionLeft},True, False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.running_status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value}, \r\n\t\t1, {session.custom.colours.state0},\r\n\t\t2, {session.custom.colours.state0},\r\n\t\t3, {session.custom.colours.state5},\r\n\t\t\u0027#000000\u0027\r\n\t)\r\n\t\t\r\n",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 70,60 C 56.666667,60 43.333333,60 30,60 20,50 10,40 0,30 10,20 20,10 30,0 43.333333,0 56.666667,0 70,0 60,10 50,20 40,30 50,40 60,50 70,60 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 71 61"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
@ -751,20 +427,6 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.Fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -777,19 +439,19 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
@ -799,24 +461,10 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
@ -834,6 +482,7 @@
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
@ -854,74 +503,13 @@
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"borderColor": "#FF0000",
|
||||
"borderStyle": "none",
|
||||
"borderWidth": "2px",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
|
||||
@ -1,28 +1,20 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"plc": "value",
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"running": false,
|
||||
"priority_string": "Medium",
|
||||
"searchId": "value",
|
||||
"show_error": false,
|
||||
"show_running": true,
|
||||
"state": 5,
|
||||
"state_string": "Unknown",
|
||||
"visible_status": false
|
||||
"state": 0,
|
||||
"state_string": "Disabled",
|
||||
"type": 0
|
||||
},
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"System/D2C/D2C_Chute_1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -35,38 +27,20 @@
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
@ -74,39 +48,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -125,76 +66,25 @@
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
"expression": "if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n if(\r\n {view.custom.state} \u003d 0 || {view.custom.state} \u003d 3,\r\n {view.custom.state},\r\n 0\r\n ),\r\n 0, 0,\r\n 3, 3,\r\n 0\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 {view.custom.state} \u003c\u003d 6,\r\n {view.custom.state},\r\n 0\r\n ),\r\n 0, 0,\r\n 1, 2,\r\n 2, 3,\r\n 3, 3,\r\n 4, 1,\r\n 5, 3,\r\n 6, 3,\r\n 0\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 {view.custom.state} \u003c\u003d 4,\r\n {view.custom.state},\r\n 0\r\n ),\r\n 0, 0,\r\n 1, 2,\r\n 2, 3,\r\n 3, 3,\r\n 4, 1,\r\n 0\r\n ),\r\n 0\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
"expression": "if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Medium\u0027,\r\n 3, \u0027Low\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Medium\u0027,\r\n 1, \u0027No Active Alarms\u0027,\r\n 2, \u0027Low\u0027,\r\n 3, \u0027Low\u0027,\r\n 4, \u0027High\u0027,\r\n 5, \u0027Low\u0027,\r\n 6, \u0027Low\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Medium\u0027,\r\n 1, \u0027No Active Alarms\u0027,\r\n 2, \u0027Low\u0027,\r\n 3, \u0027Low\u0027,\r\n 4, \u0027High\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n \u0027Unknown\u0027\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.running_status} \u003d 3"
|
||||
},
|
||||
"type": "expr"
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tif self.custom.priority not in [1, 2, 3, 4, 5, 6, 0]:\n\t self.custom.priority_string \u003d \"Unknown\""
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -204,36 +94,6 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.show_error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.show_running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -243,40 +103,12 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
@ -286,18 +118,30 @@
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
|
||||
"expression": "if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Disabled\u0027,\r\n 3, \u0027Full\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Disabled\u0027,\r\n 1, \u0027Enabled\u0027,\r\n 2, \u0027Half Full\u0027,\r\n 3, \u0027Full\u0027,\r\n 4, \u0027Jammed\u0027,\r\n 5, \u0027No Container\u0027,\r\n 6, \u0027Ready To Be Enabled\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Disabled\u0027,\r\n 1, \u0027Enabled\u0027,\r\n 2, \u0027Half Full\u0027,\r\n 3, \u0027Full\u0027,\r\n 4, \u0027Jammed\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n \u0027Unknown\u0027\r\n )\r\n )\r\n)"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.visible_status": {
|
||||
"custom.type": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.state} !\u003d 5"
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type"
|
||||
},
|
||||
"type": "expr"
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
@ -326,245 +170,6 @@
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ErrorStatus",
|
||||
"tooltip": {
|
||||
"style": {
|
||||
"fontSize": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].stroke.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.alarm_filter.show_running},2,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.priority"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 32 2 L 62 32 L 32 62 L 2 32 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 38 2 L 57.96 2 L 57.96 2 L 88 32 L 57.96 62 L 57.96 62 L 38 62 L 67.96 32 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": 42,
|
||||
"fontWeight": "bolder"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 20,
|
||||
"y": 44.5
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "0.5 0.5 89 64"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ErrorStatus_Left"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionLeft} \u0026\u0026 {view.custom.show_error}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].stroke.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.alarm_filter.show_running},2,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\t\u0027#000000\u0027),\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.priority"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 56,2 C 66,12 76,22 86,32 76,42 66,52 56,62 46,52 36,42 26,32 36,22 46,12 56,2 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 50,2 C 43.346667,2 36.693333,2 30.04,2 20.026667,12 10.013333,22 0,32 10.013333,42 20.026667,52 30.04,62 36.693333,62 43.346667,62 50,62 40.013333,52 30.026667,42 20.04,32 30.026667,22 40.013333,12 50,2 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": 42,
|
||||
"fontWeight": "bolder",
|
||||
"textOrientation": "upright",
|
||||
"writingMode": "horizontal-tb"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 44.5,
|
||||
"y": 44.5
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "0.5 0.5 89 64"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus"
|
||||
@ -573,14 +178,6 @@
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionLeft},True, False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -594,15 +191,21 @@
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#FFFFFF\",\r\n if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027#c2c2c2\u0027,\r\n 3, \u0027#0000FF\u0027,\r\n \u0027#fff700\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027#c2c2c2\u0027,\r\n 1, \u0027#CCFFCC\u0027,\r\n 2, \u0027#FFFF00\u0027,\r\n 3, \u0027#0000FF\u0027,\r\n 4, \u0027#FF8C00\u0027,\r\n 5, \u0027#FF4487\u0027,\r\n 6, \u0027#92FF00\u0027,\r\n \u0027#fff700\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027#c2c2c2\u0027,\r\n 1, \u0027#CCFFCC\u0027,\r\n 2, \u0027#FFFF00\u0027,\r\n 3, \u0027#0000FF\u0027,\r\n 4, \u0027#FF8C00\u0027,\r\n \u0027#FFFFFF\u0027\r\n ),\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 30 30 Z",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 0 0 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
@ -617,78 +220,17 @@
|
||||
"viewBox": "-1.5 -1.5 73 63"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus_Left"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionLeft},True, False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 70,60 C 56.666667,60 43.333333,60 30,60 20,50 10,40 0,30 10,20 20,10 30,0 43.333333,0 56.666667,0 70,0 60,10 50,20 40,30 50,40 60,50 70,60 Z",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 3
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 71 61"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-SNP\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
@ -707,20 +249,6 @@
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.Fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@ -733,19 +261,19 @@
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
@ -755,132 +283,17 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "solid"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "none"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"borderColor": "#FF0000",
|
||||
"borderWidth": "2px",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
"justify": "center"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
WITH Active AS (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.eventtime,
|
||||
ae.eventid,
|
||||
ae.source,
|
||||
ae.priority,
|
||||
ae.displaypath,
|
||||
TIMESTAMPDIFF(SECOND, ae.eventtime, NOW()) AS duration_seconds
|
||||
FROM alarm_events ae
|
||||
WHERE ae.eventtype = 0
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM alarm_events ae_clear
|
||||
WHERE ae_clear.eventid = ae.eventid
|
||||
AND ae_clear.eventtype = 1
|
||||
)
|
||||
AND ae.displaypath NOT LIKE '%System Startup%'
|
||||
AND ae.source NOT LIKE '%System Startup%'
|
||||
-- Priority filter using FIND_IN_SET for comma-separated values
|
||||
AND (
|
||||
:priorityList IS NULL
|
||||
OR :priorityList = ''
|
||||
OR FIND_IN_SET(ae.priority, :priorityList) > 0
|
||||
)
|
||||
GROUP BY ae.id
|
||||
),
|
||||
SingleMyTag AS (
|
||||
SELECT aed.id, aed.strValue
|
||||
FROM alarm_event_data aed
|
||||
WHERE aed.propname = 'myTag'
|
||||
GROUP BY aed.id
|
||||
)
|
||||
SELECT
|
||||
Active.id AS ID,
|
||||
Active.eventtime AS StartTimestamp,
|
||||
NULL AS EndTimestamp, -- no end time since it's still active
|
||||
CONCAT(
|
||||
LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':',
|
||||
LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':',
|
||||
LPAD(Active.duration_seconds % 60, 2, '0')
|
||||
) AS Duration,
|
||||
CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description,
|
||||
CASE Active.priority
|
||||
WHEN 0 THEN 'Diagnostic'
|
||||
WHEN 1 THEN 'Low'
|
||||
WHEN 2 THEN 'Medium'
|
||||
WHEN 3 THEN 'High'
|
||||
WHEN 4 THEN 'Critical'
|
||||
ELSE 'Unknown'
|
||||
END AS Priority,
|
||||
CONCAT(
|
||||
Active.displaypath,
|
||||
'.HMI.',
|
||||
SUBSTRING_INDEX(aed.strValue, '/', -1)
|
||||
) AS Tag,
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location
,
|
||||
aed.strValue AS FullTag,
|
||||
Active.displaypath as Device
|
||||
FROM Active
|
||||
LEFT JOIN SingleMyTag aed
|
||||
ON aed.id = Active.id
|
||||
ORDER BY Active.eventtime DESC;
|
||||
@ -0,0 +1,31 @@
|
||||
WITH Active AS (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.eventid,
|
||||
ae.priority,
|
||||
aed.strValue
|
||||
FROM alarm_events ae
|
||||
LEFT JOIN alarm_event_data aed ON ae.id = aed.id AND aed.propname = 'myTag'
|
||||
WHERE ae.eventtype = 0
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM alarm_events ae_clear
|
||||
WHERE ae_clear.eventid = ae.eventid
|
||||
AND ae_clear.eventtype = 1
|
||||
)
|
||||
AND ae.displaypath NOT LIKE '%System Startup%'
|
||||
AND ae.source NOT LIKE '%System Startup%'
|
||||
)
|
||||
SELECT
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(strValue, '/', 2), '/', -1) AS Location,
|
||||
CASE priority
|
||||
WHEN 0 THEN 'Diagnostic'
|
||||
WHEN 1 THEN 'Low'
|
||||
WHEN 2 THEN 'Medium'
|
||||
WHEN 3 THEN 'High'
|
||||
WHEN 4 THEN 'Critical'
|
||||
ELSE 'Unknown'
|
||||
END AS Priority,
|
||||
COUNT(*) AS Count
|
||||
FROM Active
|
||||
GROUP BY Location, Priority
|
||||
ORDER BY Location, Priority;
|
||||
@ -0,0 +1,71 @@
|
||||
WITH Active AS (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.eventtime,
|
||||
ae.eventid,
|
||||
ae.source,
|
||||
ae.priority,
|
||||
ae.displaypath,
|
||||
TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds
|
||||
FROM alarm_events ae
|
||||
LEFT JOIN alarm_events ae_clear
|
||||
ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1
|
||||
WHERE ae.eventtype = 0
|
||||
AND ae.displaypath NOT LIKE '%System Startup%'
|
||||
AND ae.source NOT LIKE '%System Startup%'
|
||||
GROUP BY ae.id -- Ensure one row per alarm
|
||||
),
|
||||
SingleMyTag AS (
|
||||
SELECT aed.id, aed.strValue
|
||||
FROM alarm_event_data aed
|
||||
WHERE aed.propname = 'myTag'
|
||||
GROUP BY aed.id -- Collapse duplicates by id
|
||||
),
|
||||
SingleClear AS (
|
||||
SELECT eventid, MIN(eventtime) AS eventtime
|
||||
FROM alarm_events
|
||||
WHERE eventtype = 1
|
||||
GROUP BY eventid
|
||||
)
|
||||
|
||||
SELECT
|
||||
Active.id AS ID,
|
||||
Active.eventtime AS StartTimestamp,
|
||||
Clear.eventtime AS EndTimestamp,
|
||||
|
||||
CONCAT(
|
||||
LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':',
|
||||
LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':',
|
||||
LPAD(Active.duration_seconds % 60, 2, '0')
|
||||
) AS Duration,
|
||||
|
||||
CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description,
|
||||
|
||||
CASE Active.priority
|
||||
WHEN 0 THEN 'Diagnostic'
|
||||
WHEN 1 THEN 'Low'
|
||||
WHEN 2 THEN 'Medium'
|
||||
WHEN 3 THEN 'High'
|
||||
WHEN 4 THEN 'Critical'
|
||||
ELSE 'Unknown'
|
||||
END AS Priority,
|
||||
|
||||
CONCAT(
|
||||
Active.displaypath,
|
||||
'.HMI.',
|
||||
SUBSTRING_INDEX(aed.strValue, '/', -1)
|
||||
) AS Tag,
|
||||
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location
,
|
||||
aed.strValue AS FullTag,
|
||||
Active.displaypath as Device
|
||||
|
||||
FROM Active
|
||||
|
||||
LEFT JOIN SingleClear Clear
|
||||
ON Active.eventid = Clear.eventid
|
||||
|
||||
LEFT JOIN SingleMyTag aed
|
||||
ON aed.id = Active.id
|
||||
|
||||
ORDER BY Active.eventtime DESC;
|
||||
@ -0,0 +1,64 @@
|
||||
SELECT
|
||||
CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description,
|
||||
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location,
|
||||
|
||||
-- Formatted OPC-style tag
|
||||
CONCAT(
|
||||
Active.displaypath,
|
||||
'.HMI.',
|
||||
SUBSTRING_INDEX(aed.strValue, '/', -1)
|
||||
) AS Tag,
|
||||
|
||||
CASE Active.priority
|
||||
WHEN 0 THEN 'Diagnostic'
|
||||
WHEN 1 THEN 'Low'
|
||||
WHEN 2 THEN 'Medium'
|
||||
WHEN 3 THEN 'High'
|
||||
WHEN 4 THEN 'Critical'
|
||||
ELSE 'Unknown'
|
||||
END AS Priority,
|
||||
|
||||
-- First and last seen times for this alarm
|
||||
MIN(Active.eventtime) AS FirstTimestamp,
|
||||
MAX(Active.eventtime) AS LastTimestamp,
|
||||
|
||||
-- Total duration summed from each active-clear pair
|
||||
CONCAT(
|
||||
LPAD(FLOOR(SUM(Active.duration_seconds) / 3600), 2, '0'), ':',
|
||||
LPAD(FLOOR((SUM(Active.duration_seconds) % 3600) / 60), 2, '0'), ':',
|
||||
LPAD(SUM(Active.duration_seconds) % 60, 2, '0')
|
||||
) AS Duration,
|
||||
|
||||
-- Total number of activations
|
||||
COUNT(*) AS Count,
|
||||
|
||||
-- Newly added columns
|
||||
aed.strValue AS FullTag,
|
||||
Active.displaypath AS Device
|
||||
|
||||
FROM (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.source,
|
||||
ae.eventid,
|
||||
ae.eventtime,
|
||||
ae.priority,
|
||||
ae.displaypath,
|
||||
TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds
|
||||
FROM alarm_events ae
|
||||
LEFT JOIN alarm_events ae_clear
|
||||
ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1
|
||||
WHERE ae.eventtype = 0
|
||||
AND ae.displaypath NOT LIKE '%System Startup%'
|
||||
AND ae.source NOT LIKE '%System Startup%'
|
||||
) AS Active
|
||||
|
||||
-- OPC tag path for building .hmi.Tag output
|
||||
LEFT JOIN alarm_event_data aed
|
||||
ON aed.id = Active.id AND aed.propname = 'myTag'
|
||||
|
||||
-- 🔹 Group by the full unique alarm key (tag + alarm name)
|
||||
GROUP BY Active.source, Active.displaypath, aed.strValue
|
||||
|
||||
ORDER BY FirstTimestamp DESC;
|
||||
@ -0,0 +1,49 @@
|
||||
def handleClick(data):
|
||||
if not data or len(data) != 1:
|
||||
return
|
||||
|
||||
row = data[0]
|
||||
clickedTagPath = row.get("FullTag", "")
|
||||
MCM = row.get("Location", "")
|
||||
|
||||
MCM_Pages_Map = {
|
||||
"MCM01": "Detailed-Views/MCM01 Fluid Inbound Merges 1-4",
|
||||
"MCM02": "Detailed-Views/MCM02 Fluid Inbound Merges 5-7",
|
||||
"MCM03": "Detailed-Views/MCM03 Non Con",
|
||||
"MCM04": "Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve",
|
||||
"MCM05": "Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve",
|
||||
"MCM06": "Detailed-Views/MCM06 Non Con",
|
||||
"MCM07": "Detailed-Views/MCM07 Bypass",
|
||||
}
|
||||
|
||||
|
||||
page = MCM_Pages_Map.get(MCM)
|
||||
|
||||
if not page:
|
||||
return
|
||||
|
||||
device = row.get("Device", "")
|
||||
|
||||
if not device or not clickedTagPath:
|
||||
return
|
||||
|
||||
pathToDevice = ""
|
||||
|
||||
# check for the mcm
|
||||
if "MCM" in device:
|
||||
parts = clickedTagPath.split("/")
|
||||
pathToDevice = "/".join(parts[:3])
|
||||
|
||||
else:
|
||||
index = clickedTagPath.find(device)
|
||||
if index == -1:
|
||||
return
|
||||
pathToDevice = clickedTagPath[:index + len(device)]
|
||||
|
||||
priority = row.get("Priority", "")
|
||||
|
||||
#combining with priority
|
||||
combined = pathToDevice + "||" + priority
|
||||
|
||||
# Navigate to target view, passing the tag to highlight
|
||||
system.perspective.navigate(view = page, params = {'highlightTagPath': str(combined)})
|
||||
@ -101,22 +101,16 @@ def set_message_filters(self):
|
||||
def set_time_from_filters(self):
|
||||
"This filter sets the time from for history"
|
||||
time = self.props.value
|
||||
utc_offset = -self.session.props.device.timezone.utcOffset
|
||||
#time = system.date.addHours(time, utc_offset)
|
||||
epoch = system.date.toMillis(time)
|
||||
payload = {}
|
||||
payload["data"] = epoch
|
||||
payload["data"] = time
|
||||
system.perspective.sendMessage("set-from-filters", payload = payload,
|
||||
scope = "page")
|
||||
|
||||
def set_time_to_filters(self):
|
||||
"This filter sets the time to for history"
|
||||
time = self.props.value
|
||||
utc_offset = -self.session.props.device.timezone.utcOffset
|
||||
#time = system.date.addHours(time, utc_offset)
|
||||
epoch = system.date.toMillis(time)
|
||||
payload = {}
|
||||
payload["data"] = epoch
|
||||
payload["data"] = time
|
||||
system.perspective.sendMessage("set-to-filters", payload = payload,
|
||||
scope = "page")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user