diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json index 4d055fc..2122a9c 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json @@ -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": [ diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Diagnostic/style.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Diagnostic/style.json new file mode 100644 index 0000000..bbd0dd7 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Diagnostic/style.json @@ -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)" + } + } + } + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-High/style.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-High/style.json new file mode 100644 index 0000000..1ca57f6 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-High/style.json @@ -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)" + } + } + } + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Low/style.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Low/style.json new file mode 100644 index 0000000..825d919 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Low/style.json @@ -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)" + } + } + } + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Medium/style.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Medium/style.json new file mode 100644 index 0000000..022d5f3 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse-Medium/style.json @@ -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)" + } + } + } + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse/style.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse/style.json new file mode 100644 index 0000000..825d919 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/style-classes/Highlight/Pulse/style.json @@ -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)" + } + } + } + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json index 3f59e8e..21e0b1a 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Alarm-Views/RealTime/view.json @@ -2,63 +2,21 @@ "custom": { "activityLogger": { "alt_pageid": "alarms", + "pageid": "alarms/ActiveAlarms", "start_time": { "$": [ "ts", 192, - 1718118450597 + 1748425447154 ], - "$ts": 1718118450596 + "$ts": 1748425447154 } } }, - "events": { - "system": { - "onShutdown": { - "config": { - "script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" - }, - "scope": "G", - "type": "script" - }, - "onStartup": { - "config": { - "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" - }, - "scope": "G", - "type": "script" - } - } - }, - "params": { - "page_name": "Alarms-RealTime", - "table_type": "value" - }, + "params": {}, "propConfig": { "custom.activityLogger": { "persistent": true - }, - "custom.activityLogger.pageid": { - "binding": { - "config": { - "expression": "{/root/TabContainer.props.currentTabIndex}" - }, - "transforms": [ - { - "code": "\tpageid\u003d self.custom.activityLogger.alt_pageid+\u0027/\u0027+self.getChild(\"root\").getChild(\"TabContainer\").props.tabs[value]\n\treturn pageid.replace(\u0027 \u0027,\u0027\u0027)", - "type": "script" - } - ], - "type": "expr" - } - }, - "params.page_name": { - "paramDirection": "input", - "persistent": true - }, - "params.table_type": { - "paramDirection": "input", - "persistent": true } }, "props": { @@ -79,7 +37,7 @@ "children": [ { "meta": { - "name": "Label" + "name": "Label_0" }, "position": { "basis": "10px" @@ -88,14 +46,13 @@ }, { "custom": { - "Severity": "Critical", "background_on": "false" }, "events": { "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"critical\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpriority \u003d \u0027critical\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"\n\n" }, "scope": "G", "type": "script" @@ -103,11 +60,10 @@ } }, "meta": { - "name": "Button" + "name": "Button_4" }, "position": { - "basis": "125px", - "display": false + "basis": "125px" }, "propConfig": { "props.style.classes": { @@ -144,7 +100,9 @@ "path": "material/error" } }, - "style": {}, + "style": { + "margin": 15 + }, "text": "Critical" }, "scripts": { @@ -162,15 +120,6 @@ }, "type": "ia.input.button" }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, { "custom": { "Severity": "High", @@ -180,7 +129,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"high\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpriority \u003d \u0027high\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" }, "scope": "G", "type": "script" @@ -261,6 +210,15 @@ }, "type": "ia.display.label" }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, { "custom": { "Severity": "Medium", @@ -270,7 +228,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"medium\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpriority \u003d \u0027medium\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" }, "scope": "G", "type": "script" @@ -360,7 +318,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"low\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpriority \u003d \u0027low\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" }, "scope": "G", "type": "script" @@ -443,14 +401,13 @@ }, { "custom": { - "Severity": "Diagnostic", "background_on": "false" }, "events": { "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"\"\n\tbackground \u003d self.custom.background_on\n\tif background \u003d\u003d \"false\":\n\t\tfilter_on \u003d \"true\"\n\t\tself.custom.background_on \u003d \"true\"\n\telse:\n\t\tself.custom.background_on \u003d \"false\"\n\t\tfilter_on \u003d\"false\"\n\tpayload \u003d {\"diagnostic\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpriority \u003d \u0027diagnostic\u0027\n\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" }, "scope": "G", "type": "script" @@ -523,6 +480,25 @@ "type": "ia.input.button" } ], + "custom": { + "priorities": { + "diagnostic": false, + "high": false, + "low": false, + "medium": false + } + }, + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tself.custom.priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t}" + }, + "scope": "G", + "type": "script" + } + } + }, "meta": { "name": "FlexContainer" }, @@ -557,7 +533,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"false\"\n\tpayload[\"reset\"] \u003d filter_on\n\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"false\"\n\tpayload[\"reset\"] \u003d filter_on\n\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\tdefault_priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t \"critical\": False\n\t}\n\tself.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.filter.text \u003d \"\"\n\tself.parent.parent.getChild(\"FlexContainer\").custom.priorities \u003d default_priorities" }, "scope": "G", "type": "script" @@ -617,7 +593,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tpayload[\"export\"] \u003d True\n\tsystem.perspective.sendMessage(\"run-alarm-export\", payload \u003d payload, scope \u003d \"page\")" + "script": "\tfrom datetime import datetime\n\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t \n\t column_order \u003d [\n\t \"ID\",\n\t \"StartTimestamp\", \n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t # CSV header\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes) \n\t \n\t \n\t \n\t\n#\t if data and len(data) \u003e 0:\n#\t for row in data:\n#\t val \u003d row.get(\"value\", {})\n#\t row_data \u003d [\n#\t str(val.get(\"NumberID\", \"\")),\n#\t str(val.get(\"EventTimestamp\", \"\")),\n#\t str(val.get(\"Duration\", \"\")),\n#\t str(val.get(\"Priority\", \"\")),\n#\t str(val.get(\"Description\", \"\")),\n#\t str(val.get(\"Tag\", \"\"))\n#\t ]\n#\t\n#\t # Escape commas for CSV safety\n#\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n#\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n#\t else:\n#\t csv_content +\u003d \"No alarms in current view\\n\"\n#\t\n#\texcept Exception as e:\n#\t system.perspective.print(\"Error during CSV export: \" + str(e))\n#\t csv_content \u003d \"Error exporting alarm data\\n\"\n#\t\n#\t# Convert to bytes and trigger download\n#\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n#\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " }, "scope": "G", "type": "script" @@ -674,186 +650,6 @@ "basis": "10px" }, "type": "ia.display.label" - }, - { - "custom": { - "alarms_to_shelve": [ - { - "style": { - "classes": "Alarms-Styles/Medium" - }, - "value": { - "Alarm_id": { - "value": 13 - }, - "Duration": { - "value": 10495 - }, - "Expiration": { - "value": { - "$": [ - "ts", - 0, - 1704730823344 - ], - "$ts": 0 - } - }, - "Message": { - "value": "Photo eye blocked" - }, - "Priority": { - "value": "3. Medium" - }, - "Shelve": { - "value": false - }, - "SourceId": { - "value": "PLC09/1210_07_44/B830_3" - }, - "State": { - "value": "Active" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 0, - 1704730823344 - ], - "$ts": 1704720394486 - } - }, - "Unshelve": { - "value": false - } - } - } - ] - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tduration \u003d self.props.value\n\tpayload \u003d {}\n\tpayload[\"duration\"] \u003d duration\n\tsystem.perspective.sendMessage(\"shelve-alarms\", payload, scope \u003d \"page\")\n\tself.props.value \u003d None" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "path": "session.custom.fc" - }, - "transforms": [ - { - "code": "\twhid \u003d value.lower()\n\tWHID \u003d value.upper()\n\tsiterole \u003d \u0027Authenticated/Roles/rme-ignition-\u0027+whid+\u0027-alarm-shelving\u0027\n\tSITErole \u003d \u0027Authenticated/Roles/rme-ignition-\u0027+WHID+\u0027-alarm-shelving\u0027\n# Example: rme-ignition-BRS1-alarm-shelving\n\troles \u003d [\u0027Authenticated/Roles/eurme-ignition-admins\u0027, siterole, SITErole]\n\tauth \u003d system.perspective.isAuthorized(False, securityLevels\u003droles)\n\treturn auth", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "options": [ - { - "label": "15 mins", - "value": 15 - }, - { - "label": "30 min", - "value": 30 - }, - { - "label": "45 min", - "value": 45 - }, - { - "label": "1 hr", - "value": 60 - }, - { - "label": "2 hr", - "value": 120 - }, - { - "label": "4 hr", - "value": 240 - }, - { - "label": "8 hr", - "value": 480 - }, - { - "label": "1 Day", - "value": 1440 - }, - { - "label": "2 Days", - "value": 2880 - }, - { - "label": "1 week", - "value": 10080 - }, - { - "label": "2 weeks", - "value": 20160 - }, - { - "label": "Out of Service", - "value": 263000 - } - ], - "placeholder": { - "color": "#000000", - "icon": { - "color": "#000000", - "path": "material/archive", - "style": { - "classes": "" - } - }, - "text": "Shelve" - }, - "search": { - "enabled": false - }, - "showClearIcon": true, - "style": { - "borderBottomLeftRadius": "5px", - "borderBottomRightRadius": "5px", - "borderTopLeftRadius": "5px", - "borderTopRightRadius": "5px", - "classes": "Dropdown/DropDownBox", - "margin": 15 - }, - "value": null - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "alarms-to-shelve", - "pageScope": true, - "script": "\t# implement your handler here\n\tself.custom.alarms_to_shelve \u003d payload", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.dropdown" } ], "meta": { @@ -889,79 +685,978 @@ { "children": [ { - "meta": { - "name": "Label" - }, - "position": { - "basis": "50px" - }, - "propConfig": { - "position.display": { - "binding": { + "events": { + "component": { + "onRowDoubleClick": { "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" + "script": "\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)\n\t\n\t" }, - "type": "expr" + "scope": "G", + "type": "script" } } }, - "props": { - "text": "No Active Alarms", - "textStyle": { - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.display.label" - }, - { "meta": { - "name": "AlarmTable" + "name": "Table" }, "position": { - "basis": "1898px", - "grow": 1 + "basis": "972.9px" }, "propConfig": { - "position.display": { + "custom.priorities": { "binding": { "config": { - "expression": "if({this.props.params.length_of_table_data} \u003e 0, True, False)" + "path": ".../FlexContainer/FlexContainer.custom.priorities" }, - "type": "expr" + "transforms": [ + { + "code": "\t\n\tpriority_to_number \u003d {\n\t \"critical\": 4,\n\t \"high\": 3,\n\t \"medium\": 2,\n\t \"low\": 1,\n\t \"diagnostic\": 0\n\t}\n\t\n\t\n\t# Collect enabled priorities\n\tenabled \u003d [str(priority_to_number[k]) for k, v in value.items() if v]\n\t\n\tresult \u003d \",\".join(enabled)\n\t\n\tif not result:\n\t\treturn \"\"\n\t\n\treturn result\n\t\n", + "type": "script" + } + ], + "type": "property" } - } - }, - "props": { - "params": { - "alarm_states": [ - "Active", - "Not Active" - ], - "length_of_table_data": 0, - "show_filter": true, - "show_severity_column": true, - "show_state_column": true, - "table_type": "Realtime", - "tagProps": [ - "" - ] }, - "path": "Alarm-Views/AlarmTable", - "style": { - "margin": 5 + "props.data": { + "binding": { + "config": { + "parameters": { + "priorityList": "{this.custom.priorities}" + }, + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetActiveAlarms" + }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d [col for col in ds.columnNames if col !\u003d \"EndTimestamp\"]\n\t\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", + "type": "script" + } + ], + "type": "query" + } } }, - "type": "ia.display.view" - }, - { - "meta": { - "name": "Label_0" + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "NumberID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Number (ID)" + }, + "justify": "left", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "StartTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Event Timestamp" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals", + "value": "" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "ascending", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 80 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "FullTag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "emptyMessage": { + "noData": { + "text": "No Active Alarms" + }, + "noFilterResults": { + "text": "No Active Alarms" + } + }, + "filter": { + "enabled": true, + "results": { + "enabled": true + } + }, + "selection": { + "data": [ + { + "Description": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "FL2078_2_VFD1 - Voltage" + }, + "Device": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "FL2078_2_VFD1" + }, + "Duration": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "07:05:16" + }, + "FullTag": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "System/MCM01/Conveyor/FL2078_2_VFD1/Voltage" + }, + "ID": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": 8 + }, + "Location": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "MCM01" + }, + "Priority": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "Diagnostic" + }, + "StartTimestamp": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "$": [ + "ts", + 0, + 1750962272012 + ], + "$ts": 1750936755000 + } + }, + "Tag": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "FL2078_2_VFD1.HMI.Voltage" + } + } + ], + "selectedColumn": "Duration", + "selectedRow": 2 + } }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" + "type": "ia.display.table" } ], "meta": { @@ -991,130 +1686,56 @@ { "children": [ { - "children": [ - { - "custom": { - "alarms_to_shelve": [ - { - "style": { - "classes": "Alarms-Styles/Medium" - }, - "value": { - "Alarm_id": { - "value": 13 - }, - "Duration": { - "value": 10495 - }, - "Expiration": { - "value": { - "$": [ - "ts", - 0, - 1704730823344 - ], - "$ts": 0 - } - }, - "Message": { - "value": "Photo eye blocked" - }, - "Priority": { - "value": "3. Medium" - }, - "Shelve": { - "value": false - }, - "SourceId": { - "value": "PLC09/1210_07_44/B830_3" - }, - "State": { - "value": "Active" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 0, - 1704730823344 - ], - "$ts": 1704720394486 - } - }, - "Unshelve": { - "value": false - } - } - } - ] - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpayload \u003d {}\n\tsystem.perspective.sendMessage(\"unshelve-alarms\", payload, scope \u003d \"page\")" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "153px" - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/archive" - } + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tfrom datetime import datetime\n\t\n\ttry:\n\t data \u003d self.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.data\n\t\n\t column_order \u003d [\n\t \"FirstTimestamp\",\n\t \"LastTimestamp\", \n\t \"Count\",\n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \t\n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \t\n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)" }, - "style": { - "classes": "Dropdown/DropDownBox" - }, - "text": "Unshelve", - "value": "" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "alarms-to-shelve", - "pageScope": true, - "script": "\t# implement your handler here\n\tself.props.enabled \u003d True\n\tself.custom.alarms_to_shelve \u003d payload", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.button" + "scope": "G", + "type": "script" + } } - ], + }, "meta": { - "name": "FlexContainer_0" + "name": "Button_1" }, "position": { - "basis": "450px", - "shrink": 0 + "basis": "120px" }, "props": { + "image": { + "icon": { + "path": "material/import_export" + } + }, + "primary": false, "style": { - "padding": 5 - } + "margin": 15 + }, + "text": "Export" }, - "type": "ia.container.flex" + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" } ], "meta": { "name": "FlexContainer" }, "position": { - "basis": "40px", - "shrink": 0 + "basis": "70px" }, "props": { "alignContent": "flex-start", @@ -1127,45 +1748,998 @@ { "children": [ { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\t\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)" + }, + "scope": "G", + "type": "script" + } + } + }, "meta": { - "name": "Label" + "name": "AlarmsTable" }, "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmTable" - }, - "position": { - "basis": "1898px", + "basis": "1080px", "grow": 1 }, - "props": { - "params": { - "alarm_states": [ - "Shelved" - ], - "length_of_table_data": 0, - "table_type": "Shelved", - "tagProps": [ - "" - ] + "propConfig": { + "props.data": { + "binding": { + "config": { + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetAlarmsWithCount" + }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data\n", + "type": "script" + } + ], + "type": "query" + } }, - "path": "Alarm-Views/AlarmTable" + "props.editingCell": { + "onChange": { + "enabled": null, + "script": "\tall_alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\tshelved_alarms \u003d [alarm for alarm in all_alarms if alarm.isShelved()]\n\t\n\t# Build dataset for table\n\theaders \u003d [\u0027ID\u0027, \u0027StartTimestamp\u0027, \u0027EndTimestamp\u0027, \u0027Duration\u0027, \u0027Description\u0027, \u0027Priority\u0027, \u0027Tag\u0027, \u0027MCM\u0027]\n\tdata \u003d []\n\t\n\tfor alarm in shelved_alarms:\n\t # Calculate duration (time since shelved)\n\t if alarm.activeTime:\n\t duration_ms \u003d system.date.now().getTime() - alarm.activeTime.getTime()\n\t duration_seconds \u003d duration_ms / 1000\n\t hours \u003d int(duration_seconds / 3600)\n\t minutes \u003d int((duration_seconds % 3600) / 60)\n\t seconds \u003d int(duration_seconds % 60)\n\t duration \u003d \"%02d:%02d:%02d\" % (hours, minutes, seconds)\n\t else:\n\t duration \u003d \"00:00:00\"\n\t \n\t # Extract tag name from source\n\t tag_name \u003d alarm.source.split(\u0027/\u0027)[-1] if \u0027/\u0027 in alarm.source else alarm.source\n\t \n\t row \u003d [\n\t str(alarm.id) if hasattr(alarm, \u0027id\u0027) else \u0027\u0027,\n\t alarm.activeTime if alarm.activeTime else system.date.now(),\n\t None, # End timestamp (shelved alarms don\u0027t have end time yet)\n\t duration,\n\t alarm.displayPath if alarm.displayPath else alarm.source,\n\t alarm.priority.name if alarm.priority else \u0027Unknown\u0027,\n\t tag_name,\n\t \u0027System\u0027 # Adjust based on your source format\n\t ]\n\t data.append(row)\n\t\n\t# Create dataset and update the custom property\n\tdataset \u003d system.dataset.toDataSet(headers, data)\n\tself.custom.shelvedAlarmsData \u003d dataset" + } + }, + "props.selection": { + "persistent": true + } }, - "type": "ia.display.view" - }, - { - "meta": { - "name": "Label_0" + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "FirstTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "backgroundColor": "#FFFEFE", + "classes": "" + }, + "title": "First Timestamp" + }, + "justify": "left", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "value", + "dateFormat": "MM-DD-YYYY HH:mm:ss", + "editable": false, + "field": "LastTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Last Timestamp" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "none", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM-DD-YYYY HH:mm:ss", + "editable": false, + "field": "Count", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "none", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "FullTag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "emptyMessage": { + "noData": { + "text": "No Alarms" + }, + "noFilterResults": { + "text": "No Alarms" + } + }, + "filter": { + "enabled": true, + "results": { + "enabled": true + } + }, + "pager": { + "activeOption": 5 + } }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" + "type": "ia.display.table" } ], "meta": { @@ -1179,7 +2753,7 @@ } ], "meta": { - "name": "Shelved tab" + "name": "Hit_List" }, "position": { "tabIndex": 1 @@ -1204,7 +2778,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\tpayload \u003d {}\n\tif self.custom.SetFilter \u003d\u003d True:\n\t\tpayload[\"data\"] \u003d False\n\t\tself.custom.SetFilter \u003d False\n\t\t\n\t\n\telif self.custom.SetFilter \u003d\u003d False:\n\t\tpayload[\"data\"] \u003d True\n\t\tself.custom.SetFilter \u003d True\n\t\n\tsystem.perspective.sendMessage(\"show-historical-filters\", \n\t\t\t\t\t\t\t\t\tpayload \u003d payload, scope \u003d \"page\")\n\t" + "script": "\tpayload \u003d {}\n\tif self.custom.SetFilter \u003d\u003d True:\n\t\tpayload[\"data\"] \u003d False\n\t\tself.custom.SetFilter \u003d False\n\t\t\n\t\n\telif self.custom.SetFilter \u003d\u003d False:\n\t\tpayload[\"data\"] \u003d True\n\t\tself.custom.SetFilter \u003d True\n\t\n\tsystem.perspective.sendMessage(\"show-historical-filters\", payload \u003d payload, scope \u003d \"page\")\n\t" }, "scope": "G", "type": "script" @@ -1277,6 +2851,132 @@ "children": [ { "children": [ + { + "meta": { + "name": "Label_1" + }, + "position": { + "basis": "100px" + }, + "props": { + "style": { + "fontFamily": "Arial", + "fontWeight": "bold", + "textAlign": "center" + }, + "text": "Period:" + }, + "type": "ia.display.label" + }, + { + "custom": { + "customTime": false, + "endDate": { + "$": [ + "ts", + 192, + 1750436956149 + ], + "$ts": 1750436956149 + }, + "startDate": { + "$": [ + "ts", + 192, + 1750436956149 + ], + "$ts": 1750435156149 + } + }, + "meta": { + "name": "Dropdown" + }, + "position": { + "basis": "200px" + }, + "propConfig": { + "props.value": { + "onChange": { + "enabled": null, + "script": "\n\tstart \u003d \"\"\n\tend \u003d \"\"\n\tnow \u003d system.date.now()\n\tpreviousDay \u003d system.date.addDays(now, -1)\n\tvalue \u003d currentValue.value \n\n\tif value \u003d\u003d \"custom\":\n\t\tself.custom.customTime \u003d True\n\t\treturn\n\telif value \u003d\u003d \"currentDay\":\n\t\tstart \u003d system.date.setTime(now, 0, 0, 0)\n\t\tend \u003d now\n\telif value \u003d\u003d \"morning\":\n\t\tstart \u003d system.date.setTime(now, 2, 30, 0)\n\t\tend \u003d system.date.setTime(now, 7, 30, 0)\n\telif value \u003d\u003d \"daylight\":\n\t\tstart \u003d system.date.setTime(now, 7, 30, 0)\n\t\tend \u003d system.date.setTime(now, 13, 0, 0)\n\telif value \u003d\u003d \"twilight\":\n\t\tstart \u003d system.date.setTime(now, 13, 0, 0)\n\t\tend \u003d now\n\telif value \u003d\u003d \"night\":\n\t\tstart \u003d system.date.setTime(previousDay, 18, 30, 0)\n\t\tend \u003d system.date.setTime(previousDay, 23, 30, 0)\n\telif value \u003d\u003d \"wrapDown\":\n\t\tstart \u003d system.date.setTime(previousDay, 23, 30, 0)\n\t\tend \u003d system.date.setTime(now, 2, 30, 0)\n\telif value \u003d\u003d \"currentShot\":\n\t\tstart \u003d system.date.setTime(now, 13, 0, 0)\n\t\tend \u003d now\n\telse:\n\t\tstart \u003d system.date.addMinutes(now, -int(value))\n\t\tend \u003d now\n\n\tself.custom.customTime \u003d False\n\tself.custom.startDate \u003d start\n\tself.custom.endDate \u003d end" + }, + "persistent": false + } + }, + "props": { + "options": [ + { + "label": "Past 30 Min", + "value": 30 + }, + { + "label": "Past Hour", + "value": 60 + }, + { + "label": "Past 2 Hour", + "value": 120 + }, + { + "label": "Past 4 Hour", + "value": 240 + }, + { + "label": "Past 8 Hour", + "value": 480 + }, + { + "label": "Current Day", + "value": "currentDay" + }, + { + "label": "Morning", + "value": "morning" + }, + { + "label": "Daylight", + "value": "daylight" + }, + { + "label": "Twilight", + "value": "twilight" + }, + { + "label": "Night", + "value": "night" + }, + { + "label": "Wrap Down", + "value": "wrapDown" + }, + { + "label": "Current Shot", + "value": "currentShot" + }, + { + "label": "Custom", + "value": "custom" + } + ], + "style": { + "margin": 15 + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.dropdown" + }, { "meta": { "name": "Label" @@ -1290,7 +2990,7 @@ "fontWeight": "bold", "textAlign": "center" }, - "text": "From" + "text": "Start Date" }, "type": "ia.display.label" }, @@ -1319,6 +3019,14 @@ "basis": "200px" }, "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "../Dropdown.custom.customTime" + }, + "type": "property" + } + }, "props.maxDate": { "binding": { "config": { @@ -1335,10 +3043,22 @@ }, "type": "expr" } + }, + "props.value": { + "binding": { + "config": { + "path": "../Dropdown.custom.startDate" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tmessaging.message_handler.set_time_from_filters(self)" + } } }, "props": { - "formattedValue": null, + "formattedValue": "Jun 20, 2025 7:59 PM", "style": { "margin": 15 } @@ -1363,7 +3083,7 @@ "name": "Label_0" }, "position": { - "basis": "61px" + "basis": "89px" }, "props": { "style": { @@ -1371,22 +3091,11 @@ "fontWeight": "bold", "textAlign": "center" }, - "text": "To" + "text": "End Date" }, "type": "ia.display.label" }, { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_time_to_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, "meta": { "name": "DateTimeInput_0" }, @@ -1394,11 +3103,20 @@ "basis": "200px" }, "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "../Dropdown.custom.customTime" + }, + "type": "property" + } + }, "props.maxDate": { "binding": { "config": { "expression": "now()" }, + "enabled": false, "type": "expr" } }, @@ -1411,13 +3129,39 @@ } }, "props.value": { + "binding": { + "config": { + "path": "../Dropdown.custom.endDate" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tmessaging.message_handler.set_time_to_filters(self)" + }, "persistent": true } }, "props": { - "formattedValue": null, + "formattedValue": "Jun 20, 2025 8:29 PM", + "maxDate": { + "$": [ + "ts", + 192, + 1749542669794 + ], + "$ts": 1749715452000 + }, "style": { "margin": 15 + }, + "value": { + "$": [ + "ts", + 201, + 1750436956149 + ], + "$ts": 1750436956149 } }, "scripts": { @@ -1445,2040 +3189,6 @@ }, "type": "ia.container.flex" }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "SourceId" - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_source_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "490px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "multiSelect": true, - "options": [ - { - "label": "_types_/Topics", - "value": "_types_/Topics" - }, - { - "label": "PLC01", - "value": "PLC01" - }, - { - "label": "PLC01/10", - "value": "PLC01/10" - }, - { - "label": "PLC01/10/S0101", - "value": "PLC01/10/S0101" - }, - { - "label": "PLC01/30", - "value": "PLC01/30" - }, - { - "label": "PLC01/30/S0102", - "value": "PLC01/30/S0102" - }, - { - "label": "PLC01/40", - "value": "PLC01/40" - }, - { - "label": "PLC01/50", - "value": "PLC01/50" - }, - { - "label": "PLC01/50/SN0101", - "value": "PLC01/50/SN0101" - }, - { - "label": "PLC01/60", - "value": "PLC01/60" - }, - { - "label": "PLC01/210", - "value": "PLC01/210" - }, - { - "label": "PLC01/220", - "value": "PLC01/220" - }, - { - "label": "PLC01/AIR", - "value": "PLC01/AIR" - }, - { - "label": "PLC01/AIR/B0021", - "value": "PLC01/AIR/B0021" - }, - { - "label": "PLC01/AIR/B0022", - "value": "PLC01/AIR/B0022" - }, - { - "label": "PLC01/P1", - "value": "PLC01/P1" - }, - { - "label": "PLC01/P1/SN0021", - "value": "PLC01/P1/SN0021" - }, - { - "label": "PLC01/S01", - "value": "PLC01/S01" - }, - { - "label": "PLC01/S01/B0111", - "value": "PLC01/S01/B0111" - }, - { - "label": "PLC01/S01/K0041", - "value": "PLC01/S01/K0041" - }, - { - "label": "PLC01/ZM1", - "value": "PLC01/ZM1" - }, - { - "label": "PLC01/ZM1/B0121", - "value": "PLC01/ZM1/B0121" - }, - { - "label": "PLC01/ZM1/B0122", - "value": "PLC01/ZM1/B0122" - }, - { - "label": "PLC01/ZM2", - "value": "PLC01/ZM2" - }, - { - "label": "PLC01/ZM2/B0121", - "value": "PLC01/ZM2/B0121" - }, - { - "label": "PLC01/ZM2/B0122", - "value": "PLC01/ZM2/B0122" - }, - { - "label": "PLC02", - "value": "PLC02" - }, - { - "label": "PLC02/S01", - "value": "PLC02/S01" - }, - { - "label": "PLC02/S01/K0041", - "value": "PLC02/S01/K0041" - }, - { - "label": "PLC02/ZM1", - "value": "PLC02/ZM1" - }, - { - "label": "PLC02/ZM1/B0083", - "value": "PLC02/ZM1/B0083" - }, - { - "label": "PLC02/ZM1/B0121", - "value": "PLC02/ZM1/B0121" - }, - { - "label": "PLC02/ZM1/B0122", - "value": "PLC02/ZM1/B0122" - }, - { - "label": "PLC02/ZM1/U0251", - "value": "PLC02/ZM1/U0251" - }, - { - "label": "PLC02/ZM2", - "value": "PLC02/ZM2" - }, - { - "label": "PLC02/ZM2/B0121", - "value": "PLC02/ZM2/B0121" - }, - { - "label": "PLC02/ZM2/B0122", - "value": "PLC02/ZM2/B0122" - }, - { - "label": "PLC02/ZM2/U0251", - "value": "PLC02/ZM2/U0251" - }, - { - "label": "PLC03", - "value": "PLC03" - }, - { - "label": "PLC03/10", - "value": "PLC03/10" - }, - { - "label": "PLC03/10/S0101", - "value": "PLC03/10/S0101" - }, - { - "label": "PLC03/30", - "value": "PLC03/30" - }, - { - "label": "PLC03/30/S0102", - "value": "PLC03/30/S0102" - }, - { - "label": "PLC03/40", - "value": "PLC03/40" - }, - { - "label": "PLC03/50", - "value": "PLC03/50" - }, - { - "label": "PLC03/50/SN0101", - "value": "PLC03/50/SN0101" - }, - { - "label": "PLC03/60", - "value": "PLC03/60" - }, - { - "label": "PLC03/210", - "value": "PLC03/210" - }, - { - "label": "PLC03/220", - "value": "PLC03/220" - }, - { - "label": "PLC03/AIR", - "value": "PLC03/AIR" - }, - { - "label": "PLC03/AIR/B0021", - "value": "PLC03/AIR/B0021" - }, - { - "label": "PLC03/AIR/B0022", - "value": "PLC03/AIR/B0022" - }, - { - "label": "PLC03/P1", - "value": "PLC03/P1" - }, - { - "label": "PLC03/P1/SN0021", - "value": "PLC03/P1/SN0021" - }, - { - "label": "PLC03/S01", - "value": "PLC03/S01" - }, - { - "label": "PLC03/S01/B0111", - "value": "PLC03/S01/B0111" - }, - { - "label": "PLC03/S01/K0041", - "value": "PLC03/S01/K0041" - }, - { - "label": "PLC03/ZM1", - "value": "PLC03/ZM1" - }, - { - "label": "PLC03/ZM1/B0121", - "value": "PLC03/ZM1/B0121" - }, - { - "label": "PLC03/ZM1/B0122", - "value": "PLC03/ZM1/B0122" - }, - { - "label": "PLC03/ZM2", - "value": "PLC03/ZM2" - }, - { - "label": "PLC03/ZM2/B0121", - "value": "PLC03/ZM2/B0121" - }, - { - "label": "PLC03/ZM2/B0122", - "value": "PLC03/ZM2/B0122" - }, - { - "label": "PLC09", - "value": "PLC09" - }, - { - "label": "PLC09/ASL1", - "value": "PLC09/ASL1" - }, - { - "label": "PLC09/ASL1/ES", - "value": "PLC09/ASL1/ES" - }, - { - "label": "PLC09/ASL2", - "value": "PLC09/ASL2" - }, - { - "label": "PLC09/ASL2/ES", - "value": "PLC09/ASL2/ES" - }, - { - "label": "PLC09/ASL3", - "value": "PLC09/ASL3" - }, - { - "label": "PLC09/ASL3/ES", - "value": "PLC09/ASL3/ES" - }, - { - "label": "PLC09/I1_1", - "value": "PLC09/I1_1" - }, - { - "label": "PLC09/I1_1/ES1", - "value": "PLC09/I1_1/ES1" - }, - { - "label": "PLC09/I1_2", - "value": "PLC09/I1_2" - }, - { - "label": "PLC09/I1_2/ES1", - "value": "PLC09/I1_2/ES1" - }, - { - "label": "PLC09/I1_3", - "value": "PLC09/I1_3" - }, - { - "label": "PLC09/I1_3_4", - "value": "PLC09/I1_3_4" - }, - { - "label": "PLC09/I1_4", - "value": "PLC09/I1_4" - }, - { - "label": "PLC09/I2_1", - "value": "PLC09/I2_1" - }, - { - "label": "PLC09/I2_1/ES1", - "value": "PLC09/I2_1/ES1" - }, - { - "label": "PLC09/I2_2", - "value": "PLC09/I2_2" - }, - { - "label": "PLC09/I2_2/ES1", - "value": "PLC09/I2_2/ES1" - }, - { - "label": "PLC09/I2_3", - "value": "PLC09/I2_3" - }, - { - "label": "PLC09/I2_3_4", - "value": "PLC09/I2_3_4" - }, - { - "label": "PLC09/I2_4", - "value": "PLC09/I2_4" - }, - { - "label": "PLC09/I3_1", - "value": "PLC09/I3_1" - }, - { - "label": "PLC09/I3_1/ES1", - "value": "PLC09/I3_1/ES1" - }, - { - "label": "PLC09/I3_2", - "value": "PLC09/I3_2" - }, - { - "label": "PLC09/I3_2/ES1", - "value": "PLC09/I3_2/ES1" - }, - { - "label": "PLC09/I3_3", - "value": "PLC09/I3_3" - }, - { - "label": "PLC09/I3_3_4", - "value": "PLC09/I3_3_4" - }, - { - "label": "PLC09/I3_4", - "value": "PLC09/I3_4" - }, - { - "label": "PLC09/I4_1", - "value": "PLC09/I4_1" - }, - { - "label": "PLC09/I4_1/ES1", - "value": "PLC09/I4_1/ES1" - }, - { - "label": "PLC09/I4_2", - "value": "PLC09/I4_2" - }, - { - "label": "PLC09/I4_2/ES1", - "value": "PLC09/I4_2/ES1" - }, - { - "label": "PLC09/I4_3", - "value": "PLC09/I4_3" - }, - { - "label": "PLC09/I4_3_4", - "value": "PLC09/I4_3_4" - }, - { - "label": "PLC09/I4_4", - "value": "PLC09/I4_4" - }, - { - "label": "PLC09/INDUCT", - "value": "PLC09/INDUCT" - }, - { - "label": "PLC09/L1_1", - "value": "PLC09/L1_1" - }, - { - "label": "PLC09/L1_1/ES1", - "value": "PLC09/L1_1/ES1" - }, - { - "label": "PLC09/L1_1A", - "value": "PLC09/L1_1A" - }, - { - "label": "PLC09/L1_1B", - "value": "PLC09/L1_1B" - }, - { - "label": "PLC09/L1_2", - "value": "PLC09/L1_2" - }, - { - "label": "PLC09/L1_2_1", - "value": "PLC09/L1_2_1" - }, - { - "label": "PLC09/L1_2_2", - "value": "PLC09/L1_2_2" - }, - { - "label": "PLC09/L1_2_3", - "value": "PLC09/L1_2_3" - }, - { - "label": "PLC09/L1_2_4", - "value": "PLC09/L1_2_4" - }, - { - "label": "PLC09/L1_2_5", - "value": "PLC09/L1_2_5" - }, - { - "label": "PLC09/L1_2_6", - "value": "PLC09/L1_2_6" - }, - { - "label": "PLC09/L1_2_7", - "value": "PLC09/L1_2_7" - }, - { - "label": "PLC09/L1_2_8", - "value": "PLC09/L1_2_8" - }, - { - "label": "PLC09/L1_3_1", - "value": "PLC09/L1_3_1" - }, - { - "label": "PLC09/L1_3_2", - "value": "PLC09/L1_3_2" - }, - { - "label": "PLC09/L1_3_5", - "value": "PLC09/L1_3_5" - }, - { - "label": "PLC09/L1_4_1", - "value": "PLC09/L1_4_1" - }, - { - "label": "PLC09/L1_4_2", - "value": "PLC09/L1_4_2" - }, - { - "label": "PLC09/L1_4_3", - "value": "PLC09/L1_4_3" - }, - { - "label": "PLC09/L1_5_1", - "value": "PLC09/L1_5_1" - }, - { - "label": "PLC09/L1_5_2", - "value": "PLC09/L1_5_2" - }, - { - "label": "PLC09/L1_6", - "value": "PLC09/L1_6" - }, - { - "label": "PLC09/L1_7", - "value": "PLC09/L1_7" - }, - { - "label": "PLC09/L1_7/ES1", - "value": "PLC09/L1_7/ES1" - }, - { - "label": "PLC09/L1_8", - "value": "PLC09/L1_8" - }, - { - "label": "PLC09/L1_8/ES1", - "value": "PLC09/L1_8/ES1" - }, - { - "label": "PLC09/L1_9_1", - "value": "PLC09/L1_9_1" - }, - { - "label": "PLC09/L1_9_2", - "value": "PLC09/L1_9_2" - }, - { - "label": "PLC09/L1_9_10", - "value": "PLC09/L1_9_10" - }, - { - "label": "PLC09/L1_10_1", - "value": "PLC09/L1_10_1" - }, - { - "label": "PLC09/L1_10_2", - "value": "PLC09/L1_10_2" - }, - { - "label": "PLC09/L1_11", - "value": "PLC09/L1_11" - }, - { - "label": "PLC09/L1_11/ES1", - "value": "PLC09/L1_11/ES1" - }, - { - "label": "PLC09/L1_11A", - "value": "PLC09/L1_11A" - }, - { - "label": "PLC09/L1_11B", - "value": "PLC09/L1_11B" - }, - { - "label": "PLC09/L1_11C", - "value": "PLC09/L1_11C" - }, - { - "label": "PLC09/L1_11D", - "value": "PLC09/L1_11D" - }, - { - "label": "PLC09/L1_11E", - "value": "PLC09/L1_11E" - }, - { - "label": "PLC09/L1_11F", - "value": "PLC09/L1_11F" - }, - { - "label": "PLC09/L1_12_1", - "value": "PLC09/L1_12_1" - }, - { - "label": "PLC09/L1_12_2", - "value": "PLC09/L1_12_2" - }, - { - "label": "PLC09/L1_12_3", - "value": "PLC09/L1_12_3" - }, - { - "label": "PLC09/L1_12_4", - "value": "PLC09/L1_12_4" - }, - { - "label": "PLC09/L1_12_15", - "value": "PLC09/L1_12_15" - }, - { - "label": "PLC09/L1_13_1", - "value": "PLC09/L1_13_1" - }, - { - "label": "PLC09/L1_14_1", - "value": "PLC09/L1_14_1" - }, - { - "label": "PLC09/L1_14_2", - "value": "PLC09/L1_14_2" - }, - { - "label": "PLC09/L1_14_3", - "value": "PLC09/L1_14_3" - }, - { - "label": "PLC09/L1_15_1", - "value": "PLC09/L1_15_1" - }, - { - "label": "PLC09/L1_16", - "value": "PLC09/L1_16" - }, - { - "label": "PLC09/L1_16/ES1", - "value": "PLC09/L1_16/ES1" - }, - { - "label": "PLC09/L1_16A", - "value": "PLC09/L1_16A" - }, - { - "label": "PLC09/L1_16B", - "value": "PLC09/L1_16B" - }, - { - "label": "PLC09/L1_17", - "value": "PLC09/L1_17" - }, - { - "label": "PLC09/L1_17_1", - "value": "PLC09/L1_17_1" - }, - { - "label": "PLC09/L1_17_2", - "value": "PLC09/L1_17_2" - }, - { - "label": "PLC09/L1_17_3", - "value": "PLC09/L1_17_3" - }, - { - "label": "PLC09/L1_17_4", - "value": "PLC09/L1_17_4" - }, - { - "label": "PLC09/L1_17_5", - "value": "PLC09/L1_17_5" - }, - { - "label": "PLC09/L1_17_6", - "value": "PLC09/L1_17_6" - }, - { - "label": "PLC09/L1_17_7", - "value": "PLC09/L1_17_7" - }, - { - "label": "PLC09/L1_17_8", - "value": "PLC09/L1_17_8" - }, - { - "label": "PLC09/L1_18_1", - "value": "PLC09/L1_18_1" - }, - { - "label": "PLC09/L1_18_20", - "value": "PLC09/L1_18_20" - }, - { - "label": "PLC09/L1_19_1", - "value": "PLC09/L1_19_1" - }, - { - "label": "PLC09/L1_19_2", - "value": "PLC09/L1_19_2" - }, - { - "label": "PLC09/L1_19_3", - "value": "PLC09/L1_19_3" - }, - { - "label": "PLC09/L1_20_1", - "value": "PLC09/L1_20_1" - }, - { - "label": "PLC09/L1_21", - "value": "PLC09/L1_21" - }, - { - "label": "PLC09/L1_21A", - "value": "PLC09/L1_21A" - }, - { - "label": "PLC09/L1_21A_1", - "value": "PLC09/L1_21A_1" - }, - { - "label": "PLC09/L1_21A_2", - "value": "PLC09/L1_21A_2" - }, - { - "label": "PLC09/L1_21A_3", - "value": "PLC09/L1_21A_3" - }, - { - "label": "PLC09/L1_21A_4", - "value": "PLC09/L1_21A_4" - }, - { - "label": "PLC09/L1_21A_5", - "value": "PLC09/L1_21A_5" - }, - { - "label": "PLC09/L1_21A_6", - "value": "PLC09/L1_21A_6" - }, - { - "label": "PLC09/L1_21A_7", - "value": "PLC09/L1_21A_7" - }, - { - "label": "PLC09/L1_21A_8", - "value": "PLC09/L1_21A_8" - }, - { - "label": "PLC09/L1_21A_9", - "value": "PLC09/L1_21A_9" - }, - { - "label": "PLC09/L1_21A_10", - "value": "PLC09/L1_21A_10" - }, - { - "label": "PLC09/L1_21B", - "value": "PLC09/L1_21B" - }, - { - "label": "PLC09/L1_21B_1", - "value": "PLC09/L1_21B_1" - }, - { - "label": "PLC09/L1_21B_2", - "value": "PLC09/L1_21B_2" - }, - { - "label": "PLC09/L1_21B_3", - "value": "PLC09/L1_21B_3" - }, - { - "label": "PLC09/L1_21B_4", - "value": "PLC09/L1_21B_4" - }, - { - "label": "PLC09/L1_21B_5", - "value": "PLC09/L1_21B_5" - }, - { - "label": "PLC09/L1_21B_6", - "value": "PLC09/L1_21B_6" - }, - { - "label": "PLC09/L1_21B_7", - "value": "PLC09/L1_21B_7" - }, - { - "label": "PLC09/L1_21B_8", - "value": "PLC09/L1_21B_8" - }, - { - "label": "PLC09/L1_21B_9", - "value": "PLC09/L1_21B_9" - }, - { - "label": "PLC09/L1_21B_10", - "value": "PLC09/L1_21B_10" - }, - { - "label": "PLC09/L1_22", - "value": "PLC09/L1_22" - }, - { - "label": "PLC09/L1_22/ES1", - "value": "PLC09/L1_22/ES1" - }, - { - "label": "PLC09/L1_22/ES2", - "value": "PLC09/L1_22/ES2" - }, - { - "label": "PLC09/L1_24", - "value": "PLC09/L1_24" - }, - { - "label": "PLC09/L1_24_1", - "value": "PLC09/L1_24_1" - }, - { - "label": "PLC09/L1_24_2", - "value": "PLC09/L1_24_2" - }, - { - "label": "PLC09/L1_24_3", - "value": "PLC09/L1_24_3" - }, - { - "label": "PLC09/L1_24_4", - "value": "PLC09/L1_24_4" - }, - { - "label": "PLC09/L1_24_5", - "value": "PLC09/L1_24_5" - }, - { - "label": "PLC09/L1_24_6", - "value": "PLC09/L1_24_6" - }, - { - "label": "PLC09/L1_24_7", - "value": "PLC09/L1_24_7" - }, - { - "label": "PLC09/L1_25", - "value": "PLC09/L1_25" - }, - { - "label": "PLC09/L1_25/ES1", - "value": "PLC09/L1_25/ES1" - }, - { - "label": "PLC09/L1_25/ES2", - "value": "PLC09/L1_25/ES2" - }, - { - "label": "PLC09/L1_25A", - "value": "PLC09/L1_25A" - }, - { - "label": "PLC09/L1_25B", - "value": "PLC09/L1_25B" - }, - { - "label": "PLC09/L1_25C", - "value": "PLC09/L1_25C" - }, - { - "label": "PLC09/L1_25D", - "value": "PLC09/L1_25D" - }, - { - "label": "PLC09/L1_25E", - "value": "PLC09/L1_25E" - }, - { - "label": "PLC09/L2_1A", - "value": "PLC09/L2_1A" - }, - { - "label": "PLC09/L2_1B", - "value": "PLC09/L2_1B" - }, - { - "label": "PLC09/L2_2", - "value": "PLC09/L2_2" - }, - { - "label": "PLC09/L2_2_1", - "value": "PLC09/L2_2_1" - }, - { - "label": "PLC09/L2_2_2", - "value": "PLC09/L2_2_2" - }, - { - "label": "PLC09/L2_2_3", - "value": "PLC09/L2_2_3" - }, - { - "label": "PLC09/L2_2_4", - "value": "PLC09/L2_2_4" - }, - { - "label": "PLC09/L2_2_5", - "value": "PLC09/L2_2_5" - }, - { - "label": "PLC09/L2_2_6", - "value": "PLC09/L2_2_6" - }, - { - "label": "PLC09/L2_2_7", - "value": "PLC09/L2_2_7" - }, - { - "label": "PLC09/L2_2_8", - "value": "PLC09/L2_2_8" - }, - { - "label": "PLC09/L2_3_1", - "value": "PLC09/L2_3_1" - }, - { - "label": "PLC09/L2_3_2", - "value": "PLC09/L2_3_2" - }, - { - "label": "PLC09/L2_3_4_5", - "value": "PLC09/L2_3_4_5" - }, - { - "label": "PLC09/L2_3_5", - "value": "PLC09/L2_3_5" - }, - { - "label": "PLC09/L2_4_1", - "value": "PLC09/L2_4_1" - }, - { - "label": "PLC09/L2_4_2", - "value": "PLC09/L2_4_2" - }, - { - "label": "PLC09/L2_4_3", - "value": "PLC09/L2_4_3" - }, - { - "label": "PLC09/L2_4_4", - "value": "PLC09/L2_4_4" - }, - { - "label": "PLC09/L2_4_6", - "value": "PLC09/L2_4_6" - }, - { - "label": "PLC09/L2_4_7", - "value": "PLC09/L2_4_7" - }, - { - "label": "PLC09/L2_4_8", - "value": "PLC09/L2_4_8" - }, - { - "label": "PLC09/L2_5", - "value": "PLC09/L2_5" - }, - { - "label": "PLC09/L2_5/ES1", - "value": "PLC09/L2_5/ES1" - }, - { - "label": "PLC09/L2_5_1", - "value": "PLC09/L2_5_1" - }, - { - "label": "PLC09/L2_5_2", - "value": "PLC09/L2_5_2" - }, - { - "label": "PLC09/L2_6", - "value": "PLC09/L2_6" - }, - { - "label": "PLC09/L2_7", - "value": "PLC09/L2_7" - }, - { - "label": "PLC09/L2_8", - "value": "PLC09/L2_8" - }, - { - "label": "PLC09/L2_9", - "value": "PLC09/L2_9" - }, - { - "label": "PLC09/L2_9/ES1", - "value": "PLC09/L2_9/ES1" - }, - { - "label": "PLC09/L2_10_1", - "value": "PLC09/L2_10_1" - }, - { - "label": "PLC09/L2_10_2", - "value": "PLC09/L2_10_2" - }, - { - "label": "PLC09/L2_10_3", - "value": "PLC09/L2_10_3" - }, - { - "label": "PLC09/L2_10_4", - "value": "PLC09/L2_10_4" - }, - { - "label": "PLC09/L2_10_11", - "value": "PLC09/L2_10_11" - }, - { - "label": "PLC09/L2_11_1", - "value": "PLC09/L2_11_1" - }, - { - "label": "PLC09/L2_11_2", - "value": "PLC09/L2_11_2" - }, - { - "label": "PLC09/L2_12", - "value": "PLC09/L2_12" - }, - { - "label": "PLC09/L2_12/ES1", - "value": "PLC09/L2_12/ES1" - }, - { - "label": "PLC09/L2_12A", - "value": "PLC09/L2_12A" - }, - { - "label": "PLC09/L2_12B", - "value": "PLC09/L2_12B" - }, - { - "label": "PLC09/L2_13", - "value": "PLC09/L2_13" - }, - { - "label": "PLC09/L2_13_1", - "value": "PLC09/L2_13_1" - }, - { - "label": "PLC09/L2_13_2", - "value": "PLC09/L2_13_2" - }, - { - "label": "PLC09/L2_13_3", - "value": "PLC09/L2_13_3" - }, - { - "label": "PLC09/L2_13_4", - "value": "PLC09/L2_13_4" - }, - { - "label": "PLC09/L2_13_5", - "value": "PLC09/L2_13_5" - }, - { - "label": "PLC09/L2_13_6", - "value": "PLC09/L2_13_6" - }, - { - "label": "PLC09/L2_13_7", - "value": "PLC09/L2_13_7" - }, - { - "label": "PLC09/L2_13_8", - "value": "PLC09/L2_13_8" - }, - { - "label": "PLC09/L2_14_1", - "value": "PLC09/L2_14_1" - }, - { - "label": "PLC09/L2_14_16", - "value": "PLC09/L2_14_16" - }, - { - "label": "PLC09/L2_15_1", - "value": "PLC09/L2_15_1" - }, - { - "label": "PLC09/L2_15_2", - "value": "PLC09/L2_15_2" - }, - { - "label": "PLC09/L2_15_3", - "value": "PLC09/L2_15_3" - }, - { - "label": "PLC09/L2_16_1", - "value": "PLC09/L2_16_1" - }, - { - "label": "PLC09/L2_17", - "value": "PLC09/L2_17" - }, - { - "label": "PLC09/L2_17A", - "value": "PLC09/L2_17A" - }, - { - "label": "PLC09/L2_17A_1", - "value": "PLC09/L2_17A_1" - }, - { - "label": "PLC09/L2_17A_2", - "value": "PLC09/L2_17A_2" - }, - { - "label": "PLC09/L2_17A_3", - "value": "PLC09/L2_17A_3" - }, - { - "label": "PLC09/L2_17A_4", - "value": "PLC09/L2_17A_4" - }, - { - "label": "PLC09/L2_17A_5", - "value": "PLC09/L2_17A_5" - }, - { - "label": "PLC09/L2_17A_6", - "value": "PLC09/L2_17A_6" - }, - { - "label": "PLC09/L2_17A_7", - "value": "PLC09/L2_17A_7" - }, - { - "label": "PLC09/L2_17A_8", - "value": "PLC09/L2_17A_8" - }, - { - "label": "PLC09/L2_17A_9", - "value": "PLC09/L2_17A_9" - }, - { - "label": "PLC09/L2_17A_10", - "value": "PLC09/L2_17A_10" - }, - { - "label": "PLC09/L2_17B", - "value": "PLC09/L2_17B" - }, - { - "label": "PLC09/L2_17B_1", - "value": "PLC09/L2_17B_1" - }, - { - "label": "PLC09/L2_17B_2", - "value": "PLC09/L2_17B_2" - }, - { - "label": "PLC09/L2_17B_3", - "value": "PLC09/L2_17B_3" - }, - { - "label": "PLC09/L2_17B_4", - "value": "PLC09/L2_17B_4" - }, - { - "label": "PLC09/L2_17B_5", - "value": "PLC09/L2_17B_5" - }, - { - "label": "PLC09/L2_17B_6", - "value": "PLC09/L2_17B_6" - }, - { - "label": "PLC09/L2_17B_7", - "value": "PLC09/L2_17B_7" - }, - { - "label": "PLC09/L2_17B_8", - "value": "PLC09/L2_17B_8" - }, - { - "label": "PLC09/L2_17B_9", - "value": "PLC09/L2_17B_9" - }, - { - "label": "PLC09/L2_17B_10", - "value": "PLC09/L2_17B_10" - }, - { - "label": "PLC09/L2_18", - "value": "PLC09/L2_18" - }, - { - "label": "PLC09/L2_18/ES1", - "value": "PLC09/L2_18/ES1" - }, - { - "label": "PLC09/L2_18/ES2", - "value": "PLC09/L2_18/ES2" - }, - { - "label": "PLC09/L2_20", - "value": "PLC09/L2_20" - }, - { - "label": "PLC09/L2_20_1", - "value": "PLC09/L2_20_1" - }, - { - "label": "PLC09/L2_20_2", - "value": "PLC09/L2_20_2" - }, - { - "label": "PLC09/L2_20_3", - "value": "PLC09/L2_20_3" - }, - { - "label": "PLC09/L2_20_4", - "value": "PLC09/L2_20_4" - }, - { - "label": "PLC09/L2_20_5", - "value": "PLC09/L2_20_5" - }, - { - "label": "PLC09/L2_20_6", - "value": "PLC09/L2_20_6" - }, - { - "label": "PLC09/L2_20_7", - "value": "PLC09/L2_20_7" - }, - { - "label": "PLC09/L2_20_8", - "value": "PLC09/L2_20_8" - }, - { - "label": "PLC09/L2_21", - "value": "PLC09/L2_21" - }, - { - "label": "PLC09/L2_21/ES1", - "value": "PLC09/L2_21/ES1" - }, - { - "label": "PLC09/L2_21/ES2", - "value": "PLC09/L2_21/ES2" - }, - { - "label": "PLC09/L2_21A", - "value": "PLC09/L2_21A" - }, - { - "label": "PLC09/L2_21B", - "value": "PLC09/L2_21B" - }, - { - "label": "PLC09/L2_21C", - "value": "PLC09/L2_21C" - }, - { - "label": "PLC09/L2_21D", - "value": "PLC09/L2_21D" - }, - { - "label": "PLC09/L2_21E", - "value": "PLC09/L2_21E" - }, - { - "label": "PLC09/L3_1", - "value": "PLC09/L3_1" - }, - { - "label": "PLC09/L3_1/ES1", - "value": "PLC09/L3_1/ES1" - }, - { - "label": "PLC09/L3_1A", - "value": "PLC09/L3_1A" - }, - { - "label": "PLC09/L3_1B", - "value": "PLC09/L3_1B" - }, - { - "label": "PLC09/L3_2", - "value": "PLC09/L3_2" - }, - { - "label": "PLC09/L3_2_1", - "value": "PLC09/L3_2_1" - }, - { - "label": "PLC09/L3_2_2", - "value": "PLC09/L3_2_2" - }, - { - "label": "PLC09/L3_2_3", - "value": "PLC09/L3_2_3" - }, - { - "label": "PLC09/L3_2_4", - "value": "PLC09/L3_2_4" - }, - { - "label": "PLC09/L3_2_5", - "value": "PLC09/L3_2_5" - }, - { - "label": "PLC09/L3_2_6", - "value": "PLC09/L3_2_6" - }, - { - "label": "PLC09/L3_2_7", - "value": "PLC09/L3_2_7" - }, - { - "label": "PLC09/L3_2_8", - "value": "PLC09/L3_2_8" - }, - { - "label": "PLC09/L3_3_1", - "value": "PLC09/L3_3_1" - }, - { - "label": "PLC09/L3_3_2", - "value": "PLC09/L3_3_2" - }, - { - "label": "PLC09/L3_3_5", - "value": "PLC09/L3_3_5" - }, - { - "label": "PLC09/L3_4", - "value": "PLC09/L3_4" - }, - { - "label": "PLC09/L3_4/ES1", - "value": "PLC09/L3_4/ES1" - }, - { - "label": "PLC09/L3_4_1", - "value": "PLC09/L3_4_1" - }, - { - "label": "PLC09/L3_5_1", - "value": "PLC09/L3_5_1" - }, - { - "label": "PLC09/L3_5_2", - "value": "PLC09/L3_5_2" - }, - { - "label": "PLC09/L3_6", - "value": "PLC09/L3_6" - }, - { - "label": "PLC09/L3_7", - "value": "PLC09/L3_7" - }, - { - "label": "PLC09/L3_7/ES1", - "value": "PLC09/L3_7/ES1" - }, - { - "label": "PLC09/L3_8", - "value": "PLC09/L3_8" - }, - { - "label": "PLC09/L3_8/ES1", - "value": "PLC09/L3_8/ES1" - }, - { - "label": "PLC09/L3_9", - "value": "PLC09/L3_9" - }, - { - "label": "PLC09/L3_9_1", - "value": "PLC09/L3_9_1" - }, - { - "label": "PLC09/L3_9_2", - "value": "PLC09/L3_9_2" - }, - { - "label": "PLC09/L3_9_3", - "value": "PLC09/L3_9_3" - }, - { - "label": "PLC09/L3_9_4", - "value": "PLC09/L3_9_4" - }, - { - "label": "PLC09/L3_9_5", - "value": "PLC09/L3_9_5" - }, - { - "label": "PLC09/L3_9_6", - "value": "PLC09/L3_9_6" - }, - { - "label": "PLC09/L3_9_7", - "value": "PLC09/L3_9_7" - }, - { - "label": "PLC09/L3_10_1", - "value": "PLC09/L3_10_1" - }, - { - "label": "PLC09/L3_10_2", - "value": "PLC09/L3_10_2" - }, - { - "label": "PLC09/L3_10_11", - "value": "PLC09/L3_10_11" - }, - { - "label": "PLC09/L3_11", - "value": "PLC09/L3_11" - }, - { - "label": "PLC09/L3_11/ES1", - "value": "PLC09/L3_11/ES1" - }, - { - "label": "PLC09/L3_11_1", - "value": "PLC09/L3_11_1" - }, - { - "label": "PLC09/L3_11_2", - "value": "PLC09/L3_11_2" - }, - { - "label": "PLC09/L3_11_3", - "value": "PLC09/L3_11_3" - }, - { - "label": "PLC09/L3_11_4", - "value": "PLC09/L3_11_4" - }, - { - "label": "PLC09/L3_12", - "value": "PLC09/L3_12" - }, - { - "label": "PLC09/L3_12/ES1", - "value": "PLC09/L3_12/ES1" - }, - { - "label": "PLC09/L3_12A", - "value": "PLC09/L3_12A" - }, - { - "label": "PLC09/L3_12B", - "value": "PLC09/L3_12B" - }, - { - "label": "PLC09/L3_12C", - "value": "PLC09/L3_12C" - }, - { - "label": "PLC09/L4_1A", - "value": "PLC09/L4_1A" - }, - { - "label": "PLC09/L4_1B", - "value": "PLC09/L4_1B" - }, - { - "label": "PLC09/L4_2", - "value": "PLC09/L4_2" - }, - { - "label": "PLC09/L4_2_1", - "value": "PLC09/L4_2_1" - }, - { - "label": "PLC09/L4_2_2", - "value": "PLC09/L4_2_2" - }, - { - "label": "PLC09/L4_2_3", - "value": "PLC09/L4_2_3" - }, - { - "label": "PLC09/L4_2_4", - "value": "PLC09/L4_2_4" - }, - { - "label": "PLC09/L4_2_5", - "value": "PLC09/L4_2_5" - }, - { - "label": "PLC09/L4_2_6", - "value": "PLC09/L4_2_6" - }, - { - "label": "PLC09/L4_2_7", - "value": "PLC09/L4_2_7" - }, - { - "label": "PLC09/L4_2_8", - "value": "PLC09/L4_2_8" - }, - { - "label": "PLC09/L4_3_1", - "value": "PLC09/L4_3_1" - }, - { - "label": "PLC09/L4_3_2", - "value": "PLC09/L4_3_2" - }, - { - "label": "PLC09/L4_3_5", - "value": "PLC09/L4_3_5" - }, - { - "label": "PLC09/L4_4_1", - "value": "PLC09/L4_4_1" - }, - { - "label": "PLC09/L4_4_2", - "value": "PLC09/L4_4_2" - }, - { - "label": "PLC09/L4_5_1", - "value": "PLC09/L4_5_1" - }, - { - "label": "PLC09/L4_5_2", - "value": "PLC09/L4_5_2" - }, - { - "label": "PLC09/L4_6", - "value": "PLC09/L4_6" - }, - { - "label": "PLC09/L4_6/ES1", - "value": "PLC09/L4_6/ES1" - }, - { - "label": "PLC09/L4_7", - "value": "PLC09/L4_7" - }, - { - "label": "PLC09/L4_8", - "value": "PLC09/L4_8" - }, - { - "label": "PLC09/L4_8/ES1", - "value": "PLC09/L4_8/ES1" - }, - { - "label": "PLC09/L4_8/ES2", - "value": "PLC09/L4_8/ES2" - }, - { - "label": "PLC09/L4_9", - "value": "PLC09/L4_9" - }, - { - "label": "PLC09/L4_9/ES1", - "value": "PLC09/L4_9/ES1" - }, - { - "label": "PLC09/L4_10_1", - "value": "PLC09/L4_10_1" - }, - { - "label": "PLC09/L4_10_2", - "value": "PLC09/L4_10_2" - }, - { - "label": "PLC09/L4_10_3", - "value": "PLC09/L4_10_3" - }, - { - "label": "PLC09/L4_10_4", - "value": "PLC09/L4_10_4" - }, - { - "label": "PLC09/L4_10_5", - "value": "PLC09/L4_10_5" - }, - { - "label": "PLC09/L4_10_6", - "value": "PLC09/L4_10_6" - }, - { - "label": "PLC09/L4_10_7", - "value": "PLC09/L4_10_7" - }, - { - "label": "PLC09/L4_10_8", - "value": "PLC09/L4_10_8" - }, - { - "label": "PLC09/L4_10_11", - "value": "PLC09/L4_10_11" - }, - { - "label": "PLC09/L4_11", - "value": "PLC09/L4_11" - }, - { - "label": "PLC09/L4_11/ES1", - "value": "PLC09/L4_11/ES1" - }, - { - "label": "PLC09/L4_11_1", - "value": "PLC09/L4_11_1" - }, - { - "label": "PLC09/L4_11_2", - "value": "PLC09/L4_11_2" - }, - { - "label": "PLC09/L4_12", - "value": "PLC09/L4_12" - }, - { - "label": "PLC09/L4_12/ES1", - "value": "PLC09/L4_12/ES1" - }, - { - "label": "PLC09/L4_12A", - "value": "PLC09/L4_12A" - }, - { - "label": "PLC09/L4_12B", - "value": "PLC09/L4_12B" - }, - { - "label": "PLC09/L4_12C", - "value": "PLC09/L4_12C" - }, - { - "label": "PLC09/L4_12D", - "value": "PLC09/L4_12D" - }, - { - "label": "PLC09/L4_12E", - "value": "PLC09/L4_12E" - }, - { - "label": "PLC09/L4_12F", - "value": "PLC09/L4_12F" - }, - { - "label": "PLC09/L4_13", - "value": "PLC09/L4_13" - }, - { - "label": "PLC09/L4_13_1", - "value": "PLC09/L4_13_1" - }, - { - "label": "PLC09/L4_13_2", - "value": "PLC09/L4_13_2" - }, - { - "label": "PLC09/L4_13_3", - "value": "PLC09/L4_13_3" - }, - { - "label": "PLC09/L4_13_4", - "value": "PLC09/L4_13_4" - }, - { - "label": "PLC09/L4_14", - "value": "PLC09/L4_14" - }, - { - "label": "PLC09/L4_14/ES1", - "value": "PLC09/L4_14/ES1" - }, - { - "label": "PLC09/L4_14A", - "value": "PLC09/L4_14A" - }, - { - "label": "PLC09/L4_14B", - "value": "PLC09/L4_14B" - }, - { - "label": "PLC09/L5_1", - "value": "PLC09/L5_1" - }, - { - "label": "PLC09/L5_2", - "value": "PLC09/L5_2" - }, - { - "label": "PLC09/L5_3", - "value": "PLC09/L5_3" - }, - { - "label": "PLC09/L5_3_1", - "value": "PLC09/L5_3_1" - }, - { - "label": "PLC09/L5_3_2", - "value": "PLC09/L5_3_2" - }, - { - "label": "PLC09/L5_3_3", - "value": "PLC09/L5_3_3" - }, - { - "label": "PLC09/L5_3_5", - "value": "PLC09/L5_3_5" - }, - { - "label": "PLC09/L5_3_6", - "value": "PLC09/L5_3_6" - }, - { - "label": "PLC09/L5_3_7", - "value": "PLC09/L5_3_7" - }, - { - "label": "PLC09/L5_3_8", - "value": "PLC09/L5_3_8" - }, - { - "label": "PLC09/L5_4", - "value": "PLC09/L5_4" - }, - { - "label": "PLC09/L5_4/ES1", - "value": "PLC09/L5_4/ES1" - }, - { - "label": "PLC09/L5_4/ES2", - "value": "PLC09/L5_4/ES2" - }, - { - "label": "PLC09/L5_4A", - "value": "PLC09/L5_4A" - }, - { - "label": "PLC09/L5_4B", - "value": "PLC09/L5_4B" - }, - { - "label": "PLC09/L5_4C", - "value": "PLC09/L5_4C" - }, - { - "label": "PLC09/L5_4D", - "value": "PLC09/L5_4D" - }, - { - "label": "PLC09/L5_4E", - "value": "PLC09/L5_4E" - }, - { - "label": "PLC09/L6_1", - "value": "PLC09/L6_1" - }, - { - "label": "PLC09/L6_2", - "value": "PLC09/L6_2" - }, - { - "label": "PLC09/L6_3", - "value": "PLC09/L6_3" - }, - { - "label": "PLC09/L6_3_1", - "value": "PLC09/L6_3_1" - }, - { - "label": "PLC09/L6_3_2", - "value": "PLC09/L6_3_2" - }, - { - "label": "PLC09/L6_3_3", - "value": "PLC09/L6_3_3" - }, - { - "label": "PLC09/L6_3_4", - "value": "PLC09/L6_3_4" - }, - { - "label": "PLC09/L6_3_5", - "value": "PLC09/L6_3_5" - }, - { - "label": "PLC09/L6_3_6", - "value": "PLC09/L6_3_6" - }, - { - "label": "PLC09/L6_3_7", - "value": "PLC09/L6_3_7" - }, - { - "label": "PLC09/L6_3_8", - "value": "PLC09/L6_3_8" - }, - { - "label": "PLC09/L6_4", - "value": "PLC09/L6_4" - }, - { - "label": "PLC09/L6_4/ES1", - "value": "PLC09/L6_4/ES1" - }, - { - "label": "PLC09/L6_4/ES2", - "value": "PLC09/L6_4/ES2" - }, - { - "label": "PLC09/L6_4A", - "value": "PLC09/L6_4A" - }, - { - "label": "PLC09/L6_4B", - "value": "PLC09/L6_4B" - }, - { - "label": "PLC09/L6_4C", - "value": "PLC09/L6_4C" - }, - { - "label": "PLC09/L6_4D", - "value": "PLC09/L6_4D" - }, - { - "label": "PLC09/L6_4E", - "value": "PLC09/L6_4E" - }, - { - "label": "PLC09/LINE_1", - "value": "PLC09/LINE_1" - }, - { - "label": "PLC09/LINE_2", - "value": "PLC09/LINE_2" - }, - { - "label": "PLC09/LINE_3", - "value": "PLC09/LINE_3" - }, - { - "label": "PLC09/LINE_4", - "value": "PLC09/LINE_4" - }, - { - "label": "PLC09/MP1", - "value": "PLC09/MP1" - }, - { - "label": "PLC09/MP1/ES1", - "value": "PLC09/MP1/ES1" - }, - { - "label": "PLC09/RP1", - "value": "PLC09/RP1" - }, - { - "label": "PLC09/RP1/ES1", - "value": "PLC09/RP1/ES1" - }, - { - "label": "PLC09/RP2", - "value": "PLC09/RP2" - }, - { - "label": "PLC09/RP2/ES1", - "value": "PLC09/RP2/ES1" - }, - { - "label": "PLC09/SAFETY MONITOR", - "value": "PLC09/SAFETY MONITOR" - }, - { - "label": "PLC09/SAFETY MONITOR/RELAY", - "value": "PLC09/SAFETY MONITOR/RELAY" - }, - { - "label": "PLC09/T1", - "value": "PLC09/T1" - }, - { - "label": "PLC09/T1_1", - "value": "PLC09/T1_1" - }, - { - "label": "PLC09/T1_2", - "value": "PLC09/T1_2" - }, - { - "label": "PLC09/T1_3", - "value": "PLC09/T1_3" - }, - { - "label": "PLC09/T1_4", - "value": "PLC09/T1_4" - }, - { - "label": "PLC09/T1_5", - "value": "PLC09/T1_5" - }, - { - "label": "PLC09/T1_6", - "value": "PLC09/T1_6" - }, - { - "label": "PLC09/T2", - "value": "PLC09/T2" - }, - { - "label": "PLC09/T2_", - "value": "PLC09/T2_" - }, - { - "label": "PLC09/T2_1", - "value": "PLC09/T2_1" - }, - { - "label": "PLC09/T2_2", - "value": "PLC09/T2_2" - }, - { - "label": "PLC09/T2_3", - "value": "PLC09/T2_3" - }, - { - "label": "PLC09/T2_4", - "value": "PLC09/T2_4" - }, - { - "label": "PLC09/T3", - "value": "PLC09/T3" - }, - { - "label": "PLC09/T3_1", - "value": "PLC09/T3_1" - }, - { - "label": "PLC09/T3_2", - "value": "PLC09/T3_2" - }, - { - "label": "PLC09/T3_3", - "value": "PLC09/T3_3" - }, - { - "label": "PLC09/T3_4", - "value": "PLC09/T3_4" - }, - { - "label": "PLC09/T3_5", - "value": "PLC09/T3_5" - }, - { - "label": "PLC09/T3_6", - "value": "PLC09/T3_6" - }, - { - "label": "PLC09/T4", - "value": "PLC09/T4" - }, - { - "label": "PLC09/T4_1", - "value": "PLC09/T4_1" - }, - { - "label": "PLC09/T4_2", - "value": "PLC09/T4_2" - }, - { - "label": "PLC09/T4_3", - "value": "PLC09/T4_3" - }, - { - "label": "PLC09/T4_4", - "value": "PLC09/T4_4" - }, - { - "label": "PLC09/T4_5", - "value": "PLC09/T4_5" - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-source_id-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.props.options \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "SourceId" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, { "children": [ { @@ -3522,23 +3232,26 @@ } }, "props": { - "multiSelect": true, "options": [ { "label": "Diagnostic", - "value": "1" + "value": "diagnostic" }, { "label": "Low", - "value": "2" + "value": "low" }, { "label": "Medium", - "value": "3" + "value": "medium" }, { "label": "High", - "value": "4" + "value": "high" + }, + { + "label": "All", + "value": "" } ], "style": { @@ -3569,600 +3282,6 @@ "shrink": 0 }, "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Devices" - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_device_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "490px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "multiSelect": true, - "options": [ - { - "label": "PLC01", - "value": "PLC01" - }, - { - "label": "PLC02", - "value": "PLC02" - }, - { - "label": "PLC03", - "value": "PLC03" - }, - { - "label": "PLC09", - "value": "PLC09" - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-device-filters", - "pageScope": true, - "script": "\tdevices \u003d payload[\"data\"]\n\tself.props.options \u003d devices", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Devices" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Type" - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_type_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "490px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "multiSelect": true, - "options": [ - { - "label": "Emergency Stop", - "value": 1 - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Type" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "100px" - }, - "props": { - "text": "Duration", - "textStyle": { - "fontFamily": "Arial", - "fontWeight": "bold", - "margin": 15, - "textAlign": "center" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_duration_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "160px" - }, - "props": { - "align": "left", - "containerStyle": { - "margin": 15 - }, - "format": "0,0", - "inputBounds": { - "maximum": 1000000, - "minimum": 0 - }, - "tooltipText": "Duration greater than or equal to in secs.", - "value": null - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.numeric-entry-field" - }, - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "marginRight": 80 - }, - "text": "secs", - "textStyle": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "left" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Duration" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "custom": { - "client_id": "5094ea37-bff1-4564-b9ec-cfc45bf5ad4f", - "device_filters": null, - "duration_filter": null, - "duration_filters": null, - "priority_filters": null, - "source_id_filters": null, - "time_from_filter": null, - "time_to_filter": null, - "tokens": [ - 1712754859219 - ], - "type_filters": null - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tself.custom.tokens \u003d []\n\tfc \u003d self.session.custom.fc\n\tmessaging.message_handler.send_http_response_code(\"Waiting...\")\n\tAPI_ID, STAGE, ACC_ID, FUNC_URL \u003d AWS.secrets_manager.get_secret(fc, \"scada/api/endpoint\")\n\tAWS_REGION \u003d self.session.custom.aws.region\n\tcredentials \u003d AWS.credentials.assume_role(region \u003d AWS_REGION, arn \u003d ACC_ID)\n\tmessaging.message_handler.update_token_array([])\n\tstart_time \u003d self.custom.time_from_filter\n\tif not start_time:\n\t\ttime \u003d self.custom.max_duration\n\t\tstart_time \u003d system.date.toMillis(time)\n\tself.custom.tokens.append(start_time)\n\tmessaging.message_handler.view_message_handler(start_time, \"update-default-start\")\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\tstart \u003d start_time,\n\t\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter, \n\t\t\t\t\t\t\t\t\t\t\t\turl_encoding \u003d True)\n\tstatus, data \u003d AWS.build_url_http.build_url(credentials, fc \u003d fc, filters \u003d filters, region \u003d AWS_REGION)\n\tif status \u003d\u003d 200:\n\t\tjson_data \u003d system.util.jsonDecode(data)\n\t\thistorical_data \u003d json_data.get(\"payload\",{}).get(\"messages\")\n\t\tfor i in historical_data:\n\t\t\ttimestamp \u003d i.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\")\n\t\t\tconvert_timestamp \u003d alarms.alarm_tables.get_timestamp(int(timestamp))\n\t\t\tutc_offset \u003d -self.session.props.device.timezone.utcOffset\n\t\t\tconvert_timestamp \u003d system.date.addHours(convert_timestamp, utc_offset)\n\t\t\tduration_ms \u003d i.get(\"value\",{}).get(\"Duration\",{}).get(\"value\")\n\t\t\tduration_s \u003d float(duration_ms)/1000\n\t\t\ti[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\ti[\"value\"][\"Duration\"][\"value\"] \u003d duration_s\n\t #The first set of data received will only have a next token\n\t #To get back to this data we store a value of 0 in the token array\n\t #and store the data in the property inital_value on the table component.\n\t #When paginating backwards we get to a 0 value we load the inital_values \n\t #into the historical table\n\t\tmessaging.message_handler.update_historical_first_request(historical_data)\n\t\tnext_token \u003d json_data.get(\"payload\",{}).get(\"NextToken\")\n\t\tclient_id \u003d json_data.get(\"payload\",{}).get(\"ClientId\")\n\t\tmessaging.message_handler.update_client_id(client_id)\n\t\tmessaging.message_handler.view_message_handler(next_token, \"update-next-token\")\n\t\tmessaging.message_handler.view_message_handler(self.custom.tokens, \"update-tokens-array\")\n\tmessaging.message_handler.send_http_response_code(status)\n\tself.custom.client_id \u003d client_id\n\tself.props.enabled \u003d True" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Apply" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "custom.device_filters": { - "persistent": true - }, - "custom.max_duration": { - "binding": { - "config": { - "expression": "addDays(now(),-20)" - }, - "type": "expr" - } - }, - "custom.priority_filters": { - "persistent": true - }, - "custom.source_id_filters": { - "persistent": true - }, - "custom.time_from_filter": { - "persistent": true - }, - "custom.time_to_filter": { - "persistent": true - } - }, - "props": { - "image": { - "icon": { - "path": "material/update" - } - }, - "style": { - "margin": 15 - }, - "text": "Apply" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-message-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.message_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\taction \u003d payload[\"data\"]\n\tif action \u003d\u003d \"reset\":\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue\n\t\tself.custom.tokens \u003d []\n\t\t", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "#\tpayload \u003d {}\n#\tpayload[\"data\"] \u003d \"reset\"\n#\tsystem.perspective.sendMessage(\"reset-historical-filters\", \n#\t\t\t\t\t\t\t\t\tpayload\u003d payload, scope \u003d \"page\")\n\tmessaging.message_handler.reset_historical_filters(\"reset\")" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Clear" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/delete_forever" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Clear" - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "122px", - "shrink": 2 - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "marginLeft": "30px", - "textAlign": "center" - }, - "text": "Diagnostics" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Icon" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "propConfig": { - "props.color": { - "binding": { - "config": { - "expression": "case({this.props.path},\r\n\"material/check_circle_outline\", \"#2ECC71\",\r\n\"material/error_outline\", \"#4287f5\",\r\n\"#FF0000\")" - }, - "type": "expr" - } - } - }, - "props": { - "path": "material/error_outline" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "http-response-code", - "pageScope": true, - "script": "\t\n\tresponse \u003d payload[\"response\"]\n\tif response \u003d\u003d 200:\n\t\tresponse \u003d \"material/check_circle_outline\"\n\telif response \u003d\u003d \"Waiting...\":\n\t\tresponse \u003d \"material/error_outline\"\n\telif response \u003d\u003d \"\":\n\t\tresponse \u003d \"\"\n\telse:\n\t\tresponse \u003d \"material/cancel\"\n\tself.props.path \u003d response", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\tself.props.path \u003d \"\"", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.icon" - }, - { - "custom": { - "status_code": "Waiting..." - }, - "meta": { - "name": "Response", - "tooltip": {} - }, - "position": { - "basis": "164px" - }, - "propConfig": { - "meta.tooltip.enabled": { - "binding": { - "config": { - "expression": "if(len({this.props.text}) \u003e 0, True, False)" - }, - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "\"The request returned the following http response code \" + {this.custom.status_code}" - }, - "type": "expr" - } - }, - "props.style.color": { - "binding": { - "config": { - "expression": "case({this.props.text},\r\n\"Success\", \"#2ECC71\",\r\n\"Waiting...\", \"#4287f5\",\r\n\"#FF0000\")" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "borderColor": "#555555", - "borderStyle": "solid", - "borderWidth": "0.5px", - "cursor": "help", - "fontWeight": "bold", - "marginBottom": "10px", - "marginLeft": "10px", - "marginTop": "10px", - "textAlign": "center" - }, - "text": "Waiting..." - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "http-response-code", - "pageScope": true, - "script": "\tresponse \u003d payload[\"response\"]\n\tresponses \u003d {200:\"Success\", \"Waiting...\":\"Waiting...\", \"\":\"\"}\n\tdisplay_value \u003d responses.get(response, \"Fail\")\n\t\n#\tif response \u003d\u003d 200:\n#\t\tresponse \u003d \"Success\"\n#\t\n#\tif response \u003d\u003d \"Waiting...\":\n#\t\tresponse \u003d\u003d \"Waiting...\"\n#\telse:\n#\t\tresponse \u003d \"Fail\"\n\tself.props.text \u003d display_value\n\tself.custom.status_code \u003d response", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\tself.props.text \u003d \"\"\n\tself.custom.status_code \u003d \"\"", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Apply" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "alignContent": "flex-start" - }, - "type": "ia.container.flex" } ], "custom": { @@ -4172,7 +3291,7 @@ "name": "Filters" }, "position": { - "basis": "500px", + "basis": "180px", "grow": 1, "shrink": 0 }, @@ -4218,176 +3337,42 @@ "children": [ { "custom": { - "device_filters": null, - "duration_filter": null, - "duration_filters": "value", - "initial_data": [ - { - "value": { - "Device": { - "value": "PLC01" - }, - "Duration": { - "value": 10 - }, - "Message": { - "value": "Test" - }, - "Priority": { - "value": "1" - }, - "SourceId": { - "value": "PLC01/0820_06_16/NR1" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 192, - 1712731396290 - ], - "$ts": 1711029268000 - } - }, - "Type": { - "value": "0" - } - } - }, - { - "value": { - "Device": { - "value": "PLC01" - }, - "Duration": { - "value": 0.01 - }, - "Message": { - "value": "Test" - }, - "Priority": { - "value": "1" - }, - "SourceId": { - "value": "PLC01/0820_06_16/NR1" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 192, - 1712731396290 - ], - "$ts": 1711473599010 - } - }, - "Type": { - "value": "0" - } - } - }, - { - "value": { - "Device": { - "value": "PLC01" - }, - "Duration": { - "value": 10 - }, - "Message": { - "value": "Test" - }, - "Priority": { - "value": "1" - }, - "SourceId": { - "value": "PLC01/0820_06_16/NR1" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 192, - 1712731396290 - ], - "$ts": 1711474160000 - } - }, - "Type": { - "value": "0" - } - } - }, - { - "value": { - "Device": { - "value": "PLC01" - }, - "Duration": { - "value": 10 - }, - "Message": { - "value": "Test" - }, - "Priority": { - "value": "1" - }, - "SourceId": { - "value": "PLC01/0820_06_16/NR1" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 192, - 1712731396290 - ], - "$ts": 1711474180000 - } - }, - "Type": { - "value": "0" - } - } - }, - { - "value": { - "Device": { - "value": "PLC01" - }, - "Duration": { - "value": 10 - }, - "Message": { - "value": "Test" - }, - "Priority": { - "value": "1" - }, - "SourceId": { - "value": "PLC01/0820_06_16/NR1" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 192, - 1712731396290 - ], - "$ts": 1711474200000 - } - }, - "Type": { - "value": "0" - } - } + "max_duration": { + "$": [ + "ts", + 192, + 1748426336635 + ], + "$ts": 1747562336635 + }, + "priority_filters": "", + "time_from_filter": { + "$": [ + "ts", + 192, + 1750938073345 + ], + "$ts": 1750435156149 + }, + "time_to_filter": { + "$": [ + "ts", + 192, + 1750938073345 + ], + "$ts": 1750436956149 + } + }, + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\t\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)" + }, + "scope": "G", + "type": "script" } - ], - "priority_filters": null, - "source_id_filters": null, - "time_from_filter": null, - "time_to_filter": null, - "type_filters": null + } }, "meta": { "name": "Table" @@ -4397,12 +3382,55 @@ "grow": 1 }, "propConfig": { - "custom.max_duration": { + "props.columns[1].filter.date.value": { "binding": { "config": { - "expression": "addDays(now(),-10)" + "path": "this.custom.time_from_filter" }, - "type": "expr" + "type": "property" + } + }, + "props.columns[2].filter.date.value": { + "binding": { + "config": { + "path": "this.custom.time_to_filter" + }, + "type": "property" + } + }, + "props.columns[2].filter.number.value": { + "binding": { + "config": { + "path": "this.custom.time_to_filter" + }, + "enabled": false, + "type": "property" + } + }, + "props.columns[5].filter.string.value": { + "binding": { + "config": { + "path": "this.custom.priority_filters" + }, + "type": "property" + } + }, + "props.data": { + "binding": { + "config": { + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetAlarms" + }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", + "type": "script" + } + ], + "type": "query" } } }, @@ -4412,9 +3440,28 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", + "dateFormat": "none", "editable": false, - "field": "SourceId", + "field": "ID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, "footer": { "align": "center", "justify": "left", @@ -4425,13 +3472,19 @@ }, "header": { "align": "center", - "justify": "left", + "justify": "center", "style": { - "classes": "" + "classes": "", + "paddingLeft": 12 }, "title": "" }, - "justify": "auto", + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, "number": "value", "numberFormat": "0,0.##", "progressBar": { @@ -4480,9 +3533,27 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", + "dateFormat": "MM/DD/YYYY HH:mm:ss", "editable": false, - "field": "Message", + "field": "StartTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "later than date time" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "never" + }, "footer": { "align": "center", "justify": "left", @@ -4492,6 +3563,89 @@ "title": "" }, "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Start Timestamp" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "none", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "EndTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "earlier than date time" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "never" + }, + "footer": { "align": "center", "justify": "left", "style": { @@ -4499,7 +3653,20 @@ }, "title": "" }, - "justify": "auto", + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "End Timestamp" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, "number": "value", "numberFormat": "0,0.##", "progressBar": { @@ -4548,9 +3715,28 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", + "dateFormat": "none", "editable": false, - "field": "Device", + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, "footer": { "align": "center", "justify": "left", @@ -4560,6 +3746,91 @@ "title": "" }, "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "", + "paddingLeft": 12 + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { "align": "center", "justify": "left", "style": { @@ -4567,7 +3838,20 @@ }, "title": "" }, - "justify": "auto", + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, "number": "value", "numberFormat": "0,0.##", "progressBar": { @@ -4619,6 +3903,24 @@ "dateFormat": "MM/DD/YYYY", "editable": false, "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "contains" + }, + "visible": "never" + }, "footer": { "align": "center", "justify": "left", @@ -4629,81 +3931,18 @@ }, "header": { "align": "center", - "justify": "left", + "justify": "center", "style": { "classes": "" }, "title": "" }, - "justify": "auto", - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "Timestamp", - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", "number": "value", "numberFormat": "0,0.##", "progressBar": { @@ -4754,7 +3993,26 @@ "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "Duration", + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals", + "value": "" + }, + "visible": "never" + }, "footer": { "align": "center", "justify": "left", @@ -4765,15 +4023,20 @@ }, "header": { "align": "center", - "justify": "left", + "justify": "center", "style": { "classes": "" }, "title": "" }, - "justify": "auto", + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, "number": "value", - "numberFormat": "00:00:00", + "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", @@ -4820,9 +4083,28 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "none", + "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "Type", + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "contains", + "value": "" + }, + "visible": "never" + }, "footer": { "align": "center", "justify": "left", @@ -4833,15 +4115,20 @@ }, "header": { "align": "center", - "justify": "left", + "justify": "center", "style": { "classes": "" }, "title": "" }, - "justify": "auto", + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, "number": "value", - "numberFormat": "0,0", + "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", @@ -4884,12 +4171,230 @@ "viewPath": "", "visible": true, "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "FullTag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" } ], + "emptyMessage": { + "noData": { + "text": "No Alarms" + }, + "noFilterResults": { + "text": "No Alarms" + } + }, "enabled": true, + "filter": { + "enabled": true, + "results": { + "enabled": true + } + }, "pager": { "bottom": false }, + "selection": { + "data": [ + { + "Description": "MCM01 - Hello world", + "Device": "MCM01", + "Duration": "06:30:56", + "EndTimestamp": null, + "FullTag": "System/MCM01/MCM01/Beacon_Light", + "ID": 12, + "Location": "MCM01", + "Priority": "High", + "StartTimestamp": "Thu Jun 26 2025 15:57:50 GMT+0400 (Georgia Standard Time)", + "Tag": "MCM01.HMI.Beacon_Light" + } + ], + "selectedColumn": "EndTimestamp", + "selectedRow": 0 + }, "style": { "margin": 20 } @@ -4994,7 +4499,7 @@ { "messageType": "update-historical-data", "pageScope": true, - "script": "\tdata \u003d payload[\"data\"]\n\tself.getChild(\"Table\").props.data \u003d data", + "script": "#\tdata \u003d payload[\"data\"]\n#\tself.getChild(\"Table\").props.data \u003d data", "sessionScope": false, "viewScope": false } @@ -5006,22 +4511,32 @@ "children": [ { "custom": { - "device_filters": null, "download_in_progress": true, - "duration_filter": null, - "duration_filters": null, "enable_timeout": false, - "priority_filters": null, - "source_id_filters": null, - "time_from_filter": null, - "time_to_filter": null, + "priority_filters": "", + "time_from_filter": { + "$": [ + "ts", + 192, + 1750938073345 + ], + "$ts": 1750435156149 + }, + "time_to_filter": { + "$": [ + "ts", + 192, + 1750938073345 + ], + "$ts": 1750436956149 + }, "type_filters": null }, "events": { "component": { "onActionPerformed": { "config": { - "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\t\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\t\tstart \u003d self.custom.time_from_filter,\n\t\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter)\n\t\n\tCommands.button_commands.send_download_request(whid, filters, session_id)\n\tself.custom.enable_timeout \u003d True\n\tself.custom.download_in_progress \u003d True" + "script": "\n from datetime import datetime\n def format_date(value):\n\t\tif isinstance(value, (int, long)) and value \u003e 10000000:\n\t\t\ttimestamp \u003d system.date.fromMillis(value)\n\t\t\treturn system.date.format(timestamp, \"yyyy-MM-dd HH:mm:ss\")\n\t\t\t\n\t\t# If value is not a valid timestamp, return as-is\n\t\treturn str(value)\n \n try:\n\n # Get filtered data\n table \u003d self.parent.parent.getChild(\"Table\").getChild(\"Table\")\n filtered_data \u003d table.props.filter.results.data\n\n if not filtered_data or len(filtered_data) \u003d\u003d 0:\n system.perspective.print(\"No filtered data to export.\")\n return\n\n # Get correct column order from the table\u0027s column config\n column_order \u003d [col[\"field\"] for col in table.props.columns if \"field\" in col]\n\n csv_content \u003d \",\".join(column_order) + \"\\n\"\n\n # Build rows\n for row_dict in filtered_data:\n row \u003d []\n for col in column_order:\n raw_val \u003d row_dict.get(col, \"\")\n value \u003d format_date(raw_val)\n value \u003d value.replace(\",\", \";\") # CSV safety\n row.append(value)\n csv_content +\u003d \",\".join(row) + \"\\n\"\n\n # Export CSV\n csv_bytes \u003d csv_content.encode(\"utf-8\")\n system.perspective.download(\"filtered_alarms_history.csv\", csv_bytes)\n\n system.perspective.print(\"CSV export completed successfully. Exported %d records.\" % len(filtered_data))\n\n except Exception as e:\n system.perspective.print(\"Export failed: \" + str(e))" }, "scope": "G", "type": "script" @@ -5029,16 +4544,17 @@ } }, "meta": { - "name": "Export" + "name": "Export", + "tooltip": { + "enabled": true, + "text": "Exports the data displayed in the table." + } }, "position": { "basis": "120px", "shrink": 0 }, "propConfig": { - "custom.device_filters": { - "persistent": true - }, "custom.disable": { "binding": { "config": { @@ -5070,9 +4586,6 @@ "custom.priority_filters": { "persistent": true }, - "custom.source_id_filters": { - "persistent": true - }, "custom.start_time": { "binding": { "config": { @@ -5210,410 +4723,6 @@ "grow": 1 }, "type": "ia.display.label" - }, - { - "custom": { - "client_id": "5094ea37-bff1-4564-b9ec-cfc45bf5ad4f", - "current_page": null, - "device_filters": null, - "duration_filter": null, - "initial_token": null, - "previous_token": "value", - "priority_filters": null, - "source_filters": null, - "source_id_filters": null, - "start_pagination": false, - "time_from_filter": null, - "time_to_filter": null, - "tokens": [], - "type_filters": null - }, - "events": { - "component": { - "onActionPerformed": [ - { - "config": { - "script": "\tmessaging.message_handler.send_http_response_code(\"Waiting...\")\n\tself.props.enabled \u003d False\n\tfc \u003d self.session.custom.fc\n\tclient_id \u003d self.custom.client_id\n\tAPI_ID, STAGE, ACC_ID, FUNC_URL \u003d AWS.secrets_manager.get_secret(fc, \"scada/api/endpoint\")\n\tAWS_REGION \u003d self.session.custom.aws.region\n\tif self.custom.start_pagination:\n\t\tstart_time \u003d self.custom.tokens.pop(-1)\n\t\tstart_time \u003d self.custom.tokens.pop(-1)\n\telse:\n\t\tstart_time \u003d self.custom.tokens.pop(-1)\n\tpayload \u003d {}\n\tpayload[\"data\"] \u003d \"\"\n\tsystem.perspective.sendMessage(\"reset-pagination-start\", payload, scope \u003d \"view\")\n\tcredentials \u003d AWS.credentials.assume_role(region \u003d AWS_REGION, arn \u003d ACC_ID)\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\tstart \u003d start_time,\n\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter,\n\t\t\t\t\t\t\t\t\t\t\turl_encoding \u003d True)\n\tstatus, data \u003d AWS.build_url_http.build_url(credentials, fc \u003d fc, filters \u003d filters,\n\t\t\t\t\t\t\t\t\t\t\t\tregion \u003d AWS_REGION)\n\tsystem.perspective.print(data)\n\tif status \u003d\u003d 200:\n\t\tjson_data \u003d system.util.jsonDecode(data)\n\t\thistorical_data \u003d json_data.get(\"payload\",{}).get(\"messages\")\n\t\tfor i,j in enumerate(historical_data):\n\t\t\tsystem.perspective.print(\"time is \" + str(i))\n\t\t\ttimestamp \u003d j.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\")\n\t\t\tconvert_timestamp \u003d alarms.alarm_tables.get_timestamp(int(timestamp))\n\t\t\tutc_offset \u003d -self.session.props.device.timezone.utcOffset\n\t\t\tconvert_timestamp \u003d system.date.addHours(convert_timestamp, utc_offset) \n\t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\tduration_ms \u003d j.get(\"value\",{}).get(\"Duration\",{}).get(\"value\")\n \t\t\tduration_s \u003d float(duration_ms)/1000\n \t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n \t\t\tj[\"value\"][\"Duration\"][\"value\"] \u003d duration_s \n\t\tmessaging.message_handler.update_historical(historical_data)\n\t\tmessaging.message_handler.view_message_handler(\"\", \"update-pagination-start\")\n\t\ttoken \u003d json_data.get(\"payload\",{}).get(\"nextToken\")\n\tself.custom.start_pagination \u003d False\t\t\n\tmessaging.message_handler.send_http_response_code(status)\n\t" - }, - "scope": "G", - "type": "script" - }, - { - "config": { - "script": "\tpayload \u003d {}\n\tpayload[\"data\"] \u003d self.custom.tokens\n\tsystem.perspective.sendMessage(\"update-tokens-array\", payload, scope \u003d \"view\")" - }, - "scope": "G", - "type": "script" - } - ] - } - }, - "meta": { - "name": "Back", - "tooltip": { - "enabled": true, - "text": "Return previous results" - } - }, - "position": { - "basis": "120px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if(len({this.custom.tokens}), True, False)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/arrow_back" - }, - "position": "center" - }, - "primary": false, - "style": { - "margin": 15, - "marginLeft": 0 - }, - "text": "" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-tokens-array", - "pageScope": false, - "script": "\ttokens \u003d payload[\"data\"]\n\tself.custom.tokens \u003d tokens", - "sessionScope": false, - "viewScope": true - }, - { - "messageType": "update-initial-tokens", - "pageScope": true, - "script": "\ttoken \u003d payload[\"data\"]\n\tself.custom.initial_token \u003d token", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.enabled \u003d True\n \t\tself.custom.device_filters \u003d None\n \t\tself.custom.priority_filters \u003d None\n \t\tself.custom.source_id_filters \u003d None\n \t\tself.custom.time_from_filter \u003d None\n \t\tself.custom.time_to_filter \u003d None\n \t\tself.custom.type_filters \u003d None\n \t\tself.custom.source_filters \u003d None\n \t\tself.custom.duration_filter \u003d None\n \t\tself.custom.initial_token \u003d None\n \t\tself.custom.start_pagination \u003d False\n \t\tself.custom.tokens \u003d []", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration\n\t# implement your handler here", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-client-id", - "pageScope": true, - "script": "\tclient_id \u003d payload[\"data\"]\n\tself.custom.client_id \u003d client_id\n\t", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-previous-timestamp", - "pageScope": false, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": true - }, - { - "messageType": "set-pagination-flag", - "pageScope": false, - "script": "\tself.custom.start_pagination \u003d True", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Records Number", - "visible": false - }, - "position": { - "basis": "50px" - }, - "props": { - "text": 0, - "textStyle": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-token-array", - "pageScope": true, - "script": "\tarray \u003d payload[\"data\"]\n\tself.props.text \u003d len(array)", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\tself.props.text \u003d 0", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.label" - }, - { - "custom": { - "client_id": "", - "current_page": 0, - "device_filters": null, - "duration_filter": null, - "initial_token": null, - "next_token": "", - "previous_timestamp": "", - "priority_filters": null, - "source_filters": null, - "source_id_filters": null, - "start_pagination": false, - "time_from_filter": 1712754859219, - "time_to_filter": null, - "tokens": [], - "type_filters": null - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.send_http_response_code(\"Waiting...\")\n\tself.props.enabled \u003d False\n\tfc \u003d self.session.custom.fc\n\tclient_id \u003d self.custom.client_id\n\ttoken \u003d self.custom.next_token\n\tAPI_ID, STAGE, ACC_ID, FUNC_URL \u003d AWS.secrets_manager.get_secret(fc, \"scada/api/endpoint\")\n\tAWS_REGION \u003d self.session.custom.aws.region\n\ttime \u003d self.custom.max_duration\n\tstart_time \u003d self.custom.time_from_filter\n\tcredentials \u003d AWS.credentials.assume_role(region \u003d AWS_REGION, arn \u003d ACC_ID)\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\tstart \u003d start_time,\n\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter,\n\t\t\t\t\t\t\t\t\t\t\turl_encoding \u003d True)\n\tstatus, data \u003d AWS.build_url_http.build_url(credentials, fc \u003d fc, next_token \u003d token, \n\t\t\t\t\t\t\t\t\t\t\t\tfilters \u003d filters, client_id \u003d client_id, region \u003d AWS_REGION)\n\tif status \u003d\u003d 200:\n\t\tjson_data \u003d system.util.jsonDecode(data)\n\t\thistorical_data \u003d json_data.get(\"payload\",{}).get(\"messages\")\n\t\tfor i,j in enumerate(historical_data):\n\t\t\tif i \u003d\u003d 0:\n\t\t\t\tself.custom.tokens.append(j.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\"))\n\t\t\tsystem.perspective.print(\"time is \" + str(i))\n\t\t\ttimestamp \u003d j.get(\"value\",{}).get(\"Timestamp\",{}).get(\"value\")\n\t\t\tconvert_timestamp \u003d alarms.alarm_tables.get_timestamp(int(timestamp))\n\t\t\tutc_offset \u003d -self.session.props.device.timezone.utcOffset\n\t\t\tconvert_timestamp \u003d system.date.addHours(convert_timestamp, utc_offset) \n\t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\tduration_ms \u003d j.get(\"value\",{}).get(\"Duration\",{}).get(\"value\")\n\t\t\tduration_s \u003d float(duration_ms)/1000\n\t\t\tj[\"value\"][\"Timestamp\"][\"value\"] \u003d convert_timestamp\n\t\t\tj[\"value\"][\"Duration\"][\"value\"] \u003d duration_s\n\t\tmessaging.message_handler.update_historical(historical_data)\n\t\ttoken \u003d json_data.get(\"payload\",{}).get(\"nextToken\")\t\n\t\tnext_token \u003d json_data.get(\"payload\",{}).get(\"NextToken\")\n\t\tself.custom.next_token \u003d next_token\n\t\tclient_id \u003d json_data.get(\"payload\",{}).get(\"ClientId\")\n\t\tself.custom.client_id \u003d client_id\n\tmessaging.message_handler.send_http_response_code(status)\n\tmessaging.message_handler.view_message_handler(self.custom.tokens, \"update-tokens-array\")\n\tif len(self.custom.tokens)\u003e1:\n\t\tmessaging.message_handler.view_message_handler(\"\", \"set-pagination-flag\")\n\tif self.custom.next_token:\n\t\tself.props.enabled \u003d True" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Forward", - "tooltip": { - "enabled": true, - "text": "Return next results" - } - }, - "position": { - "basis": "120px", - "shrink": 0 - }, - "propConfig": { - "custom.max_duration": { - "binding": { - "config": { - "expression": "addDays(now(),-10)" - }, - "type": "expr" - } - }, - "custom.previous_timestamp": { - "onChange": { - "enabled": null, - "script": "\tpayload \u003d {}\n\tpayload[\"data\"] \u003d self.custom.previous_timestamp\n\tsystem.perspective.sendMessage(\"update-previous-timestamp\", payload, scope \u003d \"view\")" - } - }, - "position.display": { - "persistent": true - }, - "props.enabled": { - "binding": { - "config": { - "expression": "if({this.custom.next_token}\u003dnull, False, True)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/arrow_forward" - }, - "position": "center" - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-tokens-array", - "pageScope": false, - "script": "\ttokens \u003d payload[\"data\"]\n\tself.custom.tokens \u003d tokens", - "sessionScope": false, - "viewScope": true - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.enabled \u003d True\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.source_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.custom.initial_token \u003d None\n\t\tself.custom.next_token \u003d \"\"\n\t\tself.custom.start_pagination \u003d False\n\t\tself.custom.tokens \u003d []", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-client-id", - "pageScope": true, - "script": "\tclient_id \u003d payload[\"data\"]\n\tself.custom.client_id \u003d client_id\n\t", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-next-token", - "pageScope": false, - "script": "\tnext_token \u003d payload[\"data\"]\n\tself.custom.next_token \u003d next_token", - "sessionScope": false, - "viewScope": true - }, - { - "messageType": "set-pagination-start", - "pageScope": false, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time\n\tself.custom.next_token \u003d \"\"", - "sessionScope": false, - "viewScope": true - }, - { - "messageType": "update-default-start", - "pageScope": false, - "script": "\tdata\u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d data", - "sessionScope": false, - "viewScope": true - }, - { - "messageType": "update-pagination-start", - "pageScope": false, - "script": "\tself.custom.time_from_filter \u003d self.custom.tokens[-1]\n\tself.custom.client_id \u003d \"\"\n\tself.custom.next_token \u003d \"\"\n\t", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "914px" - }, - "type": "ia.display.label" } ], "meta": { @@ -5629,17 +4738,6 @@ "type": "ia.container.flex" } ], - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tfc \u003d self.session.custom.fc\n\tsource_ids \u003d tags.tag_utilities.get_tag_paths(fc)\n\tmessaging.message_handler.update_source_id_filters(source_ids)\n\t#Set the device filter options on startup.\n\tdevices \u003d tags.tag_utilities.get_devices(fc)\n\tdevice_drop_down \u003d []\n\tfor i in devices:\n\t\toptions \u003d {\"label\":i, \"value\":i}\n\t\tdevice_drop_down.append(options)\n\tmessaging.message_handler.update_device_filters(device_drop_down)\n\tmessaging.message_handler.update_historical([])\n#\tmessaging.message_handler.show_historical_filters(False)\n\tmessaging.message_handler.reset_historical_filters(\"reset\")\n\tmessaging.message_handler.update_token_array([])\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, "meta": { "name": "root" }, @@ -5665,16 +4763,8 @@ "type": "ia.container.flex" } ], - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tself.props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } + "custom": { + "shelvedAlarms": [] }, "meta": { "name": "TabContainer" @@ -5687,7 +4777,7 @@ "props.currentTabIndex": { "onChange": { "enabled": null, - "script": "\tif self.props.currentTabIndex !\u003d 0:\n\t\tpayload \u003d {}\n\t\tfilter_on \u003d \"false\"\n\t\tpayload[\"reset\"] \u003d filter_on\n\t\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\ttry:\n\t\tpageid \u003d self.view.custom.activityLogger.alt_pageid + \u0027/\u0027+ self.props.tabs[previousValue.value]\n\t\tpageid \u003d pageid.replace(\u0027 \u0027,\u0027\u0027)\n\t\tpayload \u003d activityLog.productMetrics.createActivityPayload(self.view, \u0027page\u0027, pageid, pageid)\n\t\tself.view.custom.activityLogger.start_time \u003d system.date.now()\n\t\tif payload:\n\t\t\tsystem.perspective.sendMessage(\u0027activityLogger-TabChanged\u0027, payload \u003d payload, scope \u003d \u0027page\u0027)\n\texcept:\n\t\tpass" + "script": "\n\tif self.props.currentTabIndex !\u003d 0:\n\t\tpayload \u003d {}\n\t\tfilter_on \u003d \"false\"\n\t\tpayload[\"reset\"] \u003d filter_on\n\t\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\t\t\n\tif currentValue.value \u003d\u003d 1:\n\t shelved_info \u003d system.alarm.getShelvedPaths()\n\t alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\t \n\t tableData \u003d []\n\t \n\t for alarm in alarms:\n\t if alarm.isShelved() and not alarm.isAcked() and not alarm.isCleared():\n\t # Get alarm path as string\n\t alarm_path \u003d str(alarm.getSource())\n\t \n\t # Get active time\n\t activeData \u003d alarm.getActiveData()\n\t startTime \u003d activeData.getTimestamp() if activeData else None\n\t \n\t # Find shelved info for this alarm\n\t shelveEntry \u003d \"\"\n\t \n\t for shelved_item in shelved_info:\n\t shelved_str \u003d str(shelved_item)\n\t \n\t if alarm_path in shelved_str:\n\t # Extract the value part (after the first comma)\n\t if \",\" in shelved_str:\n\t start_idx \u003d shelved_str.find(\",\")\n\t shelveEntry \u003d shelved_str[start_idx + 1:].rstrip(\"}\")\n\t break\n\t \n\t # Parse shelved information\n\t expiration \u003d \"\"\n\t \n\t if shelveEntry:\n\t \n\t # Extract expiration (between \"expiration:\" and \",\")\n\t if \"expiration:\" in shelveEntry:\n\t exp_part \u003d shelveEntry.split(\"expiration:\")[1]\n\t if \",\" in exp_part:\n\t expiration \u003d exp_part.split(\",\")[0].strip()\n\t else:\n\t expiration \u003d exp_part.strip()\n\t \n\t tableData.append({\n\t \"name\": alarm.getName(),\n\t \"path\": alarm_path,\n\t \"activeTime\": system.date.format(system.date.fromMillis(startTime), \"yyyy-MM-dd HH:mm:ss\"),\n\t \"expirationTime\": expiration,\n\t \"priority\": str(alarm.getPriority())\n\t })\n\t \n\t self.custom.shelvedAlarms \u003d tableData\n\t \n\t\t\n\ttry:\n\t\tpageid \u003d self.view.custom.activityLogger.alt_pageid + \u0027/\u0027+ self.props.tabs[previousValue.value]\n\t\tpageid \u003d pageid.replace(\u0027 \u0027,\u0027\u0027)\n\t\tpayload \u003d activityLog.productMetrics.createActivityPayload(self.view, \u0027page\u0027, pageid, pageid)\n\t\tself.view.custom.activityLogger.start_time \u003d system.date.now()\n\t\tif payload:\n\t\t\tsystem.perspective.sendMessage(\u0027activityLogger-TabChanged\u0027, payload \u003d payload, scope \u003d \u0027page\u0027)\n\texcept:\n\t\tpass" } } }, @@ -5695,7 +4785,8 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, - "currentTabIndex": 2, + "currentTabIndex": 1, + "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" }, @@ -5727,24 +4818,13 @@ }, "tabs": [ "Active Alarms", - "Shelved Alarms", + "Alarm Hit List", "Historical" ] }, "type": "ia.container.tab" } ], - "events": { - "system": { - "onStartup": { - "config": { - "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)" - }, - "scope": "G", - "type": "script" - } - } - }, "meta": { "name": "root" }, diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json index c559ea8..6adaede 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json @@ -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": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json index ec5ac7b..ed84ea5 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Main-Views/CommandControl/view.json @@ -1,23 +1,23 @@ { "custom": { - "PLCs": "{\n \"FSC1\": [\"FSC1\"],\n \"FSC2\": [\"FSC2\"],\n \"FSC_Cells\": [\"FSC_Cells\"],\n \"FSC_Induct_1-4\": [\"FSC_Induct_1-4\"],\n \"FSC_Induct_5-8\": [\"FSC10\"],\n \"PLC01\": [\"PLC01\"],\n \"PLC02\": [\n \"PLC02\",\n \"PLC98\"\n ],\n \"PLC03\": [\"PLC03\"],\n \"PLC06\": [\n \"PLC06\",\n \"PLC07\"\n ],\n \"PLC08\": [\n \"PLC08\",\n \"PLC99\"\n ],\n \"PLC09\": [\"PLC09\"],\n \"PLC09_Receiving2\": [\"PLC09_Receiving2\"],\n \"PLC09_Receiving3\": [\"PLC09_Receiving3\"],\n \"PLC1000\": [\"PLC1000\"],\n \"PLC1000_Receiving4\": [\"PLC1000_Receiving4\"],\n \"PLC1301\": [\"ARSAW1301\"],\n \"PLC1302\": [\"ARSAW1302\"],\n \"PLC1303\": [\"ARSAW1303\"],\n \"PLC1304\": [\"ARSAW1304\"],\n \"PLC1305\": [\"ARSAW1305\"],\n \"PLC1306\": [\"ARSAW1306\"],\n \"PLC1307\": [\"ARSAW1307\"],\n \"PLC1308\": [\"ARSAW1308\"],\n \"PLC1309\": [\"ARSAW1309\"],\n \"PLC1310\": [\"ARSAW1310\"],\n \"PLC1311\": [\"ARSAW1311\"],\n \"PLC1312\": [\"ARSAW1312\"],\n \"PLC13_SC1\": [\"PLC13\"],\n \"PLC13_SC2\": [\"PLC13_SC2\"],\n \"PLC14\": [\"PLC14\"],\n \"PLC1501\": [\"ARSAW1501\"],\n \"PLC1502\": [\"ARSAW1502\"],\n \"PLC1503\": [\"ARSAW1503\"],\n \"PLC1504\": [\"ARSAW1504\"],\n \"PLC1505\": [\"ARSAW1505\"],\n \"PLC1506\": [\"ARSAW1506\"],\n \"PLC1507\": [\"ARSAW1507\"],\n \"PLC1508\": [\"ARSAW1508\"],\n \"PLC1509\": [\"ARSAW1509\"],\n \"PLC1510\": [\"ARSAW1510\"],\n \"PLC1511\": [\"ARSAW1511\"],\n \"PLC1512\": [\"ARSAW1512\"],\n \"PLC15_SC1\": [\"PLC15\"],\n \"PLC15_SC2\": [\"PLC15_SC2\"],\n \"PLC16\": [\"PLC16\"],\n \"PLC20_Tote1-3\": [\"PLC20\"],\n \"PLC20_Tote4-8\": [\"PLC20_Tote4-8\"],\n \"PLC21_22\": [\n \"PLC21\",\n \"PLC22\"\n ],\n \"PLC23\": [\"PLC23\"],\n \"PLC24\": [\n \"PLC24\",\n \"PLC97\"\n ],\n \"PLC25\": [\"PLC25\"],\n \"PLC26\": [\"PLC26\"],\n \"PLC27\": [\"PLC27\"],\n \"PLC30\": [\"PLC30\"],\n \"PLC31\": [\"PLC31\"],\n \"PLC32\": [\"PLC32\"],\n \"PLC60\": [\"PLC60\"],\n \"PLC61\": [\"PLC61\"],\n \"PLC69\": [\"PLC69\"],\n \"PLC70\": [\n \"PLC70\",\n \"PLC71\"\n ],\n \"PLC80_81_82\": [\n \"PLC80\",\n \"PLC81\",\n \"PLC82\"\n ]\n}", + "PLCs": "{ \"MCM07 Bypass\": [ \"MCM07\" ], \t\"MCM06 Non Con\": [ \"MCM06\" ],\t \t\"MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve\": [ \"MCM05\" ],\t \t\"MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve\": [ \"MCM04\" ], \t\"MCM03 Non Con\": [ \"MCM03\" ], \t\"MCM02 Fluid Inbound Merges 5-7\": [ \"MCM02\" ], \t\"MCM01 Fluid Inbound Merges 1-4\": [ \"MCM01\" ]}", "activityLogger": { "alt_pageid": "command_control", "start_time": { "$": [ "ts", 192, - 1715227222179 + 1751987721218 ], - "$ts": 1715227222179 + "$ts": 1751987721218 } }, "devices": { - "ARSAW1301": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1301", + "MCM01": { + "area": "Fluid Inbound Merges 1-4", + "name": "MCM01", "tagProps": [ - "ARSAW1301", + "MCM01", "value", "value", "value", @@ -29,11 +29,11 @@ "value" ] }, - "ARSAW1302": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1302", + "MCM02": { + "area": "Fluid Inbound Merges 5-7", + "name": "MCM02", "tagProps": [ - "ARSAW1302", + "MCM02", "value", "value", "value", @@ -45,11 +45,11 @@ "value" ] }, - "ARSAW1303": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1303", + "MCM03": { + "area": "Non Con Merge", + "name": "MCM03", "tagProps": [ - "ARSAW1303", + "MCM03", "value", "value", "value", @@ -61,11 +61,11 @@ "value" ] }, - "ARSAW1304": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1304", + "MCM04": { + "area": "South Bulk Inbound, Fluid Outbound and Problem Solve", + "name": "MCM04", "tagProps": [ - "ARSAW1304", + "MCM04", "value", "value", "value", @@ -77,11 +77,11 @@ "value" ] }, - "ARSAW1305": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1305", + "MCM05": { + "area": "North Bulk Inbound, Fluid Outbound and Problem Solve", + "name": "MCM05", "tagProps": [ - "ARSAW1305", + "MCM05", "value", "value", "value", @@ -93,11 +93,11 @@ "value" ] }, - "ARSAW1306": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1306", + "MCM06": { + "area": "Non Con Sorters", + "name": "MCM06", "tagProps": [ - "ARSAW1306", + "MCM06", "value", "value", "value", @@ -109,1003 +109,11 @@ "value" ] }, - "ARSAW1307": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1307", + "MCM07": { + "area": "Bypass", + "name": "MCM07", "tagProps": [ - "ARSAW1307", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1308": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1308", - "tagProps": [ - "ARSAW1308", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1309": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1309", - "tagProps": [ - "ARSAW1309", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1310": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1310", - "tagProps": [ - "ARSAW1310", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1311": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1311", - "tagProps": [ - "ARSAW1311", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1312": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1312", - "tagProps": [ - "ARSAW1312", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1501": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1501", - "tagProps": [ - "ARSAW1501", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1502": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1502", - "tagProps": [ - "ARSAW1502", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1503": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1503", - "tagProps": [ - "ARSAW1503", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1504": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1504", - "tagProps": [ - "ARSAW1504", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1505": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1505", - "tagProps": [ - "ARSAW1505", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1506": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1506", - "tagProps": [ - "ARSAW1506", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1507": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1507", - "tagProps": [ - "ARSAW1507", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1508": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1508", - "tagProps": [ - "ARSAW1508", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1509": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1509", - "tagProps": [ - "ARSAW1509", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1510": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1510", - "tagProps": [ - "ARSAW1510", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1511": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1511", - "tagProps": [ - "ARSAW1511", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "ARSAW1512": { - "area": "AR FLOOR/ARSAW\r\r", - "name": "ARSAW1512", - "tagProps": [ - "ARSAW1512", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "FSC1": { - "area": "/\r\r", - "name": "FSC1", - "tagProps": [ - "FSC1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "FSC10": { - "area": "OUTBOUND/FSC\r\r", - "name": "FSC10", - "tagProps": [ - "FSC10", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "FSC2": { - "area": "/\r\r", - "name": "FSC2", - "tagProps": [ - "FSC2", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "FSC_Cells": { - "area": "/\r\r", - "name": "FSC_Cells", - "tagProps": [ - "FSC_Cells", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "FSC_Induct_1-4": { - "area": "/\r\r", - "name": "FSC_Induct_1-4", - "tagProps": [ - "FSC_Induct_1-4", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC01": { - "area": "OUTBOUND/SHIP\r\r", - "name": "PLC01", - "tagProps": [ - "PLC01", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC02": { - "area": "OUTBOUND/SHIP\r\r", - "name": "PLC02", - "tagProps": [ - "PLC02", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC03": { - "area": "OUTBOUND/KO \u0026 REJECT\r\r", - "name": "PLC03", - "tagProps": [ - "PLC03", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC06": { - "area": "OUTBOUND/TOTE ROUTER\r\r", - "name": "PLC06", - "tagProps": [ - "PLC06", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC07": { - "area": "OUTBOUND/TOTE ROUTER\r\r", - "name": "PLC07", - "tagProps": [ - "PLC07", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC08": { - "area": "OUTBOUND/TOTE FEED\r\r", - "name": "PLC08", - "tagProps": [ - "PLC08", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC09": { - "area": "INBOUND/RECEIVING\r\r", - "name": "PLC09", - "tagProps": [ - "PLC09", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC09_Receiving2": { - "area": "/\r\r", - "name": "PLC09_Receiving2", - "tagProps": [ - "PLC09_Receiving2", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC09_Receiving3": { - "area": "/\r\r", - "name": "PLC09_Receiving3", - "tagProps": [ - "PLC09_Receiving3", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC1000": { - "area": "INBOUND/RECEIVING\r\r", - "name": "PLC1000", - "tagProps": [ - "PLC1000", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC1000_Receiving4": { - "area": "/\r\r", - "name": "PLC1000_Receiving4", - "tagProps": [ - "PLC1000_Receiving4", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC13": { - "area": "AR FLOOR/ARSAW P2\r\r", - "name": "PLC13", - "tagProps": [ - "PLC13", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC13_SC2": { - "area": "/\r\r", - "name": "PLC13_SC2", - "tagProps": [ - "PLC13_SC2", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC14": { - "area": "/\r\r", - "name": "PLC14", - "tagProps": [ - "PLC14", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC15": { - "area": "AR FLOOR/ARSAW P3\r\r", - "name": "PLC15", - "tagProps": [ - "PLC15", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC15_SC2": { - "area": "/\r\r", - "name": "PLC15_SC2", - "tagProps": [ - "PLC15_SC2", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC16": { - "area": "AR FLOOR/PICK TO REBIN P3\r\r", - "name": "PLC16", - "tagProps": [ - "PLC16", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC20": { - "area": "OUTBOUND/AFE1 TOTE 1-3\r\r", - "name": "PLC20", - "tagProps": [ - "PLC20", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC20_Tote4-8": { - "area": "/\r\r", - "name": "PLC20_Tote4-8", - "tagProps": [ - "PLC20_Tote4-8", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC21": { - "area": "OUTBOUND/AFE TRAY ROUTER\r\r", - "name": "PLC21", - "tagProps": [ - "PLC21", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC22": { - "area": "OUTBOUND/AFE TRAY ROUTER\r\r", - "name": "PLC22", - "tagProps": [ - "PLC22", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC23": { - "area": "OUTBOUND/AFE1 TRAY FEED\r\r", - "name": "PLC23", - "tagProps": [ - "PLC23", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC24": { - "area": "OUTBOUND/AFE1 WALL 1-2\r\r", - "name": "PLC24", - "tagProps": [ - "PLC24", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC25": { - "area": "OUTBOUND/AFE1 WALL 3-4\r\r", - "name": "PLC25", - "tagProps": [ - "PLC25", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC26": { - "area": "OUTBOUND/AFE1 WALL 5-6\r\r", - "name": "PLC26", - "tagProps": [ - "PLC26", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC27": { - "area": "OUTBOUND/AFE1 WALL 7-8\r\r", - "name": "PLC27", - "tagProps": [ - "PLC27", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC30": { - "area": "OUTBOUND/AFE1 PACK 1-4\r\r", - "name": "PLC30", - "tagProps": [ - "PLC30", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC31": { - "area": "OUTBOUND/AFE1 PACK 5-8\r\r", - "name": "PLC31", - "tagProps": [ - "PLC31", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC32": { - "area": "OUTBOUND/AFE1 EMP. TOTE\r\r", - "name": "PLC32", - "tagProps": [ - "PLC32", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC60": { - "area": "OUTBOUND/S.PACKING 1\r\r", - "name": "PLC60", - "tagProps": [ - "PLC60", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC61": { - "area": "OUTBOUND/S.PACKING 2\r\r", - "name": "PLC61", - "tagProps": [ - "PLC61", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC69": { - "area": "OUTBOUND/GIFT WRAP\r\r", - "name": "PLC69", - "tagProps": [ - "PLC69", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC70": { - "area": "OUTBOUND/TRANSSHIP\r\r", - "name": "PLC70", - "tagProps": [ - "PLC70", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC71": { - "area": "OUTBOUND/TRANSSHIP\r\r", - "name": "PLC71", - "tagProps": [ - "PLC71", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC80": { - "area": "OUTBOUND/SMART PACKING\r\r", - "name": "PLC80", - "tagProps": [ - "PLC80", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC81": { - "area": "OUTBOUND/SMART PACKING\r\r", - "name": "PLC81", - "tagProps": [ - "PLC81", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC82": { - "area": "OUTBOUND/SMART PACKING\r\r", - "name": "PLC82", - "tagProps": [ - "PLC82", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC97": { - "area": "SAFETY PLC/\r\r", - "name": "PLC97", - "tagProps": [ - "PLC97", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC98": { - "area": "SAFETY PLC/\r\r", - "name": "PLC98", - "tagProps": [ - "PLC98", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "PLC99": { - "area": "SAFETY PLC/\r\r", - "name": "PLC99", - "tagProps": [ - "PLC99", + "MCM07", "value", "value", "value", @@ -1200,118 +208,6 @@ }, "root": { "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "300px" - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "path": "session.custom.command_auth.enabled" - }, - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "\u0027Control Enabled Timeout: \u0027 + ({session.custom.command_auth.timeout_sp} - {session.custom.command_auth.auth_timeout}) + \u0027 seconds\u0027" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#000000", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "marginBottom": 15, - "marginTop": 15 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif self.session.custom.command_auth.enabled:\n\t\t\tself.session.custom.command_auth.enabled \u003d False\n\telse:\n\t\t#self.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.openPopup(\u0027command-auth\u0027, \u0027PopUp-Views/Command-Authenticate\u0027, showCloseIcon \u003d False, draggable \u003d False, modal \u003d True, overlayDismiss \u003d True)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_0", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "175px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "//if({this.props.enabled}, \u0027Re-Authenticate to Enable Command Controls\u0027, \u0027Insufficient Privileges - User Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)\r\nif({session.custom.command_auth.enabled},\u0027Click to Disable Controls.\u0027, \u0027Re-Authenticate to Enable Command Controls \\nUser Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)" - }, - "type": "expr" - } - }, - "props.image.icon.path": { - "binding": { - "config": { - "expression": "if({session.custom.command_auth.enabled},\u0027material/lock_open\u0027,\u0027material/lock\u0027)" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "if({session.custom.command_auth.enabled},\u0027Disable Controls\u0027,\u0027Enable Controls\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": {} - }, - "primary": false, - "style": { - "marginBottom": 15, - "marginRight": 5, - "marginTop": 15 - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "justify": "flex-end" - }, - "type": "ia.container.flex" - }, { "meta": { "name": "Table" @@ -1738,6 +634,7 @@ ], "dragOrderable": false, "pager": { + "activeOption": 50, "initialOption": 50 }, "rows": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json index ebd5309..f0787b1 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Navigation-Views/Docked-South/view.json @@ -1,9 +1,58 @@ { - "custom": {}, + "custom": { + "MCM": 1, + "currentTable": "ACTIVE", + "page": "", + "view": "" + }, "params": {}, + "propConfig": { + "custom.MCM": { + "binding": { + "config": { + "expression": "if({view.custom.view} !\u003d \"\", {view.custom.view}, {view.custom.page})" + }, + "type": "expr" + }, + "persistent": true + }, + "custom.currentTable": { + "persistent": true + }, + "custom.page": { + "binding": { + "config": { + "path": "page.props.path" + }, + "transforms": [ + { + "code": "\ttry:\n\t\tif \"MCM\" in value:\n\t\t\tindex \u003d value.find(\"MCM\")\n\t\t\treturn value[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.view": { + "binding": { + "config": { + "path": "page.props.primaryView" + }, + "transforms": [ + { + "code": "\ttry:\n\t\tif \"MCM\" in value:\n\t\t\tindex \u003d value.find(\"MCM\")\n\t\t\treturn value[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"", + "type": "script" + } + ], + "type": "property" + }, + "persistent": true + } + }, "props": { "defaultSize": { - "height": 247, + "height": 250, "width": 1920 } }, @@ -12,75 +61,14 @@ { "children": [ { - "custom": { - "show_view": "Alarms" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpayload \u003d {}\n\tif self.custom.show_view \u003d\u003d \"Alarms\":\n\t\tself.custom.show_view \u003d \"State\"\n\t\tpayload[\"data\"] \u003d \"State\"\n\t\thandle_icon \u003d \"material/play_arrow\"\n\telif self.custom.show_view \u003d\u003d \"State\":\t\n\t\tself.custom.show_view \u003d \"Alarms\"\n\t\tpayload[\"data\"] \u003d \"Alarms\"\n\t\thandle_icon \u003d \"material/notifications_active\"\n\tsystem.perspective.alterDock(\"Docked-South\", { \"handleIcon\": handle_icon } )\n\tsystem.perspective.sendMessage(\"change-docked-view\", \n\t\t\t\t\t\t\t\t\tpayload \u003d payload, scope \u003d \"page\")" - }, - "scope": "G", - "type": "script" - } - } - }, "meta": { - "name": "Show", - "tooltip": { - "enabled": true - } + "name": "Label" }, "position": { - "basis": "70px", - "display": false + "basis": "32px", + "grow": 1 }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "case({this.custom.show_view},\r\n\"Alarms\", \"Displaying active alarms\",\r\n\"State\", \"displaying current state of equipment\",\r\n\"Unknown\")" - }, - "type": "expr" - } - }, - "props.image.icon.path": { - "binding": { - "config": { - "expression": "case({this.custom.show_view},\r\n\"Alarms\", \"material/play_arrow\",\r\n\"State\", \"material/notifications_active\",\r\n\"material/device_unknown\")" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "case({this.custom.show_view},\r\n\"Alarms\", \"State\",\r\n\"State\", \"Alarms\",\r\n\"Unknown\")" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "color": "#FFFFFF" - }, - "position": "top", - "width": 32 - }, - "style": { - "classes": "Buttons/Button-Menu", - "color": "#FFFFFF", - "margin": 1 - }, - "textStyle": { - "classes": "Text-Styles/Docked-Buttons" - } - }, - "type": "ia.input.button" + "type": "ia.display.label" } ], "meta": { @@ -101,52 +89,3047 @@ { "children": [ { - "custom": { - "view": "Alarms" - }, + "children": [ + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\tdata \u003d self.props.selection.data\n\t\n\talarms.alarm_click.handleClick(data)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "active-table" + }, + "position": { + "basis": "1080px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.currentTable} \u003d \"ACTIVE\"" + }, + "type": "expr" + } + }, + "props.columns[4].filter.string.value": { + "binding": { + "config": { + "path": "view.custom.MCM" + }, + "type": "property" + } + }, + "props.data": { + "binding": { + "config": { + "parameters": { + "priorityList": "{this.custom.priorities}" + }, + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetActiveAlarms" + }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d [col for col in ds.columnNames if col !\u003d \"EndTimestamp\"]\n\t\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", + "type": "script" + } + ], + "type": "query" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "NumberID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Number (ID)" + }, + "justify": "left", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "StartTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "Event Timestamp" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals", + "value": "" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "string", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 80 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "FullTag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "emptyMessage": { + "noData": { + "text": "No Active Alarms" + }, + "noFilterResults": { + "text": "No Active Alarms" + } + }, + "filter": { + "results": { + "enabled": true + } + }, + "pager": { + "bottom": false + } + }, + "type": "ia.display.table" + }, + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\tdata \u003d self.props.selection.data\n\t\n\talarms.alarm_click.handleClick(data)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "hitList-table" + }, + "position": { + "basis": "1080px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.currentTable} \u003d \"HITLIST\"" + }, + "type": "expr" + } + }, + "props.columns[5].filter.string.value": { + "binding": { + "config": { + "path": "view.custom.MCM" + }, + "type": "property" + } + }, + "props.data": { + "binding": { + "config": { + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetAlarmsWithCount" + }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data\n", + "type": "script" + } + ], + "type": "query" + } + }, + "props.editingCell": { + "onChange": { + "enabled": null, + "script": "\tall_alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\tshelved_alarms \u003d [alarm for alarm in all_alarms if alarm.isShelved()]\n\t\n\t# Build dataset for table\n\theaders \u003d [\u0027ID\u0027, \u0027StartTimestamp\u0027, \u0027EndTimestamp\u0027, \u0027Duration\u0027, \u0027Description\u0027, \u0027Priority\u0027, \u0027Tag\u0027, \u0027MCM\u0027]\n\tdata \u003d []\n\t\n\tfor alarm in shelved_alarms:\n\t # Calculate duration (time since shelved)\n\t if alarm.activeTime:\n\t duration_ms \u003d system.date.now().getTime() - alarm.activeTime.getTime()\n\t duration_seconds \u003d duration_ms / 1000\n\t hours \u003d int(duration_seconds / 3600)\n\t minutes \u003d int((duration_seconds % 3600) / 60)\n\t seconds \u003d int(duration_seconds % 60)\n\t duration \u003d \"%02d:%02d:%02d\" % (hours, minutes, seconds)\n\t else:\n\t duration \u003d \"00:00:00\"\n\t \n\t # Extract tag name from source\n\t tag_name \u003d alarm.source.split(\u0027/\u0027)[-1] if \u0027/\u0027 in alarm.source else alarm.source\n\t \n\t row \u003d [\n\t str(alarm.id) if hasattr(alarm, \u0027id\u0027) else \u0027\u0027,\n\t alarm.activeTime if alarm.activeTime else system.date.now(),\n\t None, # End timestamp (shelved alarms don\u0027t have end time yet)\n\t duration,\n\t alarm.displayPath if alarm.displayPath else alarm.source,\n\t alarm.priority.name if alarm.priority else \u0027Unknown\u0027,\n\t tag_name,\n\t \u0027System\u0027 # Adjust based on your source format\n\t ]\n\t data.append(row)\n\t\n\t# Create dataset and update the custom property\n\tdataset \u003d system.dataset.toDataSet(headers, data)\n\tself.custom.shelvedAlarmsData \u003d dataset" + } + }, + "props.selection": { + "persistent": true + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "FirstTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "backgroundColor": "#FFFEFE", + "classes": "" + }, + "title": "First Timestamp" + }, + "justify": "left", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "value", + "dateFormat": "MM-DD-YYYY HH:mm:ss", + "editable": false, + "field": "LastTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Last Timestamp" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "none", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM-DD-YYYY HH:mm:ss", + "editable": false, + "field": "Count", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "none", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "FullTag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "emptyMessage": { + "noData": { + "text": "No Alarms" + }, + "noFilterResults": { + "text": "No Alarms" + } + }, + "filter": { + "results": { + "enabled": true + } + }, + "pager": { + "activeOption": 5, + "bottom": false + } + }, + "type": "ia.display.table" + }, + { + "events": { + "component": { + "onRowDoubleClick": { + "config": { + "script": "\tdata \u003d self.props.selection.data\n\t\n\talarms.alarm_click.handleClick(data)" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "historical-table" + }, + "position": { + "basis": "1080px", + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "{view.custom.currentTable} \u003d \"HISTORY\"" + }, + "type": "expr" + } + }, + "props.columns[6].filter.string.value": { + "binding": { + "config": { + "path": "view.custom.MCM" + }, + "type": "property" + } + }, + "props.data": { + "binding": { + "config": { + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetAlarms" + }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", + "type": "script" + } + ], + "type": "query" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "ID", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "", + "paddingLeft": 12 + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "StartTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": { + "$": [ + "ts", + 201, + 1750755617512 + ], + "$ts": 1750435156149 + } + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Start Timestamp" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "none", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY HH:mm:ss", + "editable": false, + "field": "EndTimestamp", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": { + "$": [ + "ts", + 201, + 1750755617511 + ], + "$ts": 1750436956149 + } + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "End Timestamp" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "Duration", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "", + "paddingLeft": 12 + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "none", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Priority", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "contains", + "value": "" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Severity" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "contains", + "value": "" + }, + "visible": "never" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "FullTag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "", + "display": "none" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + } + ], + "emptyMessage": { + "noData": { + "text": "No Alarms" + }, + "noFilterResults": { + "text": "No Alarms" + } + }, + "enabled": true, + "filter": { + "results": { + "enabled": true + } + }, + "pager": { + "bottom": false + } + }, + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "update-first-request", + "pageScope": true, + "script": "\tdata \u003d payload[\"data\"]\n\tinitial_data \u003d payload[\"initial_data\"]\n\tself.props.data \u003d data\n\tself.custom.initial_data \u003d initial_data", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "update-historical-data", + "pageScope": true, + "script": "\thistorical_data \u003d payload[\"data\"]\n\tself.props.data \u003d historical_data", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "load_initial_data", + "pageScope": true, + "script": "\trequest \u003d payload[\"data\"]\n\tsystem.perspective.print(\"initial message received\")\n\tif request \u003d\u003d True:\n\t\tself.props.data \u003d self.custom.initial_data", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "reset-historical-filters", + "pageScope": true, + "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.data \u003d []\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-source-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-device-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-priority-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-from-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-to-filters", + "pageScope": true, + "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-type-filters", + "pageScope": true, + "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", + "sessionScope": false, + "viewScope": false + }, + { + "messageType": "set-duration-filters", + "pageScope": true, + "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.display.table" + } + ], "meta": { - "name": "EmbeddedView" + "name": "FlexContainer_0" }, "position": { - "basis": "1850px", + "basis": "1920px", "grow": 1 }, - "propConfig": { - "props.path": { - "binding": { - "config": { - "expression": "case({this.custom.view},\r\n\"Alarms\", \"Alarm-Views/AlarmTable\",\r\n\"State\", \"State-Views/State-Table\",\r\n\"Alarm-Views/Docked-Alarm\")" - }, - "type": "expr" - } - } - }, - "props": { - "loading": { - "order": "with-parent" - }, - "params": { - "length_of_table_data": 0 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "change-docked-view", - "pageScope": true, - "script": "\tview \u003d payload[\"data\"]\n\tself.custom.view \u003d view", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.view" + "type": "ia.container.flex" }, { "children": [ { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.currentTable \u003d \"ACTIVE\"" + }, + "scope": "G", + "type": "script" + } + } + }, "meta": { "name": "ACTIVE" }, @@ -164,6 +3147,17 @@ "type": "ia.input.button" }, { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.currentTable \u003d \"HITLIST\"" + }, + "scope": "G", + "type": "script" + } + } + }, "meta": { "name": "HIT LIST" }, @@ -181,6 +3175,17 @@ "type": "ia.input.button" }, { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tself.view.custom.currentTable \u003d \"HISTORY\"" + }, + "scope": "G", + "type": "script" + } + } + }, "meta": { "name": "HISTORY" }, @@ -196,13 +3201,29 @@ "text": "HISTORY" }, "type": "ia.input.button" + }, + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "type": "ia.display.label" } ], "meta": { "name": "FlexContainer" }, "position": { - "basis": "300px" + "basis": "300px", + "grow": 1 + }, + "props": { + "style": { + "gap": 2 + } }, "type": "ia.container.flex" } @@ -220,6 +3241,17 @@ "type": "ia.container.flex" } ], + "events": { + "system": { + "onStartup": { + "config": { + "script": "\tif self.view.custom.currentTable \u003d\u003d \"\":\n\t\tself.view.custom.currentTable \u003d \"ACTIVE\"" + }, + "scope": "G", + "type": "script" + } + } + }, "meta": { "name": "root" }, diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json new file mode 100644 index 0000000..25f036c --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status/view.json new file mode 100644 index 0000000..b4a1db9 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json new file mode 100644 index 0000000..38d4772 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json @@ -0,0 +1,1626 @@ +{ + "custom": { + "PLC_list": [ + "MCM01", + "MCM02", + "MCM03", + "MCM04", + "MCM05", + "MCM06", + "MCM07" + ], + "running_state": -1, + "state": 0, + "views_data": [] + }, + "params": { + "tagProps": [ + "System/Extendo/FL4066_4_EX1", + "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-Extendo\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": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "AOPEN ACTIVE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Aopen Active" + }, + "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}/Aopen_Active" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ACTIVE" + }, + { + "input": 0, + "output": "NOT ACTIVE" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "ACTIVE", + "output": "#47FF47" + }, + { + "input": "NOT ACTIVE", + "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": "Aopen Active" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "FULLY EXTENDED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Fully Extended" + }, + "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}/Fully_Extended" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "EXTENDED" + }, + { + "input": 0, + "output": "NOT EXTENDED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "EXTENDED", + "output": "#47FF47" + }, + { + "input": "NOT EXTENDED", + "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": "Fully Extended" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "FULLY RETRACTED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Fully Retracted" + }, + "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}/Fully_Retracted" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "RETRACTED" + }, + { + "input": 0, + "output": "NOT RETRACTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "RETRACTED", + "output": "#47FF47" + }, + { + "input": "NOT RETRACTED", + "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": "Fully Retracted" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "LOADING MODE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Loading Mode" + }, + "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}/Loading_Mode" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ON" + }, + { + "input": 0, + "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": "Property" + }, + "position": { + "basis": "35px", + "shrink": 2 + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Loading Mode" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "UNLOADING MODE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Unloading Mode" + }, + "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}/Unloading_Mode" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ON" + }, + { + "input": 0, + "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": "Property" + }, + "position": { + "basis": "35px", + "shrink": 2 + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Unloading Mode" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "POWER SAVING MODE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Power Saving Mode" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "TRUE", + "output": "#FFFFFF" + }, + { + "input": "FALSE", + "output": "#D5D5D5" + } + ], + "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}/Unloading_Mode" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ON" + }, + { + "input": 0, + "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": "Property" + }, + "position": { + "basis": "35px", + "shrink": 2 + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Power Saving Mode" + }, + "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+\"/PEC_Override_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 \"#9661A3\",\r\n if(\r\n {this.props.text} \u003d \"PEC OVERRIDE: ON\",\r\n \"#E888FF\",\r\n if(\r\n {this.props.text} \u003d \"PEC OVERRIDE: OFF\",\r\n \"#CC00FF\",\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}/PEC_Override_PB" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "PEC OVERRIDE: OFF", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "PEC OVERRIDE: ON" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "PEC Override" + }, + "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+\"/Extendo_Faults_Reset_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 \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"EXTENDO FAULTS RESET PRESSED\",\r\n \"#FF9191\",\r\n if(\r\n {this.props.text} \u003d \"EXTENDO FAULTS RESET\",\r\n \"#FF0000\",\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}/Extendo_Faults_Reset_PB" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "EXTENDO FAULTS RESET", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "EXTENDO FAULTS RESET PRESSED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Extendo Fault Reset" + }, + "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": { + "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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json new file mode 100644 index 0000000..9df36d1 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json new file mode 100644 index 0000000..6c20759 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json @@ -0,0 +1,2961 @@ +{ + "custom": { + "PLC_list": [ + "MCM01", + "MCM02", + "MCM03", + "MCM04", + "MCM05", + "MCM06", + "MCM07" + ], + "running_state": -1, + "state": 0, + "views_data": [] + }, + "params": { + "tagProps": [ + "System/MCM01/MCM01", + "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-MCM\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": "Name" + }, + "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": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "MOTOR FAULT" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Motor Fault" + }, + "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/Motor_Fault" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "MOTOR FAULTED" + }, + { + "input": 0, + "output": "MOTOR NOT FAULTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "MOTOR FAULTED", + "output": "#FF0000" + }, + { + "input": "MOTOR NOT FAULTED", + "output": "#47FF47" + } + ], + "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": "Motor Fault" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "JAM FAULT" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Jam Fault" + }, + "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/Jam_Fault" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "JAM FAULTED" + }, + { + "input": 0, + "output": "JAM NOT FAULTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "JAM FAULTED", + "output": "#FFC000" + }, + { + "input": "JAM NOT FAULTED", + "output": "#47FF47" + } + ], + "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": "Jam Fault" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "FIRE RELAY DE ENERGIZED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Fire Relay De Energized" + }, + "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/Fire_Relay_De_Energized" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "DE ENERGIZED" + }, + { + "input": 0, + "output": "NOT DE ENERGIZED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "DE ENERGIZED", + "output": "#FF0000" + }, + { + "input": "NOT DE ENERGIZED", + "output": "#47FF47" + } + ], + "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": "Fire Relay De Energized" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "ESTOPPED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Estopped" + }, + "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/EStopped" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ESTOPPED" + }, + { + "input": 0, + "output": "NOT ESTOPPED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "ESTOPPED", + "output": "#FF0000" + }, + { + "input": "NOT ESTOPPED", + "output": "#47FF47" + } + ], + "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": "Estopped" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "ESTOPPED LOCALLY" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Estopped Locally" + }, + "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/EStopped_Locally" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ESTOPPED" + }, + { + "input": 0, + "output": "NOT ESTOPPED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "ESTOPPED", + "output": "#FF0000" + }, + { + "input": "NOT ESTOPPED", + "output": "#47FF47" + } + ], + "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": "Estopped Locally" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "STOPPED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Stopped" + }, + "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/Stopped" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "STOPPED" + }, + { + "input": 0, + "output": "NOT STOPPED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "STOPPED", + "output": "#FF0000" + }, + { + "input": "NOT STOPPED", + "output": "#47FF47" + } + ], + "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": "Stopped" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "NAT SWITCH FAULT" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "NAT Switch Fault" + }, + "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/NAT_Switch_Fault" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "SWITCH FAULTED" + }, + { + "input": 0, + "output": "SWITCH NOT FAULTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "SWITCH FAULTED", + "output": "#FF0000" + }, + { + "input": "SWITCH NOT FAULTED", + "output": "#47FF47" + } + ], + "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": "NAT Switch Fault" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "ON UPS BATTERY" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "On UPS Battery" + }, + "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/On_UPS_Battery" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ON UPS BATTERY" + }, + { + "input": 0, + "output": "NOT ON UPS BATTERY" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "NOT ON UPS BATTERY", + "output": "#FF0000" + }, + { + "input": "NOT ON UPS BATTERY", + "output": "#47FF47" + } + ], + "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": "On UPS Battery" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "UPS BATTERY FAULT" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "UPS Battery Fault" + }, + "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/UPS_Battery_Fault" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "BATTERY FAULTED" + }, + { + "input": 0, + "output": "BATTERY NOT FAULTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "BATTERY FAULTED", + "output": "#FF0000" + }, + { + "input": "BATTERY NOT FAULTED", + "output": "#47FF47" + } + ], + "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": "UPS Battery Fault" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "UPS BATTERY LOW" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "UPS Battery Low" + }, + "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/UPS_Battery_Low" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "BATTERY LOW" + }, + { + "input": 0, + "output": "BATTERY NOT LOW" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "BATTERY LOW", + "output": "#FF0000" + }, + { + "input": "BATTERY NOT LOW", + "output": "#47FF47" + } + ], + "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": "UPS Battery Low" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "UPS BATTERY ON" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "UPS Battery On" + }, + "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/UPS_Battery_On" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ON" + }, + { + "input": 0, + "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": "#FF0000" + }, + { + "input": "OFF", + "output": "#47FF47" + } + ], + "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": "UPS Battery On" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "UPS FAULT" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "UPS Fault" + }, + "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/UPS_Fault" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "UPS FAULTED" + }, + { + "input": 0, + "output": "UPS NOT FAULTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "UPS FAULTED", + "output": "#FF0000" + }, + { + "input": "UPS NOT FAULTED", + "output": "#47FF47" + } + ], + "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": "UPS Fault" + }, + "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": { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#7DB17D\",\r\n if(\r\n {this.props.text} \u003d \"STARTED\",\r\n \"#41E841\",\r\n if(\r\n {this.props.text} \u003d \"START\",\r\n \"#00A700\",\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_STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "START", + "inputType": "scalar", + "mappings": [ + { + "input": 2, + "output": "STARTED" + }, + { + "input": 4, + "output": "STARTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/not_started" + } + }, + "style": { + "classes": "Background-Styles/Controller" + } + }, + "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": { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"STOP PRESSED\",\r\n \"#FF0000\",\r\n if(\r\n {this.props.text} \u003d \"STOP\",\r\n \"#CA0D0D\",\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}/Stop_PB" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "STOP", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "STOP PRESSED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/stop_circle" + } + }, + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Stop" + }, + "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+\"/Motor_Fault_Reset_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}/Motor_Fault_Reset_PB_STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BCBC52\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FCFF86\",\r\n if(\r\n {value},\r\n \"#DCDC03\",\r\n \"#BCBC52\"\r\n )\r\n )\r\n)\r\n", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/refresh" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "MOTOR FAULT RESET", + "textStyle": { + "color": "#000000" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Motor Fault Reset" + }, + "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+\"/Power_Branch_Fault_Reset_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}/Power_Branch_Fault_Reset_PB_STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BCBC52\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FCFF86\",\r\n if(\r\n {value},\r\n \"#DCDC03\",\r\n \"#BCBC52\"\r\n )\r\n )\r\n)\r\n", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/power" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "POWER BRANCH FAULT", + "textStyle": { + "color": "#000000" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Power Branch Fault Reset" + }, + "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+\"/Low_Air_Pressure_Reset_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}/Low_Air_Pressure_Reset_PB_STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#9090C2\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#5D5DFF\",\r\n if(\r\n {value},\r\n \"#0A0AA4\",\r\n \"#9090C2\"\r\n )\r\n )\r\n)\r\n", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/waves" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "LOW AIR PRESSURE RESET" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Low Air Pressure Reset" + }, + "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+\"/Jam_Restart_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}/Jam_Restart_PB_STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FFFFFF\",\r\n if(\r\n {value},\r\n \"#D4D4D4\",\r\n \"#A1A1A1\"\r\n )\r\n )\r\n)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/sync_problem" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "JAM RESTART", + "textStyle": { + "color": "#000000" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Jam Restart" + }, + "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+\"/Setup_Motor_Speeds\"\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}/Setup_Motor_Speeds" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 1,\r\n \"#FFFFFF\",\r\n \"#A1A1A1\"\r\n )\r\n)\r\n", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "color": "#000000", + "path": "material/speed" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "SETUP MOTOR SPEEDS", + "textStyle": { + "color": "#000000" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Setup Motor Speeds" + }, + "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": { + "currentTabIndex": 2, + "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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json new file mode 100644 index 0000000..9d2f483 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered/view.json new file mode 100644 index 0000000..bd81422 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered/view.json @@ -0,0 +1,1833 @@ +{ + "custom": { + "PLC_list": null, + "running_state": -1, + "state": 0, + "type": 0, + "views_data": [] + }, + "params": { + "tagProps": [ + "/System/D2C/TESTCHUTE", + "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 + }, + { + "input": 4, + "output": 4 + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.type": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + } + ], + "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-SNP\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 + }, + "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": "Name" + }, + "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": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "FULL" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Full" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "FULL", + "output": "#D5D5D5" + }, + { + "input": "NOT FULL", + "output": "#D5D5D5" + } + ], + "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/Full" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "FULL" + }, + { + "input": 0, + "output": "NOT FULL" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "FULL", + "output": "#0008FF" + }, + { + "input": "NOT FULL", + "output": "#47FF47" + } + ], + "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": "Full" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "DISABLED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Disabled" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "TRUE", + "output": "#D5D5D5" + }, + { + "input": "FALSE", + "output": "#D5D5D5" + } + ], + "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/Disabled" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus}, \"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "TRUE" + }, + { + "input": 0, + "output": "FALSE" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "TRUE", + "output": "#FF0000" + }, + { + "input": "FALSE", + "output": "#47FF47" + } + ], + "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": "Disabled" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": true + }, + { + "input": 2, + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "HALF FULL" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Half Full" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "HALF FULL", + "output": "#D5D5D5" + }, + { + "input": "NOT HALF FULL", + "output": "#D5D5D5" + } + ], + "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/Half_Full" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "HALF FULL" + }, + { + "input": 0, + "output": "NOT HALF FULL" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "HALF FULL", + "output": "#FFF000" + }, + { + "input": "NOT HALF FULL", + "output": "#47FF47" + } + ], + "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": "Half Full" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": true + }, + { + "input": 2, + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "JAM" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Jam" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "JAMMED", + "output": "#D5D5D5" + }, + { + "input": "NOT JAMMED", + "output": "#D5D5D5" + } + ], + "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/Jam" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "JAMMED" + }, + { + "input": 0, + "output": "NOT JAMMED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "JAMMED", + "output": "#FF8C00" + }, + { + "input": "NOT JAMMED", + "output": "#47FF47" + } + ], + "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": "Jam" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": true + }, + { + "input": 2, + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "NO CONTAINER" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "No Container" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "NO CONTAINER", + "output": "#D5D5D5" + }, + { + "input": "CONTAINER PRESENT", + "output": "#D5D5D5" + } + ], + "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/No_Container" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "NO CONTAINER" + }, + { + "input": 0, + "output": "CONTAINER PRESENT" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "NO CONTAINER", + "output": "#FF4487" + }, + { + "input": "CONTAINER PRESENT", + "output": "#47FF47" + } + ], + "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": "No Container" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Name" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "READY TO BE ENABLED" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Ready To Be Enabled" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": "READY", + "output": "#D5D5D5" + }, + { + "input": "ENABLED", + "output": "#D5D5D5" + } + ], + "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},0)", + "type": "expression" + }, + { + "fallback": "ENABLED", + "inputType": "scalar", + "mappings": [ + { + "input": 6, + "output": "READY" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "READY", + "output": "#92FF00" + }, + { + "input": "ENABLED", + "output": "#47FF47" + } + ], + "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": "Ready To Be Enabled" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "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+\"/Enable_Chute_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\t" + }, + "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 \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"DISABLE\",\r\n \"#FF0000\",\r\n if(\r\n {this.props.text} \u003d \"ENABLE\",\r\n \"#C9FCC0\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" + }, + "type": "expr" + } + }, + "props.style.color": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Disabled" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "#FFFFFF", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "#000000" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + } + }, + "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/Disabled" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "DISABLE", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ENABLE" + }, + { + "input": 0, + "output": "DISABLE" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/cached" + } + }, + "style": { + "classes": "Background-Styles/Controller" + } + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Enable" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "meta.visible": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": false, + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": true + }, + { + "input": 2, + "output": true + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "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 + }, + "propConfig": { + "props.tabs": { + "binding": { + "config": { + "path": "view.custom.type" + }, + "transforms": [ + { + "code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d 0:\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "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 + } + } + }, + "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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-VFD/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-VFD/view.json new file mode 100644 index 0000000..f46015e --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-VFD/view.json @@ -0,0 +1,2424 @@ +{ + "custom": { + "PLC_list": null, + "running_state": -1, + "state": 0, + "views_data": [] + }, + "params": { + "tagProps": [ + "System/Conveyor/APF/FL1038_2_VFD1", + "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": 403 + } + }, + "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-VFD\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": "Header" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px", + "display": false + }, + "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.conditions.displayPath": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "code": "\tparts \u003d value.split(\"/\")\n\tname \u003d parts[-1]\n\t\n\t# Split on \"_\" and remove the last part\n\tname_parts \u003d name.split(\"_\")\n\tnew_name \u003d \"_\".join(name_parts[:-1])\n\t\n\treturn new_name + \"_PE*,\" + new_name + \"_VFD*\"", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "columns": { + "active": { + "displayPath": { + "enabled": false + }, + "priority": { + "enabled": false + }, + "source": { + "enabled": false + }, + "state": { + "enabled": false + } + } + }, + "enableAcknowledge": false, + "enableDetails": false, + "enableShelve": false, + "enableUnshelve": false, + "filters": { + "active": { + "conditions": {}, + "priorities": { + "critical": false, + "high": false, + "low": false, + "medium": false + }, + "states": { + "clearUnacked": false + } + } + }, + "pager": { + "enabled": false + }, + "refreshRate": 500, + "rowStyles": { + "activeAcked": { + "priorities": { + "diagnostic": { + "backgroundColor": "#579af1" + }, + "high": { + "backgroundColor": "#fb615b" + }, + "low": { + "backgroundColor": "#f8fa6e" + }, + "medium": { + "backgroundColor": "#ee9b5c" + } + } + }, + "activeUnacked": { + "base": { + "color": "black" + }, + "priorities": { + "critical": { + "backgroundColor": "#7C2320" + }, + "diagnostic": { + "backgroundColor": "#579af1" + }, + "high": { + "backgroundColor": "#fb615b" + }, + "low": { + "backgroundColor": "#f8fa6e" + }, + "medium": { + "backgroundColor": "#ee9b5c" + } + } + } + }, + "selection": { + "active": { + "mode": "none" + }, + "shelved": { + "mode": "none" + } + }, + "toolbar": { + "enableActiveTab": false, + "enableConfiguration": false, + "enableFilter": false, + "enableFilterResults": false, + "enablePreFilters": false, + "enableShelvedTab": false, + "enabled": false + } + }, + "type": "ia.display.alarmstatustable" + } + ], + "meta": { + "name": "Active_tab" + }, + "props": { + "direction": "column", + "justify": "space-around" + }, + "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": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "VFD" + }, + "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": "STATE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "State" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.style.backgroundColor": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#D5D5D5", + "inputType": "scalar", + "mappings": [ + { + "input": "FULL", + "output": "#FFFFFF" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "property" + } + }, + "props.text": { + "binding": { + "config": { + "expression": "case({..../State.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\n\"UNKNOWN\")" + }, + "type": "expr" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "expression": "switch(\r\n toInt({..../State.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14,61,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#00ffd0\", \"#ff8c00\",\r\n \"#0008ff\", \"#946446\", \"#ff0000\", \"#ff0000\", \"#ff0000\", \"#ff8c00\", \"#c2c2c2\", \"#B45C5C\",\r\n \"#000000\"\r\n)\r\n\r\n" + }, + "type": "expr" + } + } + }, + "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": "State" + }, + "position": { + "basis": "35px" + }, + "propConfig": { + "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},404)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "FPM" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "FPM" + }, + "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}/FPM" + }, + "transforms": [ + { + "expression": "if(coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027) \u003d \u0027UNKNOWN\u0027, \u0027UNKNOWN\u0027, coalesce({value},{view.params.forceFaultStatus}) + \" FPM\")", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FPM" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "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}/VFD_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN (FREQ/VELOCITY)\u0027)", + "type": "expression" + }, + { + "fallback": "UNKNOWN (FREQ/VELOCITY)", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "VELOCITY" + }, + { + "input": 0, + "output": "FREQUENCY" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "paddingLeft": 20 + } + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Frequency_Velocity" + }, + "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}/VFD_Type" + }, + "transforms": [ + { + "code": "\n provider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n baseTag \u003d self.view.params.tagProps[0]\n basePath \u003d \"[\"+ provider + \"]\" + baseTag\n child \u003d \"\"\n unit \u003d \"\"\n \n\n if value \u003d\u003d 1:\n child \u003d \"Velocity\"\n unit \u003d \" Rev/s\"\n else:\n child \u003d \"Frequency\"\n unit \u003d \" Hz\"\n\n fullPath \u003d basePath + \"/\" + child\n tagValue \u003d system.tag.readBlocking([fullPath])[0]\n result \u003d tagValue.value\n\t\n if result is None or str(result) \u003d\u003d \"None\":\n return \"UNKNOWN\"\n else:\n return str(result) + unit", + "type": "script" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Frequency_Velocity" + }, + "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": "AMPERAGE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Amperage" + }, + "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(coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027) \u003d \u0027UNKNOWN\u0027, \u0027UNKNOWN\u0027, coalesce({value},{view.params.forceFaultStatus}) + \" A\")", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Amperage" + }, + "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": "VOLTAGE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Voltage" + }, + "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}/Voltage" + }, + "transforms": [ + { + "expression": "if(coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027) \u003d \u0027UNKNOWN\u0027, \u0027UNKNOWN\u0027, coalesce({value},{view.params.forceFaultStatus}) + \" V\")", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Voltage" + }, + "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 FAULT CODE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Communication_Fault_Code" + }, + "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}/Communication_Fault_Code" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Communication_Fault_Code" + }, + "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": "VFD FAULT CODE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "VFD_Fault_Code" + }, + "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}/VFD_Fault_Code" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "VFD_Fault_Code" + }, + "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": "LAST VFD FAULT CODE" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "Last_VFD_Fault_Code" + }, + "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}/Last_VFD_Fault_Code" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Last_VFD_Fault_Code" + }, + "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": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px" + }, + "props": { + "text": "Commands", + "textStyle": { + "color": "#060606" + } + }, + "type": "ia.display.label" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Speed_At_60Hz_30rev" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "propConfig": { + "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}/VFD_Type" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN (60hz/30rev)\u0027)", + "type": "expression" + }, + { + "fallback": "Unknown (60hz/30rev)", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Speed At 30 rev/s" + }, + { + "input": 0, + "output": "Speed At 60Hz" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "padding": 20 + }, + "textStyle": { + "color": "#7D7D7D" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\n\tvfdType \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + self.view.params.tagProps[0] + \"/VFD_Type\"\n\tprop \u003d \"\"\n\t\n\tvfdTypeVal \u003d system.tag.readBlocking([vfdType])[0].value\n\t\n\tif vfdTypeVal \u003d\u003d 1:\n\t\tprop \u003d \"Speed_At_30rev\"\n\telse:\n\t\tprop \u003d \"Speed_At_60Hz\"\n\t\t\n\tpropHzRev \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + self.view.params.tagProps[0] + \"/\" + prop\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propHzRev], [value])\n\t\t\n\t" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "150px" + }, + "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.value": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/VFD_Type" + }, + "transforms": [ + { + "code": "\n provider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n baseTag \u003d self.view.params.tagProps[0]\n basePath \u003d \"[\"+ provider + \"]\" + baseTag\n child \u003d \"\"\n \n\n if value \u003d\u003d 1:\n child \u003d \"Speed_At_30rev\"\n else:\n child \u003d \"Speed_At_60Hz\"\n\n fullPath \u003d basePath + \"/\" + child\n tagValue \u003d system.tag.readBlocking([fullPath])[0]\n result \u003d tagValue.value\n\t\n \n return result", + "type": "script" + }, + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "inputBounds": { + "maximum": 1000, + "minimum": 0 + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "200px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Speed_At_60Hz_30rev" + }, + "position": { + "basis": "46px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Cycle_Time_Factor" + }, + "position": { + "basis": "50px", + "grow": 1 + }, + "props": { + "style": { + "padding": 20 + }, + "text": "Cycle Time Factor", + "textStyle": { + "color": "#7D7D7D" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+ self.view.params.tagProps[0] + \"/Cycle_Time_Factor\"\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propMaintMode], [value])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "150px" + }, + "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.value": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Cycle_Time_Factor" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "inputBounds": { + "maximum": 1000, + "minimum": 0 + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "200px" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Cycle_Time_Factor" + }, + "position": { + "basis": "46px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Commands" + }, + "position": { + "basis": "200px" + }, + "props": { + "alignContent": "flex-start", + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Maintenance_Mode\"\n\tinMaintenanceMode \u003d system.tag.readBlocking([propMaintMode])[0].value\n\t\n\n\tsystem.tag.writeBlocking([propMaintMode], [not inMaintenanceMode])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Maintenance" + }, + "position": { + "basis": "34px" + }, + "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}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027#000000\u0027)", + "type": "expression" + }, + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": false, + "output": "#0000FF" + }, + { + "input": true, + "output": "#7E5A5A" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027Unknown\u0027)", + "type": "expression" + }, + { + "fallback": "Maintenance Mode: Unknown", + "inputType": "scalar", + "mappings": [ + { + "input": false, + "output": "Activate Maintenance Mode" + }, + { + "input": true, + "output": "Disable Maintenance Mode" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "marginBottom": 10 + } + }, + "type": "ia.input.button" + }, + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "50px" + }, + "props": { + "text": "FPM", + "textStyle": { + "color": "#7D7D7D" + } + }, + "type": "ia.display.label" + }, + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+ self.view.params.tagProps[0] + \"/Maintenance/Speed_FPM\"\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propMaintMode], [value])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "NumericEntryField" + }, + "position": { + "basis": "150px" + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "if(\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || \r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0,\r\n {value},\r\n false\r\n)\r\n", + "type": "expression" + }, + { + "expression": "if(isNull({value}), false, {value})", + "type": "expression" + } + ], + "type": "tag" + } + }, + "props.value": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Speed_FPM" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + } + ], + "type": "tag" + } + } + }, + "props": { + "inputBounds": { + "maximum": 1000, + "minimum": 0 + } + }, + "type": "ia.input.numeric-entry-field" + } + ], + "meta": { + "name": "FPM" + }, + "position": { + "basis": "65px", + "shrink": 0 + }, + "props": { + "justify": "center", + "style": { + "marginBottom": 10 + } + }, + "type": "ia.container.flex" + }, + { + "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+\"/Maintenance/Start_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Start" + }, + "position": { + "basis": "80px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Buttons_State" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "#00D900", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "#00D900" + }, + { + "input": 1, + "output": "#00FF00" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Buttons_State" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "START", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "STARTED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "marginBottom": 10 + } + }, + "type": "ia.input.button" + }, + { + "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+\"/Maintenance/Stop_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Stop" + }, + "position": { + "basis": "80px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Buttons_State" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "#D90000", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "#D90000" + }, + { + "input": 2, + "output": "#FF0000" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Buttons_State" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "STOP", + "inputType": "scalar", + "mappings": [ + { + "input": 2, + "output": "STOPPED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "marginBottom": 10 + } + }, + "type": "ia.input.button" + }, + { + "events": { + "dom": { + "onMouseDown": { + "config": { + "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tspeedFPM \u003d self.parent.getChild(\"FPM\").getChild(\"NumericEntryField\").props.value\n\tif (speedFPM !\u003d 0):\t\n\t\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Jog_PB_Pressed\"\n\t\tsystem.tag.writeBlocking([tag_path],[True])" + }, + "scope": "G", + "type": "script" + }, + "onMouseUp": { + "config": { + "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tspeedFPM \u003d self.parent.getChild(\"FPM\").getChild(\"NumericEntryField\").props.value\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Jog_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[False])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Jog" + }, + "position": { + "basis": "80px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Jog_PB_Pressed" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "#00ACAC", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "#47FFFF" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Jog_PB_Pressed" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "JOG", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "JOG PRESSED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "marginBottom": 10 + } + }, + "type": "ia.input.button" + }, + { + "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+\"/Maintenance/Direction_PB_Pressed\"\n\tdirection \u003d system.tag.readBlocking([tag_path])[0].value\n\tsystem.tag.writeBlocking([tag_path], [not direction])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Direction" + }, + "position": { + "basis": "80px", + "shrink": 0 + }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" + }, + "transforms": [ + { + "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", + "type": "expression" + } + ], + "type": "tag" + } + }, + "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}/Maintenance/Direction" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027Direction\u0027)", + "type": "expression" + }, + { + "fallback": "Direction Backward", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "Direction Forward" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "style": { + "backgroundColor": "#095ECD", + "marginBottom": 10 + } + }, + "type": "ia.input.button" + } + ], + "custom": { + "errorMessage": "" + }, + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "500px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Maintenance" + }, + "position": { + "basis": "400px", + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "marginTop": -40 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Commands_tab" + }, + "position": { + "tabIndex": 2 + }, + "props": { + "alignItems": "center", + "direction": "column", + "enabled": false, + "justify": "space-between", + "style": { + "paddingTop": 1 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "tabs" + }, + "position": { + "grow": 1 + }, + "props": { + "currentTabIndex": 2, + "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": "Main" + }, + "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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json index 952e6e3..6520bf9 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Detail-View-Filter/view.json @@ -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" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json index 1a47bff..79af848 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Legend_Popup/Legend-popup-view/view.json @@ -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": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json index ef23621..d782399 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json @@ -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", diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json index c03ab77..479275f 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlAlarms/view.json @@ -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": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json index 1e5a023..2a04795 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlStatus/view.json @@ -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" }, diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json index 0759166..5e0ef42 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json @@ -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": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json index 2998733..50c4f2a 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Device-Views/DeviceStatus/view.json @@ -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" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Area_Nav_Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Area_Nav_Button/view.json new file mode 100644 index 0000000..e5f92f4 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Area_Nav_Button/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Button/view.json new file mode 100644 index 0000000..172691e --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Button/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json index 14a2b6c..422480d 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Camera/view.json @@ -719,7 +719,8 @@ "aspectRatio": "40:25", "mode": "percent", "style": { - "cursor": "pointer" + "cursor": "pointer", + "overflow": "hidden" } }, "type": "ia.container.coord" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json index c0e179f..a197783 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json @@ -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" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Divert_Arm/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Divert_Arm/view.json new file mode 100644 index 0000000..b88c843 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Divert_Arm/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json index 9c7decd..4f278ad 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Estop/view.json @@ -481,7 +481,7 @@ "meta.visible": { "binding": { "config": { - "path": "view.custom.display_icon" + "path": "session.custom.alarm_filter.show_safety" }, "type": "property" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json new file mode 100644 index 0000000..6353d9a --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JR_Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JR_Button/view.json new file mode 100644 index 0000000..68a92d6 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/JR_Button/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json new file mode 100644 index 0000000..286ab4e --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json index c513773..7131b7a 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json @@ -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": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json index 9e5f0ea..ddb7284 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json @@ -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": { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json index 113bd45..ca1c9df 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json @@ -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" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json index 1bb31fc..8c75160 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json @@ -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" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SS_Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SS_Button/view.json new file mode 100644 index 0000000..46f871e --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/SS_Button/view.json @@ -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" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json index 87d71c8..4f1fc26 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Status/view.json @@ -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" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json index 5a47f4f..a63638f 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/StatusNonPowered/view.json @@ -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" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql new file mode 100644 index 0000000..96d1372 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql @@ -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; \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarmsByLocationAndPriority/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarmsByLocationAndPriority/query.sql new file mode 100644 index 0000000..6726fac --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarmsByLocationAndPriority/query.sql @@ -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; diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql new file mode 100644 index 0000000..b029688 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -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; diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql new file mode 100644 index 0000000..0cd98a1 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql @@ -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; diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/alarms/alarm_click/code.py b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/alarms/alarm_click/code.py new file mode 100644 index 0000000..d2c79c8 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/alarms/alarm_click/code.py @@ -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)}) \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/messaging/message_handler/code.py b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/messaging/message_handler/code.py index b0112aa..6427538 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/messaging/message_handler/code.py +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/script-python/messaging/message_handler/code.py @@ -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")