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..5fcb913 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,31 +2,14 @@ "custom": { "activityLogger": { "alt_pageid": "alarms", + "pageid": "alarms/ActiveAlarms", "start_time": { "$": [ "ts", 192, - 1718118450597 + 1748425447154 ], - "$ts": 1718118450596 - } - } - }, - "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" + "$ts": 1748425447154 } } }, @@ -38,20 +21,6 @@ "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 @@ -79,7 +48,7 @@ "children": [ { "meta": { - "name": "Label" + "name": "Label_0" }, "position": { "basis": "10px" @@ -88,14 +57,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 +71,10 @@ } }, "meta": { - "name": "Button" + "name": "Button_4" }, "position": { - "basis": "125px", - "display": false + "basis": "125px" }, "propConfig": { "props.style.classes": { @@ -144,7 +111,9 @@ "path": "material/error" } }, - "style": {}, + "style": { + "margin": 15 + }, "text": "Critical" }, "scripts": { @@ -162,15 +131,6 @@ }, "type": "ia.input.button" }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, { "custom": { "Severity": "High", @@ -180,7 +140,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 +221,15 @@ }, "type": "ia.display.label" }, + { + "meta": { + "name": "Label_4" + }, + "position": { + "basis": "10px" + }, + "type": "ia.display.label" + }, { "custom": { "Severity": "Medium", @@ -270,7 +239,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 +329,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" @@ -450,7 +419,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 {\"diagnostic\":filter_on}\n\tsystem.perspective.sendMessage(\"severity-filters\", payload \u003dpayload, scope \u003d \"page\")" + "script": "\tpriority \u003d \u0027diagnostic\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" @@ -530,6 +499,17 @@ "basis": "700px", "shrink": 0 }, + "propConfig": { + "custom.priorities": { + "binding": { + "config": { + "bidirectional": true, + "path": ".../FlexContainer_0/AlarmStatusTable.props.filters.active.priorities" + }, + "type": "property" + } + } + }, "props": { "style": { "padding": 0 @@ -557,7 +537,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 \"critical\": False,\n\t \"high\": False,\n\t \"medium\": False,\n\t \"low\": False,\n\t \"diagnostic\": False\n\t}\n\tself.parent.parent.getChild(\"FlexContainer\").custom.priorities \u003d default_priorities" }, "scope": "G", "type": "script" @@ -617,7 +597,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": " \n alarm_table \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmStatusTable\")\n \n try:\n # Get the filtered data (what\u0027s currently visible in the table)\n filtered_data \u003d alarm_table.props.filters.active.results.data\n \n # Create CSV content\n csv_content \u003d \"Active Time,Name,Display Path,Priority\\n\"\n \n if filtered_data and len(filtered_data) \u003e 0:\n for alarm_data in filtered_data:\n row_data \u003d [\n str(alarm_data.get(\u0027activeTime\u0027, \u0027\u0027) if isinstance(alarm_data, dict) else getattr(alarm_data, \u0027activeTime\u0027, \u0027\u0027)),\n str(alarm_data.get(\u0027name\u0027, \u0027\u0027) if isinstance(alarm_data, dict) else getattr(alarm_data, \u0027name\u0027, \u0027\u0027)),\n str(alarm_data.get(\u0027source\u0027, \u0027\u0027) if isinstance(alarm_data, dict) else getattr(alarm_data, \u0027source\u0027, \u0027\u0027)),\n str(alarm_data.get(\u0027priority\u0027, \u0027\u0027) if isinstance(alarm_data, dict) else getattr(alarm_data, \u0027priority\u0027, \u0027\u0027))\n ]\n \n # Escape commas in data\n row_data \u003d [field.replace(\u0027,\u0027, \u0027;\u0027) for field in row_data]\n csv_content +\u003d \",\".join(row_data) + \"\\n\"\n else:\n csv_content +\u003d \"No alarms visible in current view\\n\"\n \n except Exception as e:\n system.perspective.print(\"Error: \" + str(e))\n csv_content \u003d \"Error accessing filtered alarms\\n\"\n \n # Convert to bytes and download\n csv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n system.perspective.download(\"active_alarms.csv\", csv_bytes)\n " }, "scope": "G", "type": "script" @@ -735,7 +715,7 @@ "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" + "script": "\t\n\tselected_alarms \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmStatusTable\").props.selection.active.data\n\t\n\tif len(selected_alarms) \u003d\u003d 0:\n\t\tself.props.value \u003d None\n\t\treturn\n\t\n\tduration \u003d self.props.value\n\t\n\tfor alarm in selected_alarms:\n\t\tsystem.alarm.shelve(alarm[\"source\"], duration * 60) #60 - seconds.\n\t\n\tself.props.value \u003d None" }, "scope": "G", "type": "script" @@ -754,6 +734,7 @@ "config": { "path": "session.custom.fc" }, + "enabled": false, "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", @@ -889,79 +870,211 @@ { "children": [ { + "custom": { + "shelvedAlarms": "value" + }, "meta": { - "name": "Label" + "name": "AlarmStatusTable" }, "position": { - "basis": "50px" - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "type": "expr" - } - } + "basis": "973px" }, "props": { - "text": "No Active Alarms", - "textStyle": { - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmTable" - }, - "position": { - "basis": "1898px", - "grow": 1 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({this.props.params.length_of_table_data} \u003e 0, True, False)" + "columns": { + "active": { + "activeTime": { + "field": "hello", + "header": "sss" }, - "type": "expr" + "displayPath": { + "order": 2 + }, + "name": { + "order": 1 + }, + "priority": { + "order": 3 + }, + "source": { + "enabled": false + }, + "state": { + "enabled": false + } } - } - }, - "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 + "enableAcknowledge": false, + "enableDetails": false, + "enableShelve": false, + "enableUnshelve": false, + "filters": { + "active": { + "priorities": { + "critical": false, + "high": false, + "low": false, + "medium": false + }, + "results": { + "data": [ + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 10:46:16.547+0400", + "clearPipeline": "", + "clearTime": "2025-06-10 10:48:20.462+0400", + "deadband": "0.0", + "displayPath": "System/close_socket/papapapa", + "eventId": "bb8d48cb-a61e-4e31-a44f-340466686cc7", + "eventTime": "2025-06-10 10:48:20.462+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "papapapa", + "name": "papapapa", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/close_socket:/alm:papapapa", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 10:48:22.466+0400", + "clearPipeline": "", + "clearTime": "2025-06-10 10:50:24.652+0400", + "deadband": "0.0", + "displayPath": "System/close_socket/papapapa", + "eventId": "479900cc-da53-43f8-8fcc-2f2278b01ccd", + "eventTime": "2025-06-10 10:50:24.652+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "papapapa", + "name": "papapapa", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/close_socket:/alm:papapapa", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 10:44:18.146+0400", + "clearPipeline": "", + "clearTime": "2025-06-10 10:44:24.496+0400", + "deadband": "0.0", + "displayPath": "System/close_socket/papapapa", + "eventId": "4ff749a9-0a6b-4818-95e0-96ceb3c7d50a", + "eventTime": "2025-06-10 10:44:24.496+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "papapapa", + "name": "papapapa", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/close_socket:/alm:papapapa", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 10:42:13.975+0400", + "clearPipeline": "", + "clearTime": "2025-06-10 10:44:16.145+0400", + "deadband": "0.0", + "displayPath": "System/close_socket/papapapa", + "eventId": "2f522dec-f2fc-4c05-8acf-a3208aa048c9", + "eventTime": "2025-06-10 10:44:16.145+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "papapapa", + "name": "papapapa", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/close_socket:/alm:papapapa", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 10:50:26.655+0400", + "clearPipeline": "", + "clearTime": "", + "deadband": "0.0", + "displayPath": "System/close_socket/papapapa", + "eventId": "887b4132-0bfd-4902-9db3-a10b581ca073", + "eventTime": "2025-06-10 10:50:26.655+0400", + "eventValue": "true", + "isAcked": "false", + "isActive": "true", + "isClear": "false", + "label": "papapapa", + "name": "papapapa", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/close_socket:/alm:papapapa", + "state": "Active, Unacknowledged" + } + ], + "enabled": true + }, + "states": { + "clearAcked": true + } + }, + "shelved": { + "results": { + "enabled": true + } + } + }, + "responsive": { + "enabled": true + }, + "rowStyles": { + "clearAcked": { + "base": { + "display": "none" + } + }, + "clearUnacked": { + "base": { + "display": "none" + } + } + }, + "toolbar": { + "enableActiveTab": false, + "enableConfiguration": false, + "enableFilter": false, + "enablePreFilters": false, + "enableShelvedTab": false, + "enabled": false } }, - "type": "ia.display.view" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" + "type": "ia.display.alarmstatustable" } ], "meta": { @@ -993,66 +1106,11 @@ { "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\")" + "script": "\tshelved_alarm_table \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\")\n\t\n\tselected_alarms \u003d shelved_alarm_table.props.selection.data\n\tif(len(selected_alarms)\u003d\u003d0):\n\t\treturn\n\t\n\tfor alarm in selected_alarms:\n\t\tsystem.alarm.unshelve(alarm.path)\n\t\t\n\tshelved_alarm_table.props.data \u003d []" }, "scope": "G", "type": "script" @@ -1127,45 +1185,509 @@ { "children": [ { + "custom": { + "shelvedAlarmsData": null + }, "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": { + "path": "...../TabContainer.custom.shelvedAlarms" + }, + "type": "property" + } }, - "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": "none", + "editable": false, + "field": "name", + "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": "" + }, + { + "align": "center", + "boolean": "value", + "dateFormat": "MM-DD-YYYY HH:mm:ss", + "editable": false, + "field": "path", + "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": "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": "activeTime", + "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": "Active Time" + }, + "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": "expirationTime", + "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": "Expiration Time" + }, + "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": "none", + "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": true + }, + "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": "" + } + ], + "emptyMessage": { + "noData": { + "text": "No Shelved Alarms" + } + }, + "enableFooter": true, + "selection": { + "mode": "multiple interval" + } }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" + "type": "ia.display.table" } ], "meta": { @@ -1204,7 +1726,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 +1799,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": true, + "endDate": { + "$": [ + "ts", + 192, + 1749540890888 + ], + "$ts": 1749540890888 + }, + "startDate": { + "$": [ + "ts", + 192, + 1749540890888 + ], + "$ts": 1749499200000 + } + }, + "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 +1938,7 @@ "fontWeight": "bold", "textAlign": "center" }, - "text": "From" + "text": "Start Date" }, "type": "ia.display.label" }, @@ -1319,6 +1967,14 @@ "basis": "200px" }, "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "../Dropdown.custom.customTime" + }, + "type": "property" + } + }, "props.maxDate": { "binding": { "config": { @@ -1335,10 +1991,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 4, 2025 12:00 AM", "style": { "margin": 15 } @@ -1363,7 +2031,7 @@ "name": "Label_0" }, "position": { - "basis": "61px" + "basis": "89px" }, "props": { "style": { @@ -1371,22 +2039,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,6 +2051,14 @@ "basis": "200px" }, "propConfig": { + "props.enabled": { + "binding": { + "config": { + "path": "../Dropdown.custom.customTime" + }, + "type": "property" + } + }, "props.maxDate": { "binding": { "config": { @@ -1411,13 +2076,31 @@ } }, "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 5, 2025 11:34 AM", "style": { "margin": 15 + }, + "value": { + "$": [ + "ts", + 0, + 1749541102438 + ], + "$ts": 1749108890000 } }, "scripts": { @@ -1445,2040 +2128,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 +2171,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 +2221,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 +2230,7 @@ "name": "Filters" }, "position": { - "basis": "500px", + "basis": "180px", "grow": 1, "shrink": 0 }, @@ -4218,176 +2276,18 @@ "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" - } - } - } - ], - "priority_filters": null, - "source_id_filters": null, - "time_from_filter": null, - "time_to_filter": null, - "type_filters": null + "initial_data": [], + "max_duration": { + "$": [ + "ts", + 192, + 1748426336635 + ], + "$ts": 1747562336635 + }, + "priority_filters": "", + "time_from_filter": 1748980800000, + "time_to_filter": 1749108890000 }, "meta": { "name": "Table" @@ -4397,12 +2297,57 @@ "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" + "enabled": false, + "transforms": [ + { + "formatType": "datetime", + "formatValue": { + "date": "medium", + "time": "medium" + }, + "type": "format" + } + ], + "type": "property" + } + }, + "props.columns[2].filter.date.value": { + "binding": { + "config": { + "path": "this.custom.time_to_filter" + }, + "transforms": [ + { + "code": "\tfrom java.util import Date\n\tfrom java.text import SimpleDateFormat\n\n\tif value is not None:\n\t formatter \u003d SimpleDateFormat(\"yyyy-M-d H:mm:ss\")\n\t return formatter.format(Date(value))\n\telse:\n\t return \"\"\n", + "type": "script" + } + ], + "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" + }, + "type": "query" } } }, @@ -4412,9 +2357,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 +2389,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 +2450,28 @@ { "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": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "never" + }, "footer": { "align": "center", "justify": "left", @@ -4492,6 +2481,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 +2571,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 +2633,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 +2664,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 +2756,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 +2821,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 +2849,18 @@ }, "header": { "align": "center", - "justify": "left", + "justify": "center", "style": { "classes": "" }, - "title": "" + "title": "Severity" }, - "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 +2911,26 @@ "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "Duration", + "field": "MCM", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": true, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "equals", + "value": "" + }, + "visible": "never" + }, "footer": { "align": "center", "justify": "left", @@ -4765,15 +2941,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 +3001,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 +3033,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": "", @@ -4887,9 +3092,28 @@ } ], "enabled": true, + "filter": { + "enabled": true + }, "pager": { "bottom": false }, + "selection": { + "data": [ + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749541007000, + "ID": 86, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749540885000, + "Tag": "alm:papapapa" + } + ], + "selectedColumn": "EndTimestamp", + "selectedRow": 1 + }, "style": { "margin": 20 } @@ -4994,7 +3218,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,15 +3230,11 @@ "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": 1748980800000, + "time_to_filter": 1749108890000, "type_filters": null }, "events": { @@ -5036,9 +3256,6 @@ "shrink": 0 }, "propConfig": { - "custom.device_filters": { - "persistent": true - }, "custom.disable": { "binding": { "config": { @@ -5070,9 +3287,6 @@ "custom.priority_filters": { "persistent": true }, - "custom.source_id_filters": { - "persistent": true - }, "custom.start_time": { "binding": { "config": { @@ -5210,410 +3424,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 +3439,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 +3464,23 @@ "type": "ia.container.flex" } ], - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tself.props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" + "custom": { + "shelvedAlarms": [ + { + "activeTime": "2025-06-10 11:03:10", + "expirationTime": "Tue Jun 24 10:46:41 GET 2025", + "name": "NEEEWWWW", + "path": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/DBConnected:/alm:NEEEWWWW", + "priority": "Low" + }, + { + "activeTime": "2025-06-10 11:03:16", + "expirationTime": "Tue Jun 24 10:46:41 GET 2025", + "name": "Alarm", + "path": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/wbsckt_logging:/alm:Alarm", + "priority": "Critical" } - } + ] }, "meta": { "name": "TabContainer" @@ -5687,7 +3493,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" } } }, @@ -5696,6 +3502,7 @@ "classes": "Background-Styles/Grey-Background" }, "currentTabIndex": 2, + "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" }, @@ -5734,17 +3541,6 @@ "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/ignition/named-query/GetAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql new file mode 100644 index 0000000..6154629 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -0,0 +1,40 @@ +SELECT + Active.id AS ID, + Active.eventtime AS `StartTimestamp`, + Clear.eventtime AS `EndTimestamp`, + CONCAT( + LPAD(FLOOR(duration_seconds / 3600), 2, '0'), ':', + LPAD(FLOOR((duration_seconds % 3600) / 60), 2, '0'), ':', + LPAD(duration_seconds % 60, 2, '0') + ) AS Duration, + CONCAT( + SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(Active.source, '/HMI/ALARMST', 1), ':/tag:', -1), '/', -1), + ' - ', + 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, + SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(Active.source, '/HMI/ALARMST', 1), ':/tag:', -1), '/', -1) AS Tag, + SUBSTRING_INDEX(SUBSTRING_INDEX(Active.source, '/tag:', -1), '/', 1) AS MCM +FROM ( + SELECT + ae.id, + ae.eventtime, + ae.eventid, + ae.source, + ae.priority, + 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 +) AS Active +LEFT JOIN alarm_events Clear + ON Active.eventid = Clear.eventid AND Clear.eventtype = 1 +ORDER BY Active.eventtime DESC;