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 6e8c93a..ecfb97c 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 @@ -923,13 +923,13 @@ "ackTime": "", "ackUser": "", "activePipeline": "", - "activeTime": "2025-06-10 10:46:16.547+0400", + "activeTime": "2025-06-10 12:58:47.992+0400", "clearPipeline": "", - "clearTime": "2025-06-10 10:48:20.462+0400", + "clearTime": "2025-06-10 13:00:50.125+0400", "deadband": "0.0", "displayPath": "System/close_socket/papapapa", - "eventId": "bb8d48cb-a61e-4e31-a44f-340466686cc7", - "eventTime": "2025-06-10 10:48:20.462+0400", + "eventId": "197a7d64-b63d-4838-a150-80e0b3824885", + "eventTime": "2025-06-10 13:00:50.125+0400", "eventValue": "false", "isAcked": "false", "isActive": "false", @@ -947,13 +947,13 @@ "ackTime": "", "ackUser": "", "activePipeline": "", - "activeTime": "2025-06-10 10:48:22.466+0400", + "activeTime": "2025-06-10 13:00:52.126+0400", "clearPipeline": "", - "clearTime": "2025-06-10 10:50:24.652+0400", + "clearTime": "2025-06-10 13:01:27.419+0400", "deadband": "0.0", "displayPath": "System/close_socket/papapapa", - "eventId": "479900cc-da53-43f8-8fcc-2f2278b01ccd", - "eventTime": "2025-06-10 10:50:24.652+0400", + "eventId": "e22bd576-fdb7-4356-a5df-a0342db88964", + "eventTime": "2025-06-10 13:01:27.419+0400", "eventValue": "false", "isAcked": "false", "isActive": "false", @@ -971,13 +971,13 @@ "ackTime": "", "ackUser": "", "activePipeline": "", - "activeTime": "2025-06-10 10:44:18.146+0400", + "activeTime": "2025-06-10 12:56:43.860+0400", "clearPipeline": "", - "clearTime": "2025-06-10 10:44:24.496+0400", + "clearTime": "2025-06-10 12:58:45.991+0400", "deadband": "0.0", "displayPath": "System/close_socket/papapapa", - "eventId": "4ff749a9-0a6b-4818-95e0-96ceb3c7d50a", - "eventTime": "2025-06-10 10:44:24.496+0400", + "eventId": "e3e8a7e9-95bd-4bae-9fae-4a69037dcea6", + "eventTime": "2025-06-10 12:58:45.991+0400", "eventValue": "false", "isAcked": "false", "isActive": "false", @@ -995,13 +995,13 @@ "ackTime": "", "ackUser": "", "activePipeline": "", - "activeTime": "2025-06-10 10:42:13.975+0400", + "activeTime": "2025-06-10 12:54:39.698+0400", "clearPipeline": "", - "clearTime": "2025-06-10 10:44:16.145+0400", + "clearTime": "2025-06-10 12:56:41.858+0400", "deadband": "0.0", "displayPath": "System/close_socket/papapapa", - "eventId": "2f522dec-f2fc-4c05-8acf-a3208aa048c9", - "eventTime": "2025-06-10 10:44:16.145+0400", + "eventId": "8c549637-729f-474d-a22b-3512062cd788", + "eventTime": "2025-06-10 12:56:41.858+0400", "eventValue": "false", "isAcked": "false", "isActive": "false", @@ -1019,13 +1019,109 @@ "ackTime": "", "ackUser": "", "activePipeline": "", - "activeTime": "2025-06-10 10:50:26.655+0400", + "activeTime": "2025-06-06 19:30:36.306+0400", + "clearPipeline": "", + "clearTime": "2025-06-09 20:00:36.561+0400", + "deadband": "0.0", + "displayPath": "System/DBConnected/NEEEWWWW", + "eventId": "af042d77-3d54-4a8b-8d69-5f468ab449f4", + "eventTime": "2025-06-09 20:00:36.561+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "NEEEWWWW", + "name": "NEEEWWWW", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/DBConnected:/alm:NEEEWWWW", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-06 16:14:39.264+0400", + "clearPipeline": "", + "clearTime": "2025-06-06 19:06:54.360+0400", + "deadband": "0.0", + "displayPath": "System/DBConnected/NEEEWWWW", + "eventId": "620fd8a1-61ba-44ec-8573-8b861b18d740", + "eventTime": "2025-06-06 19:06:54.360+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "NEEEWWWW", + "name": "NEEEWWWW", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/DBConnected:/alm:NEEEWWWW", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-06 19:13:21.819+0400", + "clearPipeline": "", + "clearTime": "2025-06-06 19:17:31.568+0400", + "deadband": "0.0", + "displayPath": "System/DBConnected/NEEEWWWW", + "eventId": "a8ff0e60-af10-4437-b54a-c735e3d862e0", + "eventTime": "2025-06-06 19:17:31.568+0400", + "eventValue": "false", + "isAcked": "false", + "isActive": "false", + "isClear": "true", + "label": "NEEEWWWW", + "name": "NEEEWWWW", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/DBConnected:/alm:NEEEWWWW", + "state": "Cleared, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 11:03:10.611+0400", + "clearPipeline": "", + "clearTime": "", + "deadband": "0.0", + "displayPath": "System/DBConnected/NEEEWWWW", + "eventId": "d57907a7-3668-42f9-b25f-b39198437c68", + "eventTime": "2025-06-10 11:03:10.611+0400", + "eventValue": "true", + "isAcked": "false", + "isActive": "true", + "isClear": "false", + "label": "NEEEWWWW", + "name": "NEEEWWWW", + "notes": "", + "priority": "Low", + "source": "prov:MTN6_SCADA_TAG_PROVIDER:/tag:System/DBConnected:/alm:NEEEWWWW", + "state": "Active, Unacknowledged" + }, + { + "ackNotes": "", + "ackPipeline": "", + "ackTime": "", + "ackUser": "", + "activePipeline": "", + "activeTime": "2025-06-10 13:01:29.420+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", + "eventId": "1d6747ce-fdef-496e-b21c-a017aac2c589", + "eventTime": "2025-06-10 13:01:29.420+0400", "eventValue": "true", "isAcked": "false", "isActive": "true", @@ -1818,22 +1914,22 @@ }, { "custom": { - "customTime": true, + "customTime": false, "endDate": { "$": [ "ts", 192, - 1749543336268 + 1749545137258 ], - "$ts": 1749543336268 + "$ts": 1749545137258 }, "startDate": { "$": [ "ts", 192, - 1749543336268 + 1749545137258 ], - "$ts": 1749541536268 + "$ts": 1749543337258 } }, "meta": { @@ -2006,7 +2102,7 @@ } }, "props": { - "formattedValue": "Jun 10, 2025 11:45 AM", + "formattedValue": "Jun 10, 2025 12:15 PM", "style": { "margin": 15 } @@ -2091,7 +2187,7 @@ } }, "props": { - "formattedValue": "Jun 11, 2025 12:15 PM", + "formattedValue": "Jun 10, 2025 12:45 PM", "maxDate": { "$": [ "ts", @@ -2106,10 +2202,10 @@ "value": { "$": [ "ts", - 0, - 1749543373731 + 192, + 1749545137258 ], - "$ts": 1749629736000 + "$ts": 1749545137258 } }, "scripts": { @@ -2299,17 +2395,17 @@ "$": [ "ts", 192, - 1749543368762 + 1749545137263 ], - "$ts": 1749541536000 + "$ts": 1749543337258 }, "time_to_filter": { "$": [ "ts", 192, - 1749543373742 + 1749545137263 ], - "$ts": 1749629736000 + "$ts": 1749545137258 } }, "meta": { @@ -3107,9 +3203,165 @@ ], "enabled": true, "filter": { - "enabled": true + "enabled": true, + "results": { + "data": [ + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:00:40", + "EndTimestamp": 1749545054000, + "ID": 194, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749545014000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749545012000, + "ID": 191, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544890000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544888000, + "ID": 188, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544766000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544764000, + "ID": 185, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544642000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544640000, + "ID": 182, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544518000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544516000, + "ID": 179, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544394000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544392000, + "ID": 176, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544270000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:03", + "EndTimestamp": 1749544268000, + "ID": 173, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544145000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544143000, + "ID": 170, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749544021000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749544019000, + "ID": 167, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749543897000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749543895000, + "ID": 164, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749543773000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:03", + "EndTimestamp": 1749543771000, + "ID": 161, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749543648000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:00:15", + "EndTimestamp": 1749543646000, + "ID": 158, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749543631000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:02", + "EndTimestamp": 1749543629000, + "ID": 155, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749543507000, + "Tag": "alm:papapapa" + }, + { + "Description": "alm:papapapa - papapapa", + "Duration": "00:02:04", + "EndTimestamp": 1749543505000, + "ID": 152, + "MCM": "System", + "Priority": "Low", + "StartTimestamp": 1749543381000, + "Tag": "alm:papapapa" + } + ], + "enabled": true + } }, "pager": { + "activePage": 2, "bottom": false }, "selection": { @@ -3117,16 +3369,16 @@ { "Description": "alm:papapapa - papapapa", "Duration": "00:02:02", - "EndTimestamp": 1749543629000, - "ID": 155, + "EndTimestamp": 1749545801000, + "ID": 212, "MCM": "System", "Priority": "Low", - "StartTimestamp": 1749543507000, + "StartTimestamp": 1749545679000, "Tag": "alm:papapapa" } ], - "selectedColumn": "EndTimestamp", - "selectedRow": 1 + "selectedColumn": "Duration", + "selectedRow": 29 }, "style": { "margin": 20 @@ -3251,17 +3503,17 @@ "$": [ "ts", 192, - 1749543368762 + 1749545137263 ], - "$ts": 1749541536000 + "$ts": 1749543337258 }, "time_to_filter": { "$": [ "ts", 192, - 1749543373742 + 1749545137263 ], - "$ts": 1749629736000 + "$ts": 1749545137258 }, "type_filters": null }, @@ -3269,7 +3521,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\t\n\tfilters \u003d AWS.build_url_http.get_filters_2(sources \u003d self.custom.source_id_filters, \n\t\t\t\t\t\t\t\t\t\t\t\tdevices \u003d self.custom.device_filters,\n\t\t\t\t\t\t\t\t\t\t\t\tpriorities \u003d self.custom.priority_filters, \n\t\t\t\t\t\t\t\t\t\t\t\ttypes \u003d self.custom.type_filters,\n\t\t\t\t\t\t\t\t\t\t\t\tstart \u003d self.custom.time_from_filter,\n\t\t\t\t\t\t\t\t\t\t\t\tend \u003d self.custom.time_to_filter, \n\t\t\t\t\t\t\t\t\t\t\t\tduration \u003d self.custom.duration_filter)\n\t\n\tCommands.button_commands.send_download_request(whid, filters, session_id)\n\tself.custom.enable_timeout \u003d True\n\tself.custom.download_in_progress \u003d True" + "script": " try:\n # Get filtered data from table (array of dicts)\n filtered_results \u003d self.parent.parent.getChild(\"Table\").getChild(\"Table\").props.filter.results\n filtered_data \u003d filtered_results.data\n \n # Ensure data is valid\n if not filtered_data:\n return\n \n # Get columns from first record\n columns \u003d filtered_data[0].keys()\n \n # Create a list of rows\n rows \u003d []\n for i in range(len(filtered_data)):\n row_dict \u003d filtered_data[i]\n row \u003d [row_dict.get(col) for col in columns]\n rows.append(row)\n \n # Convert to dataset and export\n dataset \u003d system.dataset.toDataSet(columns, rows)\n html_data \u003d system.dataset.dataSetToHTML(1, dataset, \"Filtered Results\")\n system.perspective.download(\"filtered_alarms_history.html\", html_data)\n \n print \"Export completed successfully! Exported\", len(rows), \"records.\"\n \n except Exception as e:\n print \"Export failed:\", str(e)\n\n\t" }, "scope": "G", "type": "script" @@ -3277,7 +3529,11 @@ } }, "meta": { - "name": "Export" + "name": "Export", + "tooltip": { + "enabled": true, + "text": "Exports the data displayed in the table." + } }, "position": { "basis": "120px", @@ -3494,13 +3750,6 @@ ], "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",