From 4f78ab357a616ca44758907ef27c0390f300d973 Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Thu, 19 Jun 2025 22:13:48 +0400 Subject: [PATCH 01/10] updated alarm view. displaying plc tag. correctly fetching alarms data for history table --- .../views/Alarm-Views/RealTime/view.json | 3736 ++--------------- .../ignition/named-query/GetAlarms/query.sql | 35 +- 2 files changed, 429 insertions(+), 3342 deletions(-) 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 a6571dd..b034559 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 @@ -14,8 +14,7 @@ } }, "params": { - "page_name": "Alarms-RealTime", - "table_type": "value" + "page_name": "Alarms-RealTime" }, "propConfig": { "custom.activityLogger": { @@ -24,10 +23,6 @@ "params.page_name": { "paramDirection": "input", "persistent": true - }, - "params.table_type": { - "paramDirection": "input", - "persistent": true } }, "props": { @@ -493,7 +488,6 @@ ], "custom": { "priorities": { - "critical": false, "diagnostic": false, "high": false, "low": false, @@ -504,7 +498,7 @@ "system": { "onStartup": { "config": { - "script": "\tself.custom.priorities \u003d {\n\t \"diagnostic\": True,\n\t \"low\": True,\n\t \"medium\": True,\n\t \"high\": True,\n\t}" + "script": "\tself.custom.priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t}" }, "scope": "G", "type": "script" @@ -882,15 +876,17 @@ "rawData": [ { "style": { - "backgroundColor": "#ffff00" + "backgroundColor": "#ffeb3b" }, "value": { - "Description": "", - "Device": "", - "Duration": "01:06:55", - "EventTimestamp": "2025-06-12 18:37:25", - "Name": "s", - "Priority": "Low" + "Description": "MCM01 Hello world", + "Device": "prov:MTN6_SIMULATION_SCADA_TAG_PROVIDER:/tag:System/MCM/MCM01/Beacon_Light:/alm:Hello world", + "Duration": "00:30:34", + "EventTimestamp": "2025-06-19 21:38:34", + "Location": "MCM01", + "NumberID": 57, + "Priority": "Low", + "Tag": "MCM01.HMI.Beacon_Light" } } ] @@ -933,7 +929,7 @@ }, "onChange": { "enabled": null, - "script": "\tfrom system import date\n\t\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, name, priority, description, device, color):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Name\":name,\n\t\t \"Priority\": priority,\n\t\t \"Description\": description,\n\t\t \"Device\": device\n\t\t },\n\t\t \"style\": {\n\t\t \"backgroundColor\": color,\n\t\t }\n\t\t}\n\t\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tcolor \u003d \"\"\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime # The timestamp when alarm became active\n\t\n\t\t# Duration in seconds and formatted as HH:mm:ss\n\t\tdurationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t\tdurationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t\tpriority \u003d alarm.priority.toString()\n\t\tif priority \u003d\u003d \"High\": \n\t\t\tcolor \u003d \"#f45d56\"\n\t\telif priority \u003d\u003d \"Medium\": \n\t\t\tcolor \u003d \"#fca25f\"\n\t\telif priority \u003d\u003d \"Low\": \n\t\t\tcolor \u003d \"#ffff00\"\n\t\telif priority \u003d\u003d \"Diagnostic\": \n\t\t\tcolor \u003d \"#5da0f9\"\n\t\telif priority \u003d\u003d \"Critical\": \n\t\t\tcolor \u003d \"#c86462\"\n\t\telse:\n\t\t\tcolor \u003d \"#fff\"\n\t\n\t\tdata.append(testRow(\n\t\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t\t duration \u003d durationStr,\n\t\t name \u003d alarm.name,\n\t\t priority \u003d priority,\n\t\t description \u003d alarm.notes,\n\t\t device \u003d alarm.displayPath,\n\t\t color \u003d color\n\t\t))\n\t\n\tself.custom.rawData \u003d data" + "script": "\tfrom system import date\n\t\n\ttag_provider \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\"\n\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, location, priority, description, tag, color, numberId, device):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"NumberID\": numberId,\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Priority\": priority,\n\t\t \"Location\": location,\n\t\t \"Description\": description,\n\t\t \"Tag\": tag,\n\t\t \"Device\": device\n\t\t },\n\t\t \"style\": {\n\t\t \"backgroundColor\": color,\n\t\t }\n\t\t}\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tcolor \u003d \"\"\n\tnumberID \u003d \"\"\n\t\n\tif(results \u003d\u003d0):\n\t\treturn\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime\n\t\tOPCItemTag \u003d system.tag.read(tag_provider + alarm.myTag + \".OpcItemPath\").value\n\t\tparts \u003d OPCItemTag.split(\".\")\n\t\ttag \u003d str(alarm.displayPath) +\".\" + parts[1] + \".\" + parts[2]\n\t\t\n\t\t\n\n\ttry:\n\t query \u003d system.db.runQuery(\"SELECT id, eventtime FROM alarm_events WHERE eventid \u003d \" + \"\u0027\" + str(alarm.id) + \"\u0027\",\"MariaDB\")\n\t if(query):\n\t \tnumberID \u003d query[0][0]\n\t durationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t durationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t \n\t priority \u003d alarm.priority.toString()\n\t if priority \u003d\u003d \"High\":\n\t color \u003d \"#f45d56\"\n\t elif priority \u003d\u003d \"Medium\":\n\t color \u003d \"#d32f2f\"\n\t elif priority \u003d\u003d \"Low\":\n\t color \u003d \"#ffeb3b\"\n\t elif priority \u003d\u003d \"Diagnostic\":\n\t color \u003d \"#2196f3\"\n\t elif priority \u003d\u003d \"Critical\":\n\t color \u003d \"#b71c1c\"\n\t else:\n\t color \u003d \"#ffffff\"\n\t \n\t\tsystem.perspective.print(alarm.myTag)\n\t\tsystem.perspective.print(\"tag is printed\")\n\t \n#\t\tOPCItemTag \u003d system.tag.read(tag_provider + alarm.myTag).OpcItemPath\n\t\tself.session.custom.fc\n\t data.append(testRow(\n\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t duration \u003d durationStr,\n\t location \u003d alarm.displayPath,\n\t numberId \u003d numberID,\n\t priority \u003d priority,\n\t description \u003d alarm.myLocation + \" \" + alarm.name,\n\t tag \u003d tag,\n\t color \u003d color,\n\t device \u003d alarm.source,\n\t ))\n\texcept:\n\t system.perspective.print(\"Something went wrong\")\n\t\n\tself.custom.rawData \u003d data" } } }, @@ -944,7 +940,7 @@ "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "Name", + "field": "NumberID", "filter": { "boolean": { "condition": "" @@ -978,7 +974,7 @@ "style": { "classes": "" }, - "title": "" + "title": "Number (ID)" }, "justify": "left", "nullFormat": { @@ -1029,14 +1025,14 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 40 + "width": 70 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "Device", + "field": "EventTimestamp", "filter": { "boolean": { "condition": "" @@ -1070,7 +1066,7 @@ "style": { "classes": "" }, - "title": "" + "title": "Event Timestamp" }, "justify": "auto", "nullFormat": { @@ -1121,14 +1117,14 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 40 + "width": 70 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "EventTimestamp", + "field": "Duration", "filter": { "boolean": { "condition": "" @@ -1213,191 +1209,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 40 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "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": 100 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" + "width": 70 }, { "align": "center", @@ -1489,7 +1301,283 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": "" + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 70 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 100 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "auto", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 } ], "emptyMessage": { @@ -1654,7 +1742,7 @@ "boolean": "checkbox", "dateFormat": "none", "editable": false, - "field": "name", + "field": "Description", "filter": { "boolean": { "condition": "" @@ -2251,22 +2339,22 @@ }, { "custom": { - "customTime": true, + "customTime": false, "endDate": { "$": [ "ts", 192, - 1749742805621 + 1750354615331 ], - "$ts": 1749742805621 + "$ts": 1750354615331 }, "startDate": { "$": [ "ts", 192, - 1749742805621 + 1750354615331 ], - "$ts": 1749672000000 + "$ts": 1750352815331 } }, "meta": { @@ -2439,7 +2527,7 @@ } }, "props": { - "formattedValue": "Jun 2, 2025 7:41 PM", + "formattedValue": "Jun 19, 2025 9:06 PM", "style": { "margin": 15 } @@ -2524,7 +2612,7 @@ } }, "props": { - "formattedValue": "Jun 12, 2025 7:40 PM", + "formattedValue": "Jun 19, 2025 9:36 PM", "maxDate": { "$": [ "ts", @@ -2539,10 +2627,10 @@ "value": { "$": [ "ts", - 192, - 1749742805621 + 201, + 1750354615331 ], - "$ts": 1749742805621 + "$ts": 1750354615331 } }, "scripts": { @@ -2727,22 +2815,22 @@ ], "$ts": 1747562336635 }, - "priority_filters": "diagnostic", + "priority_filters": "", "time_from_filter": { "$": [ "ts", 192, - 1749742890983 + 1750356548213 ], - "$ts": 1748878890000 + "$ts": 1750352815331 }, "time_to_filter": { "$": [ "ts", 192, - 1749742805621 + 1750356548213 ], - "$ts": 1749742805621 + "$ts": 1750354615331 } }, "meta": { @@ -3544,3118 +3632,107 @@ "results": { "data": [ { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749719990000, - "ID": 1284, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719868000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749719866000, - "ID": 1281, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719744000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749719742000, - "ID": 1278, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719620000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749719618000, - "ID": 1275, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719495000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749719493000, - "ID": 1272, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719371000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749719369000, - "ID": 1269, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719247000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749719245000, - "ID": 1266, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749719123000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "16:44:54", - "EndTimestamp": 1749719121000, - "ID": 1263, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658827000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749658825000, - "ID": 1260, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658703000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749658701000, - "ID": 1257, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658578000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749658576000, - "ID": 1254, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658454000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749658452000, - "ID": 1251, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658330000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749658328000, - "ID": 1248, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658206000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749658204000, - "ID": 1245, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749658081000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749658079000, - "ID": 1242, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657957000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657955000, - "ID": 1239, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657833000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657831000, - "ID": 1236, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657709000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657707000, - "ID": 1233, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657585000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657583000, - "ID": 1230, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657461000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749657459000, - "ID": 1227, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657336000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657334000, - "ID": 1224, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657212000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657210000, - "ID": 1221, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657088000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749657086000, - "ID": 1218, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656963000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749656961000, - "ID": 1215, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656839000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749656837000, - "ID": 1212, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656715000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749656713000, - "ID": 1209, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656591000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:33", - "EndTimestamp": 1749656589000, - "ID": 1205, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656436000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749656434000, - "ID": 1202, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656312000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749656310000, - "ID": 1199, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656187000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749656185000, - "ID": 1196, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749656063000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749656061000, - "ID": 1193, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655939000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749655937000, - "ID": 1190, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655815000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749655813000, - "ID": 1187, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655691000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749655689000, - "ID": 1184, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655567000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749655565000, - "ID": 1181, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655442000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749655440000, - "ID": 1178, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655318000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749655316000, - "ID": 1175, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655194000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749655192000, - "ID": 1172, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749655070000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749655068000, - "ID": 1169, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654945000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749654943000, - "ID": 1166, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654821000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749654819000, - "ID": 1163, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654697000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:03:41", - "EndTimestamp": 1749654695000, - "ID": 1159, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654474000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749654472000, - "ID": 1156, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654350000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749654348000, - "ID": 1153, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654226000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749654224000, - "ID": 1150, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749654102000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749654100000, - "ID": 1147, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653977000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653975000, - "ID": 1144, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653853000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653851000, - "ID": 1141, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653729000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653727000, - "ID": 1138, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653605000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653603000, - "ID": 1135, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653481000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653479000, - "ID": 1132, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653357000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749653355000, - "ID": 1129, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653232000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653230000, - "ID": 1126, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749653108000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749653106000, - "ID": 1123, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652984000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652982000, - "ID": 1120, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652860000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652858000, - "ID": 1117, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652736000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652734000, - "ID": 1114, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652612000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652610000, - "ID": 1111, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652488000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749652486000, - "ID": 1108, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652363000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652361000, - "ID": 1105, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652239000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652237000, - "ID": 1102, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749652115000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749652113000, - "ID": 1099, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651991000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651989000, - "ID": 1096, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651867000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651865000, - "ID": 1093, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651743000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651741000, - "ID": 1090, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651619000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749651617000, - "ID": 1087, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651494000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651492000, - "ID": 1084, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651370000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651368000, - "ID": 1081, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651246000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651244000, - "ID": 1078, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749651122000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749651120000, - "ID": 1075, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650998000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749650996000, - "ID": 1072, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650874000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749650872000, - "ID": 1069, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650749000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749650747000, - "ID": 1066, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650625000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749650623000, - "ID": 1063, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650500000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:01", - "EndTimestamp": 1749650498000, - "ID": 1060, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650377000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749650375000, - "ID": 1056, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650252000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749650250000, - "ID": 1054, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650127000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:01", - "EndTimestamp": 1749650125000, - "ID": 1051, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749650004000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749650002000, - "ID": 1048, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649879000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749649877000, - "ID": 1045, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649755000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749649753000, - "ID": 1042, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649631000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749649629000, - "ID": 1039, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649507000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749649505000, - "ID": 1036, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649383000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749649381000, - "ID": 1033, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649259000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749649257000, - "ID": 1030, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649134000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749649132000, - "ID": 1027, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749649009000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749649007000, - "ID": 1024, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648885000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749648883000, - "ID": 1021, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648761000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749648759000, - "ID": 1016, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648636000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:15", - "EndTimestamp": 1749648634000, - "ID": 1014, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648499000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749648497000, - "ID": 1011, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648374000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749648372000, - "ID": 1008, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648250000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749648248000, - "ID": 1005, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648126000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749648124000, - "ID": 1002, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749648002000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749648000000, - "ID": 999, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647878000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749647876000, - "ID": 996, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647754000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749647752000, - "ID": 993, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647629000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749647627000, - "ID": 990, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647505000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749647503000, - "ID": 987, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647381000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749647379000, - "ID": 984, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647257000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749647255000, - "ID": 981, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647133000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749647131000, - "ID": 978, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749647008000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749647006000, - "ID": 975, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646884000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749646882000, - "ID": 972, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646760000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749646758000, - "ID": 967, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646636000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:19", - "EndTimestamp": 1749646634000, - "ID": 965, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646495000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749646493000, - "ID": 962, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646371000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749646369000, - "ID": 959, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646246000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749646244000, - "ID": 956, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749646122000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749646120000, - "ID": 953, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645998000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749645996000, - "ID": 950, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645874000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749645872000, - "ID": 947, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645750000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749645748000, - "ID": 944, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645625000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749645623000, - "ID": 941, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645501000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:03:50", - "EndTimestamp": 1749645499000, - "ID": 937, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645269000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749645267000, - "ID": 934, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645144000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749645142000, - "ID": 931, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749645020000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749645018000, - "ID": 928, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644896000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644894000, - "ID": 925, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644772000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644770000, - "ID": 922, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644648000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644646000, - "ID": 919, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644524000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644522000, - "ID": 916, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644400000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644398000, - "ID": 913, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644276000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644274000, - "ID": 910, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644152000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749644150000, - "ID": 907, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749644027000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749644025000, - "ID": 904, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643903000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643901000, - "ID": 901, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643779000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643777000, - "ID": 898, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643655000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643653000, - "ID": 895, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643531000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643529000, - "ID": 892, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643407000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643405000, - "ID": 889, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643283000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643281000, - "ID": 886, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643159000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749643157000, - "ID": 883, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749643035000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749643033000, - "ID": 880, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642910000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642908000, - "ID": 877, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642786000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642784000, - "ID": 874, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642662000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642660000, - "ID": 871, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642538000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642536000, - "ID": 868, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642414000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642412000, - "ID": 865, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642290000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642288000, - "ID": 862, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642166000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642164000, - "ID": 859, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749642042000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749642040000, - "ID": 856, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641918000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749641916000, - "ID": 853, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641793000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641791000, - "ID": 850, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641669000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641667000, - "ID": 847, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641545000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641543000, - "ID": 844, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641421000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641419000, - "ID": 841, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641297000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641295000, - "ID": 838, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641173000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641171000, - "ID": 835, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749641049000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749641047000, - "ID": 832, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640925000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640923000, - "ID": 829, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640801000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640799000, - "ID": 826, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640677000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749640675000, - "ID": 823, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640552000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640550000, - "ID": 820, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640428000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640426000, - "ID": 817, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640304000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640302000, - "ID": 814, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640180000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640178000, - "ID": 811, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749640056000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749640054000, - "ID": 808, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639932000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639930000, - "ID": 805, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639808000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639806000, - "ID": 802, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639684000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639682000, - "ID": 799, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639560000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749639558000, - "ID": 796, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639435000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639433000, - "ID": 793, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639311000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639309000, - "ID": 790, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639187000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639185000, - "ID": 787, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749639063000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749639061000, - "ID": 784, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638939000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638937000, - "ID": 781, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638815000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638813000, - "ID": 778, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638691000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638689000, - "ID": 775, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638567000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749638565000, - "ID": 772, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638442000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638440000, - "ID": 769, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638318000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638316000, - "ID": 766, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638194000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638192000, - "ID": 763, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749638070000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749638068000, - "ID": 760, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637946000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749637944000, - "ID": 757, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637821000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:09", - "EndTimestamp": 1749637819000, - "ID": 754, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637750000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749637748000, - "ID": 751, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637626000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749637624000, - "ID": 748, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637502000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749637500000, - "ID": 745, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637377000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749637375000, - "ID": 742, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637253000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749637251000, - "ID": 739, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637129000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749637127000, - "ID": 735, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749637005000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749635734000, - "ID": 728, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635612000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:18", - "EndTimestamp": 1749635610000, - "ID": 725, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635532000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:04", - "EndTimestamp": 1749635530000, - "ID": 722, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635406000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:19", - "EndTimestamp": 1749635404000, - "ID": 719, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635385000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:43", - "EndTimestamp": 1749635383000, - "ID": 716, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635280000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749635278000, - "ID": 713, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635155000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749635153000, - "ID": 710, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749635030000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:41", - "EndTimestamp": 1749635028000, - "ID": 707, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634987000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749634985000, - "ID": 704, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634863000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749634861000, - "ID": 701, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634739000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:25", - "EndTimestamp": 1749634737000, - "ID": 698, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634652000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:02", - "EndTimestamp": 1749634451000, - "ID": 692, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634449000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:18", - "EndTimestamp": 1749634447000, - "ID": 689, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634429000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749634427000, - "ID": 686, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634305000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749634303000, - "ID": 683, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634181000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749634179000, - "ID": 680, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749634057000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "19:01:19", - "EndTimestamp": 1749634055000, - "ID": 677, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749565576000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:19", - "EndTimestamp": 1749565574000, - "ID": 674, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749565555000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:09", - "EndTimestamp": 1749565341000, - "ID": 668, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749565332000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749565330000, - "ID": 665, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749565207000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:08", - "EndTimestamp": 1749565205000, - "ID": 662, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749565197000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:40", - "EndTimestamp": 1749565195000, - "ID": 659, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749565155000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749564936000, - "ID": 652, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749564814000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749564812000, - "ID": 649, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749564690000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749563695000, - "ID": 640, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749563573000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749560964000, - "ID": 633, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749560842000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:03:08", - "EndTimestamp": 1749560840000, - "ID": 629, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749560652000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749560650000, - "ID": 626, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749560528000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749560526000, - "ID": 623, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749560404000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749560402000, - "ID": 620, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749560280000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749560278000, - "ID": 617, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749560156000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:03:05", - "EndTimestamp": 1749560154000, - "ID": 613, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559969000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749559967000, - "ID": 610, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559845000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749559843000, - "ID": 607, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559721000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749559719000, - "ID": 603, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559596000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:03:56", - "EndTimestamp": 1749559594000, - "ID": 597, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559358000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:35", - "EndTimestamp": 1749559356000, - "ID": 595, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559201000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749559199000, - "ID": 592, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749559077000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749559075000, - "ID": 589, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558952000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558950000, - "ID": 586, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558828000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558826000, - "ID": 583, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558704000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558702000, - "ID": 580, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558580000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558578000, - "ID": 577, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558456000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749558454000, - "ID": 574, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558331000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558329000, - "ID": 571, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558207000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558205000, - "ID": 568, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749558083000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749558081000, - "ID": 565, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557959000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557957000, - "ID": 562, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557835000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557833000, - "ID": 559, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557711000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557709000, - "ID": 556, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557587000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749557585000, - "ID": 553, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557462000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557460000, - "ID": 550, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557338000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557336000, - "ID": 547, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557214000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557212000, - "ID": 544, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749557090000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749557088000, - "ID": 541, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556966000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749556964000, - "ID": 538, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556842000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749556840000, - "ID": 535, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556717000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749556715000, - "ID": 532, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556593000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749556591000, - "ID": 529, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556469000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749556467000, - "ID": 526, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556345000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749556343000, - "ID": 523, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556221000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749556219000, - "ID": 519, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749556097000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749556095000, - "ID": 517, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555972000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555970000, - "ID": 514, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555848000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555846000, - "ID": 511, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555724000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555722000, - "ID": 508, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555600000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555598000, - "ID": 505, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555476000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555474000, - "ID": 502, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555352000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749555350000, - "ID": 499, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555227000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555225000, - "ID": 496, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749555103000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749555101000, - "ID": 493, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554979000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554977000, - "ID": 490, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554855000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554853000, - "ID": 487, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554731000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749554729000, - "ID": 484, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554606000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554604000, - "ID": 481, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554482000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554480000, - "ID": 478, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554358000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554356000, - "ID": 475, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554234000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554232000, - "ID": 472, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749554110000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749554108000, - "ID": 469, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553986000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749553984000, - "ID": 466, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553861000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749553859000, - "ID": 463, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553737000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749553735000, - "ID": 460, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553613000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749553611000, - "ID": 457, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553489000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749553487000, - "ID": 454, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553365000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749553363000, - "ID": 451, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553241000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749553239000, - "ID": 448, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749553116000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749553114000, - "ID": 445, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552992000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552990000, - "ID": 442, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552868000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552866000, - "ID": 439, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552744000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552742000, - "ID": 436, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552620000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552618000, - "ID": 433, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552496000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749552494000, - "ID": 430, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552371000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552369000, - "ID": 427, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552247000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552245000, - "ID": 424, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749552123000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749552121000, - "ID": 421, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551999000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749551997000, - "ID": 418, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551875000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749551873000, - "ID": 415, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551750000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749551748000, - "ID": 412, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551626000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749551624000, - "ID": 409, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551502000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749551500000, - "ID": 406, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551378000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749551376000, - "ID": 403, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551254000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:04", - "EndTimestamp": 1749551252000, - "ID": 400, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551128000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:44", - "EndTimestamp": 1749551126000, - "ID": 397, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749551022000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749551020000, - "ID": 394, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550897000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:04", - "EndTimestamp": 1749550895000, - "ID": 391, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550771000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:29", - "EndTimestamp": 1749550769000, - "ID": 388, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550680000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:53", - "EndTimestamp": 1749550678000, - "ID": 385, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550565000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:14", - "EndTimestamp": 1749550563000, - "ID": 382, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550489000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:56", - "EndTimestamp": 1749550487000, - "ID": 379, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550431000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749550429000, - "ID": 376, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550307000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:26", - "EndTimestamp": 1749550305000, - "ID": 370, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550279000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749550277000, - "ID": 367, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550154000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:29", - "EndTimestamp": 1749550152000, - "ID": 364, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550123000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:19", - "EndTimestamp": 1749550121000, - "ID": 361, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749550042000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:04", - "EndTimestamp": 1749550040000, - "ID": 358, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549916000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:10", - "EndTimestamp": 1749549914000, - "ID": 355, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549844000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:23", - "EndTimestamp": 1749549842000, - "ID": 352, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549819000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:28", - "EndTimestamp": 1749549817000, - "ID": 349, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549789000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:NEEEWWWW - NEEEWWWW", - "Duration": "00:08:40", - "EndTimestamp": 1749550286000, - "ID": 346, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549766000, - "Tag": "alm:NEEEWWWW" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:00:35", - "EndTimestamp": 1749549787000, - "ID": 345, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549752000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:01:17", - "EndTimestamp": 1749549627000, - "ID": 335, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549550000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749549548000, - "ID": 332, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549426000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:03", - "EndTimestamp": 1749549424000, - "ID": 329, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549301000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749549299000, - "ID": 326, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549177000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749549175000, - "ID": 323, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749549053000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749549051000, - "ID": 320, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749548929000, - "Tag": "alm:papapapa" - }, - { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749548927000, - "ID": 317, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749548805000, - "Tag": "alm:papapapa" + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 35, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 36, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 35, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 36, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 35, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 36, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 35, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:42", + "EndTimestamp": 1750354587000, + "ID": 36, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354545000, + "Tag": "MCM01.HMI.Beacon_Light" } ], "enabled": true } }, "pager": { - "activePage": 2, "bottom": false }, "selection": { "data": [ { - "Description": "alm:papapapa - papapapa", - "Duration": "00:02:02", - "EndTimestamp": 1749657707000, - "ID": 1233, - "MCM": "System", - "Priority": "Diagnostic", - "StartTimestamp": 1749657585000, - "Tag": "alm:papapapa" + "Description": "MCM01 - Hello world", + "Duration": "00:00:02", + "EndTimestamp": 1750354703000, + "ID": 47, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750354701000, + "Tag": "MCM01.HMI.Beacon_Light" } ], - "selectedColumn": "Duration", - "selectedRow": 29 + "selectedColumn": "MCM", + "selectedRow": 0 }, "style": { "margin": 20 @@ -6775,22 +3852,22 @@ "custom": { "download_in_progress": true, "enable_timeout": false, - "priority_filters": "diagnostic", + "priority_filters": "", "time_from_filter": { "$": [ "ts", 192, - 1749742890983 + 1750356548213 ], - "$ts": 1748878890000 + "$ts": 1750352815331 }, "time_to_filter": { "$": [ "ts", 192, - 1749742805621 + 1750356548213 ], - "$ts": 1749742805621 + "$ts": 1750354615331 }, "type_filters": null }, @@ -7047,7 +4124,6 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, - "currentTabIndex": 2, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql index 6154629..fc3d989 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -1,17 +1,15 @@ SELECT Active.id AS ID, - Active.eventtime AS `StartTimestamp`, - Clear.eventtime AS `EndTimestamp`, + 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') + LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':', + LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':', + LPAD(Active.duration_seconds % 60, 2, '0') ) AS Duration, - CONCAT( - SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(Active.source, '/HMI/ALARMST', 1), ':/tag:', -1), '/', -1), - ' - ', - SUBSTRING_INDEX(Active.source, ':/alm:', -1) - ) AS Description, + + CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, + CASE Active.priority WHEN 0 THEN 'Diagnostic' WHEN 1 THEN 'Low' @@ -20,8 +18,15 @@ SELECT 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 + + CONCAT( + Active.displaypath, + '.HMI.', + SUBSTRING_INDEX(aed.strValue, '/', -1) + ) AS Tag, + + Active.displaypath AS MCM + FROM ( SELECT ae.id, @@ -29,12 +34,18 @@ FROM ( ae.eventid, ae.source, ae.priority, + ae.displaypath, TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds FROM alarm_events ae LEFT JOIN alarm_events ae_clear ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1 WHERE ae.eventtype = 0 ) AS Active + LEFT JOIN alarm_events Clear ON Active.eventid = Clear.eventid AND Clear.eventtype = 1 + +LEFT JOIN alarm_event_data aed + ON aed.id = Active.id AND aed.propname = 'myTag' + ORDER BY Active.eventtime DESC; From 2a734daf74c093c72f9e16b92ee54813c26a00ba Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:01:05 +0400 Subject: [PATCH 02/10] Removed shelve/unshelve buttons. Fixed the MCM not displaying correctly. Removed Shelved alarms view and created ALarm HIt List view. Created SQL query for the hit list table. --- .../views/Alarm-Views/RealTime/view.json | 1131 ++++++++++++----- .../named-query/GetAlarmsWithCount/query.sql | 58 + 2 files changed, 869 insertions(+), 320 deletions(-) create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql 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 b034559..35d528a 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 @@ -656,187 +656,6 @@ "basis": "10px" }, "type": "ia.display.label" - }, - { - "custom": { - "alarms_to_shelve": [ - { - "style": { - "classes": "Alarms-Styles/Medium" - }, - "value": { - "Alarm_id": { - "value": 13 - }, - "Duration": { - "value": 10495 - }, - "Expiration": { - "value": { - "$": [ - "ts", - 0, - 1704730823344 - ], - "$ts": 0 - } - }, - "Message": { - "value": "Photo eye blocked" - }, - "Priority": { - "value": "3. Medium" - }, - "Shelve": { - "value": false - }, - "SourceId": { - "value": "PLC09/1210_07_44/B830_3" - }, - "State": { - "value": "Active" - }, - "Timestamp": { - "value": { - "$": [ - "ts", - 0, - 1704730823344 - ], - "$ts": 1704720394486 - } - }, - "Unshelve": { - "value": false - } - } - } - ] - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\t\n\tselected_alarms \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.selection.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\tif(duration):\n\t\tfor alarm in selected_alarms:\n\t\t\tsystem.alarm.shelve(alarm.value[\"Device\"], duration * 60) #60 - seconds.\n\t\t\n\t\tself.props.value \u003d None" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "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", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "options": [ - { - "label": "15 mins", - "value": 15 - }, - { - "label": "30 min", - "value": 30 - }, - { - "label": "45 min", - "value": 45 - }, - { - "label": "1 hr", - "value": 60 - }, - { - "label": "2 hr", - "value": 120 - }, - { - "label": "4 hr", - "value": 240 - }, - { - "label": "8 hr", - "value": 480 - }, - { - "label": "1 Day", - "value": 1440 - }, - { - "label": "2 Days", - "value": 2880 - }, - { - "label": "1 week", - "value": 10080 - }, - { - "label": "2 weeks", - "value": 20160 - }, - { - "label": "Out of Service", - "value": 263000 - } - ], - "placeholder": { - "color": "#000000", - "icon": { - "color": "#000000", - "path": "material/archive", - "style": { - "classes": "" - } - }, - "text": "Shelve" - }, - "search": { - "enabled": false - }, - "showClearIcon": true, - "style": { - "borderBottomLeftRadius": "5px", - "borderBottomRightRadius": "5px", - "borderTopLeftRadius": "5px", - "borderTopRightRadius": "5px", - "classes": "Dropdown/DropDownBox", - "margin": 15 - }, - "value": null - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "alarms-to-shelve", - "pageScope": true, - "script": "\t# implement your handler here\n\tself.custom.alarms_to_shelve \u003d payload", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.dropdown" } ], "meta": { @@ -880,11 +699,10 @@ }, "value": { "Description": "MCM01 Hello world", - "Device": "prov:MTN6_SIMULATION_SCADA_TAG_PROVIDER:/tag:System/MCM/MCM01/Beacon_Light:/alm:Hello world", - "Duration": "00:30:34", - "EventTimestamp": "2025-06-19 21:38:34", + "Duration": "00:50:24", + "EventTimestamp": "2025-06-20 15:07:03", "Location": "MCM01", - "NumberID": 57, + "NumberID": 35, "Priority": "Low", "Tag": "MCM01.HMI.Beacon_Light" } @@ -929,7 +747,7 @@ }, "onChange": { "enabled": null, - "script": "\tfrom system import date\n\t\n\ttag_provider \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\"\n\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, location, priority, description, tag, color, numberId, device):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"NumberID\": numberId,\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Priority\": priority,\n\t\t \"Location\": location,\n\t\t \"Description\": description,\n\t\t \"Tag\": tag,\n\t\t \"Device\": device\n\t\t },\n\t\t \"style\": {\n\t\t \"backgroundColor\": color,\n\t\t }\n\t\t}\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tcolor \u003d \"\"\n\tnumberID \u003d \"\"\n\t\n\tif(results \u003d\u003d0):\n\t\treturn\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime\n\t\tOPCItemTag \u003d system.tag.read(tag_provider + alarm.myTag + \".OpcItemPath\").value\n\t\tparts \u003d OPCItemTag.split(\".\")\n\t\ttag \u003d str(alarm.displayPath) +\".\" + parts[1] + \".\" + parts[2]\n\t\t\n\t\t\n\n\ttry:\n\t query \u003d system.db.runQuery(\"SELECT id, eventtime FROM alarm_events WHERE eventid \u003d \" + \"\u0027\" + str(alarm.id) + \"\u0027\",\"MariaDB\")\n\t if(query):\n\t \tnumberID \u003d query[0][0]\n\t durationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t durationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t \n\t priority \u003d alarm.priority.toString()\n\t if priority \u003d\u003d \"High\":\n\t color \u003d \"#f45d56\"\n\t elif priority \u003d\u003d \"Medium\":\n\t color \u003d \"#d32f2f\"\n\t elif priority \u003d\u003d \"Low\":\n\t color \u003d \"#ffeb3b\"\n\t elif priority \u003d\u003d \"Diagnostic\":\n\t color \u003d \"#2196f3\"\n\t elif priority \u003d\u003d \"Critical\":\n\t color \u003d \"#b71c1c\"\n\t else:\n\t color \u003d \"#ffffff\"\n\t \n\t\tsystem.perspective.print(alarm.myTag)\n\t\tsystem.perspective.print(\"tag is printed\")\n\t \n#\t\tOPCItemTag \u003d system.tag.read(tag_provider + alarm.myTag).OpcItemPath\n\t\tself.session.custom.fc\n\t data.append(testRow(\n\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t duration \u003d durationStr,\n\t location \u003d alarm.displayPath,\n\t numberId \u003d numberID,\n\t priority \u003d priority,\n\t description \u003d alarm.myLocation + \" \" + alarm.name,\n\t tag \u003d tag,\n\t color \u003d color,\n\t device \u003d alarm.source,\n\t ))\n\texcept:\n\t system.perspective.print(\"Something went wrong\")\n\t\n\tself.custom.rawData \u003d data" + "script": "\tfrom system import date\n\t\n\ttag_provider \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\"\n\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, location, priority, description, tag, color, numberId):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"NumberID\": numberId,\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Priority\": priority,\n\t\t \"Location\": location,\n\t\t \"Description\": description,\n\t\t \"Tag\": tag,\n\t\t },\n\t\t \"style\": {\n\t\t \"backgroundColor\": color,\n\t\t }\n\t\t}\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tcolor \u003d \"\"\n\tnumberID \u003d \"\"\n\tlcoation \u003d \"\"\n\t\n\tif(results \u003d\u003d0):\n\t\treturn\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime\n\t\tmyTag \u003d alarm.myTag\n\t\tOPCItemTag \u003d system.tag.read(tag_provider + myTag + \".OpcItemPath\").value\n\t\tif(OPCItemTag):\t\t\n\t\t\tparts \u003d OPCItemTag.split(\".\")\n\t\t\ttag \u003d str(alarm.displayPath) +\".\" + parts[1] + \".\" + parts[2]\n\t\telse:\n\t\t\ttag \u003d \"Unknown tag\"\n\t\t\n\t\ttag_parts \u003d myTag.split(\"/\")\n\t\tif(tag_parts):\n\t\t\tlocation \u003d tag_parts[1] \n\t\telse:\n\t\t\tlocation \u003d \"Unknown Location\"\n\t\t\n\t\t\n\t\ttry:\n\t\t query \u003d system.db.runQuery(\"SELECT id, eventtime FROM alarm_events WHERE eventid \u003d \" + \"\u0027\" + str(alarm.id) + \"\u0027\",\"MariaDB\")\n\t\t if(query):\n\t\t \tnumberID \u003d query[0][0]\n\t\t durationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t\t durationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t\t \n\t\t priority \u003d alarm.priority.toString()\n\t\t if priority \u003d\u003d \"High\":\n\t\t color \u003d \"#f45d56\"\n\t\t elif priority \u003d\u003d \"Medium\":\n\t\t color \u003d \"#d32f2f\"\n\t\t elif priority \u003d\u003d \"Low\":\n\t\t color \u003d \"#ffeb3b\"\n\t\t elif priority \u003d\u003d \"Diagnostic\":\n\t\t color \u003d \"#2196f3\"\n\t\t elif priority \u003d\u003d \"Critical\":\n\t\t color \u003d \"#b71c1c\"\n\t\t else:\n\t\t color \u003d \"#ffffff\"\n\t\t \n\t\n\t\t data.append(testRow(\n\t\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t\t duration \u003d durationStr,\n\t\t location \u003d location,\n\t\t numberId \u003d numberID,\n\t\t priority \u003d priority,\n\t\t description \u003d alarm.myLocation + \" \" + alarm.name,\n\t\t tag \u003d tag,\n\t\t color \u003d color,\n\t\t ))\n\t\texcept:\n\t\t\tpass\n\t\n\tself.custom.rawData \u003d data" } } }, @@ -1485,7 +1303,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 100 + "width": 150 }, { "align": "center", @@ -1577,7 +1395,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 150 + "width": 80 } ], "emptyMessage": { @@ -1622,75 +1440,56 @@ { "children": [ { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\n\tselected_alarms \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.selection.data\n\tif len(selected_alarms) \u003d\u003d 0:\n\t\treturn\n\t\n\t# Unshelve selected alarms\n\tfor alarm in selected_alarms:\n\t\tsystem.alarm.unshelve(alarm[\u0027path\u0027])\n\t\t\n\tpaths_to_remove \u003d {alarm[\u0027path\u0027] for alarm in selected_alarms}\n\t\n\tshelved_alarms \u003d self.parent.parent.parent.parent.parent.getChild(\"TabContainer\").custom.shelvedAlarms\n\t\t\n\tif shelved_alarms is not None:\n\t\tremaining_data \u003d [a for a in shelved_alarms if a[\u0027path\u0027] not in paths_to_remove]\n\t\t\n\tself.parent.parent.parent.parent.parent.getChild(\"TabContainer\").custom.shelvedAlarms \u003d remaining_data" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "153px" - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/archive" - } + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttry:\n\t # Get dataset from table\n\t data \u003d self.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.data\n\t\n\t # CSV header\n\t csv_content \u003d \"First Timestamp,Last Timestamp,Count,Duration,Priority,Location,Description,Tag\\n\"\n\t\n\t if data and data.getRowCount() \u003e 0:\n\t for i in range(data.getRowCount()):\n\t duration_raw \u003d data.getValueAt(i, \"Duration\")\n\t duration_str \u003d str(duration_raw) if duration_raw is not None else \"\"\n\t row_data \u003d [\n\t str(data.getValueAt(i, \"FirstTimestamp\") or \"\"),\n\t str(data.getValueAt(i, \"LastTimestamp\") or \"\"),\n\t str(data.getValueAt(i, \"Count\") or \"\"),\n\t duration_str,\n\t str(data.getValueAt(i, \"Priority\") or \"\"),\n\t str(data.getValueAt(i, \"Location\") or \"\"),\n\t str(data.getValueAt(i, \"Description\") or \"\"),\n\t str(data.getValueAt(i, \"Tag\") or \"\")\n\t ]\n\t\n\t # Escape commas for CSV safety\n\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Error during CSV export: \" + str(e))\n\t csv_content \u003d \"Error exporting alarm data\\n\"\n\t\n\t# Convert to bytes and trigger download\n\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " }, - "style": { - "classes": "Dropdown/DropDownBox" - }, - "text": "Unshelve", - "value": "" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "alarms-to-shelve", - "pageScope": true, - "script": "\t# implement your handler here\n\tself.props.enabled \u003d True\n\tself.custom.alarms_to_shelve \u003d payload", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.button" + "scope": "G", + "type": "script" + } } - ], + }, "meta": { - "name": "FlexContainer_0" + "name": "Button_1" }, "position": { - "basis": "450px", - "shrink": 0 + "basis": "120px" }, "props": { + "image": { + "icon": { + "path": "material/import_export" + } + }, + "primary": false, "style": { - "padding": 5 - } + "margin": 15 + }, + "text": "Export" }, - "type": "ia.container.flex" + "scripts": { + "customMethods": [], + "extensionFunctions": null, + "messageHandlers": [ + { + "messageType": "button-severity-indicator", + "pageScope": true, + "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", + "sessionScope": false, + "viewScope": false + } + ] + }, + "type": "ia.input.button" } ], "meta": { "name": "FlexContainer" }, "position": { - "basis": "40px", - "shrink": 0 + "basis": "70px" }, "props": { "alignContent": "flex-start", @@ -1714,15 +1513,13 @@ "props.data": { "binding": { "config": { - "path": "...../TabContainer.custom.shelvedAlarms" + "polling": { + "enabled": true, + "rate": "5" + }, + "queryPath": "GetAlarmsWithCount" }, - "transforms": [ - { - "code": " data \u003d []\n for row in value: \n keys \u003d row.keys() \n if row[\"priority\"] \u003d\u003d \"High\": \n style \u003d {\"backgroundColor\": \"#fd6059\"} \n elif row[\"priority\"] \u003d\u003d \"Low\": \n style \u003d {\"backgroundColor\": \"#fafa6c\"} \n elif row[\"priority\"] \u003d\u003d \"Diagnostic\": \n style \u003d {\"backgroundColor\": \"#5da0f9\"} \n elif row[\"priority\"] \u003d\u003d \"Medium\": \n style \u003d {\"backgroundColor\": \"#fca25f\"} \n elif row[\"priority\"] \u003d\u003d \"Critical\": \n style \u003d {\"backgroundColor\": \"#c86462\"} \n else:\n style \u003d {\"backgroundColor\": \"\"}\n \n formatted_rows \u003d [{\"value\": v, \"style\": style} for v in row.values()]\n \n row_dict \u003d dict(zip(keys, formatted_rows))\n data.append(row_dict)\n return data ", - "type": "script" - } - ], - "type": "property" + "type": "query" } }, "props.editingCell": { @@ -1740,9 +1537,9 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "none", + "dateFormat": "MM/DD/YYYY HH:mm:ss", "editable": false, - "field": "Description", + "field": "FirstTimestamp", "filter": { "boolean": { "condition": "" @@ -1777,9 +1574,9 @@ "backgroundColor": "#FFFEFE", "classes": "" }, - "title": "" + "title": "First Timestamp" }, - "justify": "auto", + "justify": "left", "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", @@ -1835,7 +1632,7 @@ "boolean": "value", "dateFormat": "MM-DD-YYYY HH:mm:ss", "editable": false, - "field": "path", + "field": "LastTimestamp", "filter": { "boolean": { "condition": "" @@ -1865,11 +1662,11 @@ }, "header": { "align": "center", - "justify": "left", + "justify": "center", "style": { "classes": "" }, - "title": "Start Timestamp" + "title": "Last Timestamp" }, "justify": "center", "nullFormat": { @@ -1927,7 +1724,7 @@ "boolean": "checkbox", "dateFormat": "MM-DD-YYYY HH:mm:ss", "editable": false, - "field": "activeTime", + "field": "Count", "filter": { "boolean": { "condition": "" @@ -1961,7 +1758,7 @@ "style": { "classes": "" }, - "title": "Active Time" + "title": "" }, "justify": "center", "nullFormat": { @@ -2019,7 +1816,7 @@ "boolean": "checkbox", "dateFormat": "none", "editable": false, - "field": "expirationTime", + "field": "Duration", "filter": { "boolean": { "condition": "" @@ -2053,7 +1850,7 @@ "style": { "classes": "" }, - "title": "Expiration Time" + "title": "" }, "justify": "center", "nullFormat": { @@ -2109,9 +1906,9 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "none", + "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "priority", + "field": "Priority", "filter": { "boolean": { "condition": "" @@ -2151,7 +1948,283 @@ "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", - "strict": true + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Location", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": "" + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Description", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 150 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Tag", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false }, "number": "value", "numberFormat": "0,0.##", @@ -2204,8 +2277,25 @@ "text": "No Shelved Alarms" } }, + "filter": { + "enabled": true + }, "selection": { - "mode": "multiple interval" + "data": [ + { + "Count": 8, + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:02:08", + "FirstTimestamp": 1750417519000, + "LastTimestamp": 1750417548000, + "Location": "MCM01", + "Priority": "High", + "Tag": "FL2078_2_VFD1.HMI.Voltage" + } + ], + "mode": "multiple interval", + "selectedColumn": "Duration", + "selectedRow": 1 } }, "type": "ia.display.table" @@ -2222,7 +2312,7 @@ } ], "meta": { - "name": "Shelved tab" + "name": "Hit_List" }, "position": { "tabIndex": 1 @@ -2344,17 +2434,17 @@ "$": [ "ts", 192, - 1750354615331 + 1750417660924 ], - "$ts": 1750354615331 + "$ts": 1750417660924 }, "startDate": { "$": [ "ts", 192, - 1750354615331 + 1750417660924 ], - "$ts": 1750352815331 + "$ts": 1750414060924 } }, "meta": { @@ -2527,7 +2617,7 @@ } }, "props": { - "formattedValue": "Jun 19, 2025 9:06 PM", + "formattedValue": "Jun 20, 2025 2:07 PM", "style": { "margin": 15 } @@ -2612,7 +2702,7 @@ } }, "props": { - "formattedValue": "Jun 19, 2025 9:36 PM", + "formattedValue": "Jun 20, 2025 3:07 PM", "maxDate": { "$": [ "ts", @@ -2627,10 +2717,10 @@ "value": { "$": [ "ts", - 201, - 1750354615331 + 192, + 1750417660924 ], - "$ts": 1750354615331 + "$ts": 1750417660924 } }, "scripts": { @@ -2820,17 +2910,17 @@ "$": [ "ts", 192, - 1750356548213 + 1750417660924 ], - "$ts": 1750352815331 + "$ts": 1750414060924 }, "time_to_filter": { "$": [ "ts", 192, - 1750356548213 + 1750417660924 ], - "$ts": 1750354615331 + "$ts": 1750417660924 } }, "meta": { @@ -3633,83 +3723,483 @@ "data": [ { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 35, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 29, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 36, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 30, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 35, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 29, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 36, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 30, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 35, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 29, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 36, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 30, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 35, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 29, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" }, { "Description": "MCM01 - Hello world", - "Duration": "00:00:42", - "EndTimestamp": 1750354587000, - "ID": 36, + "Duration": "00:00:06", + "EndTimestamp": 1750417622000, + "ID": 30, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354545000, + "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 25, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 26, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 25, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 26, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 25, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 26, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 25, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:16", + "EndTimestamp": 1750417611000, + "ID": 26, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417595000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 21, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 22, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 21, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 22, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 21, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 22, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 21, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:07", + "EndTimestamp": 1750417592000, + "ID": 22, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417585000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 17, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 18, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 17, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 18, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 17, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 18, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 17, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:05", + "EndTimestamp": 1750417582000, + "ID": 18, + "MCM": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417577000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 11, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 12, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 11, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 12, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 11, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 12, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 11, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:07", + "EndTimestamp": 1750417555000, + "ID": 12, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417548000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 5, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 6, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 5, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 6, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 5, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 6, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 5, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" + }, + { + "Description": "FL2078_2_VFD1 - Alarm", + "Duration": "00:00:25", + "EndTimestamp": 1750417544000, + "ID": 6, + "MCM": "FL2078_2_VFD1", + "Priority": "High", + "StartTimestamp": 1750417519000, + "Tag": "FL2078_2_VFD1.HMI.Voltage" } ], "enabled": true @@ -3722,12 +4212,12 @@ "data": [ { "Description": "MCM01 - Hello world", - "Duration": "00:00:02", - "EndTimestamp": 1750354703000, - "ID": 47, + "Duration": "00:24:34", + "EndTimestamp": null, + "ID": 35, "MCM": "MCM01", "Priority": "Low", - "StartTimestamp": 1750354701000, + "StartTimestamp": 1750417623000, "Tag": "MCM01.HMI.Beacon_Light" } ], @@ -3857,17 +4347,17 @@ "$": [ "ts", 192, - 1750356548213 + 1750417660924 ], - "$ts": 1750352815331 + "$ts": 1750414060924 }, "time_to_filter": { "$": [ "ts", 192, - 1750356548213 + 1750417660924 ], - "$ts": 1750354615331 + "$ts": 1750417660924 }, "type_filters": null }, @@ -4124,6 +4614,7 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, + "currentTabIndex": 1, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" @@ -4156,7 +4647,7 @@ }, "tabs": [ "Active Alarms", - "Shelved Alarms", + "ALarm Hit List", "Historical" ] }, diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql new file mode 100644 index 0000000..28a2e21 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql @@ -0,0 +1,58 @@ +SELECT + CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, + + SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location, + + -- Formatted OPC-style tag + CONCAT( + Active.displaypath, + '.HMI.', + SUBSTRING_INDEX(aed.strValue, '/', -1) + ) AS Tag, + + CASE Active.priority + WHEN 0 THEN 'Diagnostic' + WHEN 1 THEN 'Low' + WHEN 2 THEN 'Medium' + WHEN 3 THEN 'High' + WHEN 4 THEN 'Critical' + ELSE 'Unknown' + END AS Priority, + + -- First and last seen times for this alarm + MIN(Active.eventtime) AS FirstTimestamp, + MAX(Active.eventtime) AS LastTimestamp, + + -- Total duration summed from each active-clear pair + CONCAT( + LPAD(FLOOR(SUM(Active.duration_seconds) / 3600), 2, '0'), ':', + LPAD(FLOOR((SUM(Active.duration_seconds) % 3600) / 60), 2, '0'), ':', + LPAD(SUM(Active.duration_seconds) % 60, 2, '0') + ) AS Duration, + + -- Total number of activations + COUNT(*) AS Count + +FROM ( + SELECT + ae.id, + ae.source, + ae.eventid, + ae.eventtime, + ae.priority, + ae.displaypath, + TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds + FROM alarm_events ae + LEFT JOIN alarm_events ae_clear + ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1 + WHERE ae.eventtype = 0 +) AS Active + +-- OPC tag path for building .hmi.Tag output +LEFT JOIN alarm_event_data aed + ON aed.id = Active.id AND aed.propname = 'myTag' + +-- 🔹 Group by the full unique alarm key (tag + alarm name) +GROUP BY Active.source, Active.displaypath, aed.strValue + +ORDER BY FirstTimestamp DESC; From 78bdb3ee8270cc366a3db8f1549f757089782409 Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:39:23 +0400 Subject: [PATCH 03/10] Fixed the error of the export button not getting all the details correctly from table. --- .../views/Alarm-Views/RealTime/view.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 35d528a..4424859 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 @@ -599,7 +599,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t\n\t # CSV header\n\t csv_content \u003d \"Event Timestamp,Duration,Name,Priority,Description,Tag\\n\"\n\t\n\t if data and len(data) \u003e 0:\n\t for row in data:\n\t val \u003d row.get(\"value\", {})\n\t row_data \u003d [\n\t str(val.get(\"EventTimestamp\", \"\")),\n\t str(val.get(\"Duration\", \"\")),\n\t str(val.get(\"Name\", \"\")),\n\t str(val.get(\"Priority\", \"\")),\n\t str(val.get(\"Description\", \"\")),\n\t str(val.get(\"Tag\", \"\"))\n\t ]\n\t\n\t # Escape commas for CSV safety\n\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Error during CSV export: \" + str(e))\n\t csv_content \u003d \"Error exporting alarm data\\n\"\n\t\n\t# Convert to bytes and trigger download\n\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " + "script": "\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t\n\t # CSV header\n\t csv_content \u003d \"Number (ID),Event Timestamp,Duration,Priority,Description,Tag\\n\"\n\t\n\t if data and len(data) \u003e 0:\n\t for row in data:\n\t val \u003d row.get(\"value\", {})\n\t row_data \u003d [\n\t str(val.get(\"NumberID\", \"\")),\n\t str(val.get(\"EventTimestamp\", \"\")),\n\t str(val.get(\"Duration\", \"\")),\n\t str(val.get(\"Priority\", \"\")),\n\t str(val.get(\"Description\", \"\")),\n\t str(val.get(\"Tag\", \"\"))\n\t ]\n\t\n\t # Escape commas for CSV safety\n\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Error during CSV export: \" + str(e))\n\t csv_content \u003d \"Error exporting alarm data\\n\"\n\t\n\t# Convert to bytes and trigger download\n\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " }, "scope": "G", "type": "script" @@ -699,7 +699,7 @@ }, "value": { "Description": "MCM01 Hello world", - "Duration": "00:50:24", + "Duration": "01:30:31", "EventTimestamp": "2025-06-20 15:07:03", "Location": "MCM01", "NumberID": 35, @@ -4614,7 +4614,6 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, - "currentTabIndex": 1, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" From 6682cea030ee6d9646d46e64051ef331d2b2374b Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:52:14 +0400 Subject: [PATCH 04/10] Modified sql code to fetch and display location in the historical table --- .../views/Alarm-Views/RealTime/view.json | 106 +++++++++--------- .../ignition/named-query/GetAlarms/query.sql | 2 +- 2 files changed, 54 insertions(+), 54 deletions(-) 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 4424859..b9b0634 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 @@ -699,7 +699,7 @@ }, "value": { "Description": "MCM01 Hello world", - "Duration": "01:30:31", + "Duration": "01:42:53", "EventTimestamp": "2025-06-20 15:07:03", "Location": "MCM01", "NumberID": 35, @@ -3536,7 +3536,7 @@ "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, - "field": "MCM", + "field": "Location", "filter": { "boolean": { "condition": "" @@ -3726,7 +3726,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 29, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3736,7 +3736,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 30, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3746,7 +3746,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 29, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3756,7 +3756,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 30, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3766,7 +3766,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 29, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3776,7 +3776,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 30, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3786,7 +3786,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 29, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3796,7 +3796,7 @@ "Duration": "00:00:06", "EndTimestamp": 1750417622000, "ID": 30, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417616000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3806,7 +3806,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 25, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3816,7 +3816,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 26, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3826,7 +3826,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 25, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3836,7 +3836,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 26, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3846,7 +3846,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 25, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3856,7 +3856,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 26, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3866,7 +3866,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 25, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3876,7 +3876,7 @@ "Duration": "00:00:16", "EndTimestamp": 1750417611000, "ID": 26, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417595000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3886,7 +3886,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 21, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3896,7 +3896,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 22, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3906,7 +3906,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 21, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3916,7 +3916,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 22, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3926,7 +3926,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 21, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3936,7 +3936,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 22, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3946,7 +3946,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 21, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3956,7 +3956,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417592000, "ID": 22, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417585000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3966,7 +3966,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 17, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3976,7 +3976,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 18, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3986,7 +3986,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 17, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -3996,7 +3996,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 18, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -4006,7 +4006,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 17, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -4016,7 +4016,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 18, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -4026,7 +4026,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 17, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -4036,7 +4036,7 @@ "Duration": "00:00:05", "EndTimestamp": 1750417582000, "ID": 18, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417577000, "Tag": "MCM01.HMI.Beacon_Light" @@ -4046,7 +4046,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 11, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4056,7 +4056,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 12, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4066,7 +4066,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 11, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4076,7 +4076,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 12, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4086,7 +4086,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 11, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4096,7 +4096,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 12, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4106,7 +4106,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 11, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4116,7 +4116,7 @@ "Duration": "00:00:07", "EndTimestamp": 1750417555000, "ID": 12, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417548000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4126,7 +4126,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 5, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4136,7 +4136,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 6, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4146,7 +4146,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 5, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4156,7 +4156,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 6, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4166,7 +4166,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 5, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4176,7 +4176,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 6, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4186,7 +4186,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 5, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4196,7 +4196,7 @@ "Duration": "00:00:25", "EndTimestamp": 1750417544000, "ID": 6, - "MCM": "FL2078_2_VFD1", + "Location": "MCM01", "Priority": "High", "StartTimestamp": 1750417519000, "Tag": "FL2078_2_VFD1.HMI.Voltage" @@ -4212,16 +4212,15 @@ "data": [ { "Description": "MCM01 - Hello world", - "Duration": "00:24:34", + "Duration": "01:42:53", "EndTimestamp": null, "ID": 35, - "MCM": "MCM01", + "Location": "MCM01", "Priority": "Low", "StartTimestamp": 1750417623000, "Tag": "MCM01.HMI.Beacon_Light" } ], - "selectedColumn": "MCM", "selectedRow": 0 }, "style": { @@ -4614,6 +4613,7 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, + "currentTabIndex": 2, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql index fc3d989..dc70857 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -25,7 +25,7 @@ SELECT SUBSTRING_INDEX(aed.strValue, '/', -1) ) AS Tag, - Active.displaypath AS MCM + SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location FROM ( SELECT From 88bdae9da47eb8cafc8e2b30e961c90f827174c9 Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:39:28 +0400 Subject: [PATCH 05/10] Changed history export to csv file. --- .../views/Alarm-Views/RealTime/view.json | 94 +++++++++++-------- 1 file changed, 56 insertions(+), 38 deletions(-) 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 b9b0634..3f2dc32 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 @@ -692,22 +692,7 @@ "children": [ { "custom": { - "rawData": [ - { - "style": { - "backgroundColor": "#ffeb3b" - }, - "value": { - "Description": "MCM01 Hello world", - "Duration": "01:42:53", - "EventTimestamp": "2025-06-20 15:07:03", - "Location": "MCM01", - "NumberID": 35, - "Priority": "Low", - "Tag": "MCM01.HMI.Beacon_Light" - } - } - ] + "rawData": [] }, "meta": { "name": "Table" @@ -1404,7 +1389,10 @@ } }, "filter": { - "enabled": true + "enabled": true, + "results": { + "enabled": true + } }, "selection": { "mode": "multiple interval" @@ -2434,17 +2422,17 @@ "$": [ "ts", 192, - 1750417660924 + 1750428991104 ], - "$ts": 1750417660924 + "$ts": 1750428991104 }, "startDate": { "$": [ "ts", 192, - 1750417660924 + 1750428991104 ], - "$ts": 1750414060924 + "$ts": 1750414591104 } }, "meta": { @@ -2617,7 +2605,7 @@ } }, "props": { - "formattedValue": "Jun 20, 2025 2:07 PM", + "formattedValue": "Jun 20, 2025 2:16 PM", "style": { "margin": 15 } @@ -2702,7 +2690,7 @@ } }, "props": { - "formattedValue": "Jun 20, 2025 3:07 PM", + "formattedValue": "Jun 20, 2025 6:16 PM", "maxDate": { "$": [ "ts", @@ -2718,9 +2706,9 @@ "$": [ "ts", 192, - 1750417660924 + 1750428991104 ], - "$ts": 1750417660924 + "$ts": 1750428991104 } }, "scripts": { @@ -2910,17 +2898,17 @@ "$": [ "ts", 192, - 1750417660924 + 1750428991105 ], - "$ts": 1750414060924 + "$ts": 1750414591104 }, "time_to_filter": { "$": [ "ts", 192, - 1750417660924 + 1750428991105 ], - "$ts": 1750417660924 + "$ts": 1750428991104 } }, "meta": { @@ -3721,6 +3709,36 @@ "enabled": true, "results": { "data": [ + { + "Description": "MCM01 - Hello world", + "Duration": "00:00:32", + "EndTimestamp": 1750427866000, + "ID": 39, + "Location": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750427834000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "02:49:21", + "EndTimestamp": 1750427784000, + "ID": 35, + "Location": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417623000, + "Tag": "MCM01.HMI.Beacon_Light" + }, + { + "Description": "MCM01 - Hello world", + "Duration": "02:49:21", + "EndTimestamp": 1750427784000, + "ID": 36, + "Location": "MCM01", + "Priority": "Low", + "StartTimestamp": 1750417623000, + "Tag": "MCM01.HMI.Beacon_Light" + }, { "Description": "MCM01 - Hello world", "Duration": "00:00:06", @@ -4212,12 +4230,12 @@ "data": [ { "Description": "MCM01 - Hello world", - "Duration": "01:42:53", - "EndTimestamp": null, - "ID": 35, + "Duration": "00:00:32", + "EndTimestamp": 1750427866000, + "ID": 39, "Location": "MCM01", "Priority": "Low", - "StartTimestamp": 1750417623000, + "StartTimestamp": 1750427834000, "Tag": "MCM01.HMI.Beacon_Light" } ], @@ -4346,17 +4364,17 @@ "$": [ "ts", 192, - 1750417660924 + 1750428991105 ], - "$ts": 1750414060924 + "$ts": 1750414591104 }, "time_to_filter": { "$": [ "ts", 192, - 1750417660924 + 1750428991105 ], - "$ts": 1750417660924 + "$ts": 1750428991104 }, "type_filters": null }, @@ -4364,7 +4382,7 @@ "component": { "onActionPerformed": { "config": { - "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" + "script": "\n from datetime import datetime\n def format_date(value):\n\t\tif isinstance(value, (int, long)) and value \u003e 10000000:\n\t\t\ttimestamp \u003d system.date.fromMillis(value)\n\t\t\treturn system.date.format(timestamp, \"yyyy-MM-dd HH:mm:ss\")\n\t\t\t\n\t\t# If value is not a valid timestamp, return as-is\n\t\treturn str(value)\n \n try:\n\n # Get filtered data\n table \u003d self.parent.parent.getChild(\"Table\").getChild(\"Table\")\n filtered_data \u003d table.props.filter.results.data\n\n if not filtered_data or len(filtered_data) \u003d\u003d 0:\n system.perspective.print(\"No filtered data to export.\")\n return\n\n # Get correct column order from the table\u0027s column config\n column_order \u003d [col[\"field\"] for col in table.props.columns if \"field\" in col]\n\n csv_content \u003d \",\".join(column_order) + \"\\n\"\n\n # Build rows\n for row_dict in filtered_data:\n row \u003d []\n for col in column_order:\n raw_val \u003d row_dict.get(col, \"\")\n value \u003d format_date(raw_val)\n value \u003d value.replace(\",\", \";\") # CSV safety\n row.append(value)\n csv_content +\u003d \",\".join(row) + \"\\n\"\n\n # Export CSV\n csv_bytes \u003d csv_content.encode(\"utf-8\")\n system.perspective.download(\"filtered_alarms_history.csv\", csv_bytes)\n\n system.perspective.print(\"CSV export completed successfully. Exported %d records.\" % len(filtered_data))\n\n except Exception as e:\n system.perspective.print(\"Export failed: \" + str(e))" }, "scope": "G", "type": "script" From a1203b24daf95b1db2ef20e58d6d263e1c985ffb Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:01:01 +0400 Subject: [PATCH 06/10] Hit list and historical alarms now have colors based on priority --- .../views/Alarm-Views/RealTime/view.json | 43 +++++++------------ 1 file changed, 15 insertions(+), 28 deletions(-) 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 3f2dc32..e40b20b 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 @@ -1507,6 +1507,12 @@ }, "queryPath": "GetAlarmsWithCount" }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"] \n\n\t\t# Determine style based on priority\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fd6059\"}\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fafa6c\"}\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#5da0f9\"}\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fca25f\"}\n\t\telif priority \u003d\u003d \"Critical\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#c86462\"}\n\t\telse:\n\t\t\tstyle \u003d {\"backgroundColor\": \"\"}\n\n\t\t# Apply style to all columns in this row\n\t\trow_dict \u003d {col: {\"value\": row[col], \"style\": style} for col in column_names}\n\t\tdata.append(row_dict)\n\n\treturn data\n", + "type": "script" + } + ], "type": "query" } }, @@ -2269,21 +2275,8 @@ "enabled": true }, "selection": { - "data": [ - { - "Count": 8, - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:02:08", - "FirstTimestamp": 1750417519000, - "LastTimestamp": 1750417548000, - "Location": "MCM01", - "Priority": "High", - "Tag": "FL2078_2_VFD1.HMI.Voltage" - } - ], - "mode": "multiple interval", - "selectedColumn": "Duration", - "selectedRow": 1 + "enableRowSelection": false, + "mode": "multiple interval" } }, "type": "ia.display.table" @@ -2961,6 +2954,12 @@ }, "queryPath": "GetAlarms" }, + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"] \n\n\t\t# Determine style based on priority\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fd6059\"}\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fafa6c\"}\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#5da0f9\"}\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fca25f\"}\n\t\telif priority \u003d\u003d \"Critical\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#c86462\"}\n\t\telse:\n\t\t\tstyle \u003d {\"backgroundColor\": \"\"}\n\n\t\t# Apply style to all columns in this row\n\t\trow_dict \u003d {col: {\"value\": row[col], \"style\": style} for col in column_names}\n\t\tdata.append(row_dict)\n\n\treturn data", + "type": "script" + } + ], "type": "query" } } @@ -4227,19 +4226,7 @@ "bottom": false }, "selection": { - "data": [ - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:32", - "EndTimestamp": 1750427866000, - "ID": 39, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750427834000, - "Tag": "MCM01.HMI.Beacon_Light" - } - ], - "selectedRow": 0 + "enableRowSelection": false }, "style": { "margin": 20 From 543c430448d8de6af7e121e073b3d48d9630e08b Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:13:53 +0400 Subject: [PATCH 07/10] Changed hardcoded alarm colors to classes --- .../views/Alarm-Views/RealTime/view.json | 596 ++---------------- 1 file changed, 58 insertions(+), 538 deletions(-) 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 e40b20b..3ab983b 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 @@ -692,7 +692,22 @@ "children": [ { "custom": { - "rawData": [] + "rawData": [ + { + "style": { + "classes": "Alarms-Styles/Low" + }, + "value": { + "Description": "MCM01 Hello world", + "Duration": "00:01:14", + "EventTimestamp": "2025-06-20 21:11:53", + "Location": "MCM01", + "NumberID": 42, + "Priority": "Low", + "Tag": "MCM01.HMI.Beacon_Light" + } + } + ] }, "meta": { "name": "Table" @@ -732,7 +747,7 @@ }, "onChange": { "enabled": null, - "script": "\tfrom system import date\n\t\n\ttag_provider \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\"\n\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, location, priority, description, tag, color, numberId):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"NumberID\": numberId,\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Priority\": priority,\n\t\t \"Location\": location,\n\t\t \"Description\": description,\n\t\t \"Tag\": tag,\n\t\t },\n\t\t \"style\": {\n\t\t \"backgroundColor\": color,\n\t\t }\n\t\t}\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tcolor \u003d \"\"\n\tnumberID \u003d \"\"\n\tlcoation \u003d \"\"\n\t\n\tif(results \u003d\u003d0):\n\t\treturn\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime\n\t\tmyTag \u003d alarm.myTag\n\t\tOPCItemTag \u003d system.tag.read(tag_provider + myTag + \".OpcItemPath\").value\n\t\tif(OPCItemTag):\t\t\n\t\t\tparts \u003d OPCItemTag.split(\".\")\n\t\t\ttag \u003d str(alarm.displayPath) +\".\" + parts[1] + \".\" + parts[2]\n\t\telse:\n\t\t\ttag \u003d \"Unknown tag\"\n\t\t\n\t\ttag_parts \u003d myTag.split(\"/\")\n\t\tif(tag_parts):\n\t\t\tlocation \u003d tag_parts[1] \n\t\telse:\n\t\t\tlocation \u003d \"Unknown Location\"\n\t\t\n\t\t\n\t\ttry:\n\t\t query \u003d system.db.runQuery(\"SELECT id, eventtime FROM alarm_events WHERE eventid \u003d \" + \"\u0027\" + str(alarm.id) + \"\u0027\",\"MariaDB\")\n\t\t if(query):\n\t\t \tnumberID \u003d query[0][0]\n\t\t durationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t\t durationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t\t \n\t\t priority \u003d alarm.priority.toString()\n\t\t if priority \u003d\u003d \"High\":\n\t\t color \u003d \"#f45d56\"\n\t\t elif priority \u003d\u003d \"Medium\":\n\t\t color \u003d \"#d32f2f\"\n\t\t elif priority \u003d\u003d \"Low\":\n\t\t color \u003d \"#ffeb3b\"\n\t\t elif priority \u003d\u003d \"Diagnostic\":\n\t\t color \u003d \"#2196f3\"\n\t\t elif priority \u003d\u003d \"Critical\":\n\t\t color \u003d \"#b71c1c\"\n\t\t else:\n\t\t color \u003d \"#ffffff\"\n\t\t \n\t\n\t\t data.append(testRow(\n\t\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t\t duration \u003d durationStr,\n\t\t location \u003d location,\n\t\t numberId \u003d numberID,\n\t\t priority \u003d priority,\n\t\t description \u003d alarm.myLocation + \" \" + alarm.name,\n\t\t tag \u003d tag,\n\t\t color \u003d color,\n\t\t ))\n\t\texcept:\n\t\t\tpass\n\t\n\tself.custom.rawData \u003d data" + "script": "\tfrom system import date\n\t\n\ttag_provider \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\"\n\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, location, priority, description, tag, className, numberId):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"NumberID\": numberId,\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Priority\": priority,\n\t\t \"Location\": location,\n\t\t \"Description\": description,\n\t\t \"Tag\": tag,\n\t\t },\n\t\t \"style\": {\n\t\t \"classes\": className,\n\t\t }\n\t\t}\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tnumberID \u003d \"\"\n\tlcoation \u003d \"\"\n\tclassName \u003d \"\"\n\tif(results \u003d\u003d0):\n\t\treturn\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime\n\t\tmyTag \u003d alarm.myTag\n\t\tOPCItemTag \u003d system.tag.read(tag_provider + myTag + \".OpcItemPath\").value\n\t\tif(OPCItemTag):\t\t\n\t\t\tparts \u003d OPCItemTag.split(\".\")\n\t\t\ttag \u003d str(alarm.displayPath) +\".\" + parts[1] + \".\" + parts[2]\n\t\telse:\n\t\t\ttag \u003d \"Unknown tag\"\n\t\t\n\t\ttag_parts \u003d myTag.split(\"/\")\n\t\tif(tag_parts):\n\t\t\tlocation \u003d tag_parts[1] \n\t\telse:\n\t\t\tlocation \u003d \"Unknown Location\"\n\t\t\n\t\t\n\t\ttry:\n\t\t query \u003d system.db.runQuery(\"SELECT id, eventtime FROM alarm_events WHERE eventid \u003d \" + \"\u0027\" + str(alarm.id) + \"\u0027\",\"MariaDB\")\n\t\t if(query):\n\t\t \tnumberID \u003d query[0][0]\n\t\t durationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t\t durationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t\t \n\t\t priority \u003d alarm.priority.toString()\n\t\t if priority \u003d\u003d \"High\":\n\t\t color \u003d \"Alarms-Styles/High\"\n\t\t elif priority \u003d\u003d \"Medium\":\n\t\t className \u003d \"Alarms-Styles/Medium\"\n\t\t elif priority \u003d\u003d \"Low\":\n\t\t className \u003d \"Alarms-Styles/Low\"\n\t\t elif priority \u003d\u003d \"Diagnostic\":\n\t\t className \u003d \"Alarms-Styles/Diagnostic\"\n\t\t else:\n\t\t className \u003d \"Alarms-Styles/NoAlarm\"\n\t\t \n\t\n\t\t data.append(testRow(\n\t\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t\t duration \u003d durationStr,\n\t\t location \u003d location,\n\t\t numberId \u003d numberID,\n\t\t priority \u003d priority,\n\t\t description \u003d alarm.myLocation + \" \" + alarm.name,\n\t\t tag \u003d tag,\n\t\t className \u003d className,\n\t\t ))\n\t\texcept:\n\t\t\tpass\n\t\n\tself.custom.rawData \u003d data" } } }, @@ -1391,8 +1406,20 @@ "filter": { "enabled": true, "results": { + "data": [ + { + "Description": "MCM01 Hello world", + "Duration": "00:01:14", + "EventTimestamp": "2025-06-20 21:11:53", + "Location": "MCM01", + "NumberID": 42, + "Priority": "Low", + "Tag": "MCM01.HMI.Beacon_Light" + } + ], "enabled": true - } + }, + "text": " " }, "selection": { "mode": "multiple interval" @@ -1432,7 +1459,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\ttry:\n\t # Get dataset from table\n\t data \u003d self.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.data\n\t\n\t # CSV header\n\t csv_content \u003d \"First Timestamp,Last Timestamp,Count,Duration,Priority,Location,Description,Tag\\n\"\n\t\n\t if data and data.getRowCount() \u003e 0:\n\t for i in range(data.getRowCount()):\n\t duration_raw \u003d data.getValueAt(i, \"Duration\")\n\t duration_str \u003d str(duration_raw) if duration_raw is not None else \"\"\n\t row_data \u003d [\n\t str(data.getValueAt(i, \"FirstTimestamp\") or \"\"),\n\t str(data.getValueAt(i, \"LastTimestamp\") or \"\"),\n\t str(data.getValueAt(i, \"Count\") or \"\"),\n\t duration_str,\n\t str(data.getValueAt(i, \"Priority\") or \"\"),\n\t str(data.getValueAt(i, \"Location\") or \"\"),\n\t str(data.getValueAt(i, \"Description\") or \"\"),\n\t str(data.getValueAt(i, \"Tag\") or \"\")\n\t ]\n\t\n\t # Escape commas for CSV safety\n\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Error during CSV export: \" + str(e))\n\t csv_content \u003d \"Error exporting alarm data\\n\"\n\t\n\t# Convert to bytes and trigger download\n\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " + "script": "\tfrom datetime import datetime\n\t\n\ttry:\n\t data \u003d self.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.data\n\t\n\t column_order \u003d [\n\t \"FirstTimestamp\",\n\t \"LastTimestamp\", \n\t \"Count\",\n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \t\n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \t\n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)" }, "scope": "G", "type": "script" @@ -1503,13 +1530,13 @@ "config": { "polling": { "enabled": true, - "rate": "5" + "rate": "3" }, "queryPath": "GetAlarmsWithCount" }, "transforms": [ { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"] \n\n\t\t# Determine style based on priority\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fd6059\"}\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fafa6c\"}\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#5da0f9\"}\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fca25f\"}\n\t\telif priority \u003d\u003d \"Critical\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#c86462\"}\n\t\telse:\n\t\t\tstyle \u003d {\"backgroundColor\": \"\"}\n\n\t\t# Apply style to all columns in this row\n\t\trow_dict \u003d {col: {\"value\": row[col], \"style\": style} for col in column_names}\n\t\tdata.append(row_dict)\n\n\treturn data\n", + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data\n", "type": "script" } ], @@ -2272,7 +2299,13 @@ } }, "filter": { - "enabled": true + "enabled": true, + "results": { + "enabled": true + } + }, + "pager": { + "activeOption": 5 }, "selection": { "enableRowSelection": false, @@ -2415,17 +2448,17 @@ "$": [ "ts", 192, - 1750428991104 + 1750436956149 ], - "$ts": 1750428991104 + "$ts": 1750436956149 }, "startDate": { "$": [ "ts", 192, - 1750428991104 + 1750436956149 ], - "$ts": 1750414591104 + "$ts": 1750435156149 } }, "meta": { @@ -2598,7 +2631,7 @@ } }, "props": { - "formattedValue": "Jun 20, 2025 2:16 PM", + "formattedValue": "Jun 20, 2025 7:59 PM", "style": { "margin": 15 } @@ -2683,7 +2716,7 @@ } }, "props": { - "formattedValue": "Jun 20, 2025 6:16 PM", + "formattedValue": "Jun 20, 2025 8:29 PM", "maxDate": { "$": [ "ts", @@ -2699,9 +2732,9 @@ "$": [ "ts", 192, - 1750428991104 + 1750436956149 ], - "$ts": 1750428991104 + "$ts": 1750436956149 } }, "scripts": { @@ -2891,17 +2924,17 @@ "$": [ "ts", 192, - 1750428991105 + 1750436956154 ], - "$ts": 1750414591104 + "$ts": 1750435156149 }, "time_to_filter": { "$": [ "ts", 192, - 1750428991105 + 1750436956154 ], - "$ts": 1750428991104 + "$ts": 1750436956149 } }, "meta": { @@ -2956,7 +2989,7 @@ }, "transforms": [ { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"] \n\n\t\t# Determine style based on priority\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fd6059\"}\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fafa6c\"}\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#5da0f9\"}\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#fca25f\"}\n\t\telif priority \u003d\u003d \"Critical\":\n\t\t\tstyle \u003d {\"backgroundColor\": \"#c86462\"}\n\t\telse:\n\t\t\tstyle \u003d {\"backgroundColor\": \"\"}\n\n\t\t# Apply style to all columns in this row\n\t\trow_dict \u003d {col: {\"value\": row[col], \"style\": style} for col in column_names}\n\t\tdata.append(row_dict)\n\n\treturn data", + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", "type": "script" } ], @@ -3707,518 +3740,6 @@ "filter": { "enabled": true, "results": { - "data": [ - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:32", - "EndTimestamp": 1750427866000, - "ID": 39, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750427834000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "02:49:21", - "EndTimestamp": 1750427784000, - "ID": 35, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417623000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "02:49:21", - "EndTimestamp": 1750427784000, - "ID": 36, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417623000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 29, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 30, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 29, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 30, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 29, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 30, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 29, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:06", - "EndTimestamp": 1750417622000, - "ID": 30, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417616000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 25, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 26, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 25, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 26, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 25, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 26, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 25, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:16", - "EndTimestamp": 1750417611000, - "ID": 26, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417595000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 21, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 22, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 21, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 22, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 21, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 22, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 21, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:07", - "EndTimestamp": 1750417592000, - "ID": 22, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417585000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 17, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 18, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 17, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 18, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 17, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 18, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 17, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "MCM01 - Hello world", - "Duration": "00:00:05", - "EndTimestamp": 1750417582000, - "ID": 18, - "Location": "MCM01", - "Priority": "Low", - "StartTimestamp": 1750417577000, - "Tag": "MCM01.HMI.Beacon_Light" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 11, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 12, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 11, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 12, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 11, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 12, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 11, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:07", - "EndTimestamp": 1750417555000, - "ID": 12, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417548000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 5, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 6, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 5, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 6, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 5, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 6, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 5, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - }, - { - "Description": "FL2078_2_VFD1 - Alarm", - "Duration": "00:00:25", - "EndTimestamp": 1750417544000, - "ID": 6, - "Location": "MCM01", - "Priority": "High", - "StartTimestamp": 1750417519000, - "Tag": "FL2078_2_VFD1.HMI.Voltage" - } - ], "enabled": true } }, @@ -4351,17 +3872,17 @@ "$": [ "ts", 192, - 1750428991105 + 1750436956154 ], - "$ts": 1750414591104 + "$ts": 1750435156149 }, "time_to_filter": { "$": [ "ts", 192, - 1750428991105 + 1750436956154 ], - "$ts": 1750428991104 + "$ts": 1750436956149 }, "type_filters": null }, @@ -4618,7 +4139,6 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, - "currentTabIndex": 2, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" @@ -4651,7 +4171,7 @@ }, "tabs": [ "Active Alarms", - "ALarm Hit List", + "Alarm Hit List", "Historical" ] }, From 76e026896dd6fe770fe9a815325fe6efaec06f29 Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:18:13 +0400 Subject: [PATCH 08/10] Fixed the bug of seeing duplciate alarms in the historical alarms --- .../views/Alarm-Views/RealTime/view.json | 24 ++++----- .../ignition/named-query/GetAlarms/query.sql | 54 ++++++++++++------- 2 files changed, 47 insertions(+), 31 deletions(-) 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 3ab983b..e74d764 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 @@ -699,10 +699,10 @@ }, "value": { "Description": "MCM01 Hello world", - "Duration": "00:01:14", - "EventTimestamp": "2025-06-20 21:11:53", + "Duration": "00:05:48", + "EventTimestamp": "2025-06-23 13:10:26", "Location": "MCM01", - "NumberID": 42, + "NumberID": 60, "Priority": "Low", "Tag": "MCM01.HMI.Beacon_Light" } @@ -1409,10 +1409,10 @@ "data": [ { "Description": "MCM01 Hello world", - "Duration": "00:01:14", - "EventTimestamp": "2025-06-20 21:11:53", + "Duration": "00:03:48", + "EventTimestamp": "2025-06-23 13:10:26", "Location": "MCM01", - "NumberID": 42, + "NumberID": 60, "Priority": "Low", "Tag": "MCM01.HMI.Beacon_Light" } @@ -2731,7 +2731,7 @@ "value": { "$": [ "ts", - 192, + 201, 1750436956149 ], "$ts": 1750436956149 @@ -2910,7 +2910,6 @@ "children": [ { "custom": { - "initial_data": [], "max_duration": { "$": [ "ts", @@ -2924,7 +2923,7 @@ "$": [ "ts", 192, - 1750436956154 + 1750667761263 ], "$ts": 1750435156149 }, @@ -2932,7 +2931,7 @@ "$": [ "ts", 192, - 1750436956154 + 1750667761263 ], "$ts": 1750436956149 } @@ -3872,7 +3871,7 @@ "$": [ "ts", 192, - 1750436956154 + 1750667761263 ], "$ts": 1750435156149 }, @@ -3880,7 +3879,7 @@ "$": [ "ts", 192, - 1750436956154 + 1750667761263 ], "$ts": 1750436956149 }, @@ -4139,6 +4138,7 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, + "currentTabIndex": 2, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql index dc70857..165ff92 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -1,13 +1,42 @@ +WITH Active AS ( + SELECT + ae.id, + ae.eventtime, + ae.eventid, + ae.source, + ae.priority, + ae.displaypath, + TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds + FROM alarm_events ae + LEFT JOIN alarm_events ae_clear + ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1 + WHERE ae.eventtype = 0 + GROUP BY ae.id -- Ensure one row per alarm +), +SingleMyTag AS ( + SELECT aed.id, aed.strValue + FROM alarm_event_data aed + WHERE aed.propname = 'myTag' + GROUP BY aed.id -- Collapse duplicates by id +), +SingleClear AS ( + SELECT eventid, MIN(eventtime) AS eventtime + FROM alarm_events + WHERE eventtype = 1 + GROUP BY eventid +) + SELECT Active.id AS ID, Active.eventtime AS StartTimestamp, Clear.eventtime AS EndTimestamp, + CONCAT( LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':', LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':', LPAD(Active.duration_seconds % 60, 2, '0') ) AS Duration, - + CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, CASE Active.priority @@ -27,25 +56,12 @@ SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location -FROM ( - SELECT - ae.id, - ae.eventtime, - ae.eventid, - ae.source, - ae.priority, - ae.displaypath, - TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds - FROM alarm_events ae - LEFT JOIN alarm_events ae_clear - ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1 - WHERE ae.eventtype = 0 -) AS Active +FROM Active -LEFT JOIN alarm_events Clear - ON Active.eventid = Clear.eventid AND Clear.eventtype = 1 +LEFT JOIN SingleClear Clear + ON Active.eventid = Clear.eventid -LEFT JOIN alarm_event_data aed - ON aed.id = Active.id AND aed.propname = 'myTag' +LEFT JOIN SingleMyTag aed + ON aed.id = Active.id ORDER BY Active.eventtime DESC; From e9843607db87254c1d167e1213b98543bf3188c0 Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:25:37 +0400 Subject: [PATCH 09/10] Added GetActiveAlarms named query, removed extra scripts in the active alarm table --- .../views/Alarm-Views/RealTime/view.json | 140 +++++++++++------- .../named-query/GetActiveAlarms/query.sql | 60 ++++++++ .../named-query/GetActiveAlarms/resource.json | 40 +++++ .../ignition/named-query/GetAlarms/query.sql | 2 + .../named-query/GetAlarmsWithCount/query.sql | 2 + 5 files changed, 188 insertions(+), 56 deletions(-) create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/resource.json 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 e74d764..d6f97c7 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 @@ -488,6 +488,7 @@ ], "custom": { "priorities": { + "critical": false, "diagnostic": false, "high": false, "low": false, @@ -599,7 +600,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t\n\t # CSV header\n\t csv_content \u003d \"Number (ID),Event Timestamp,Duration,Priority,Description,Tag\\n\"\n\t\n\t if data and len(data) \u003e 0:\n\t for row in data:\n\t val \u003d row.get(\"value\", {})\n\t row_data \u003d [\n\t str(val.get(\"NumberID\", \"\")),\n\t str(val.get(\"EventTimestamp\", \"\")),\n\t str(val.get(\"Duration\", \"\")),\n\t str(val.get(\"Priority\", \"\")),\n\t str(val.get(\"Description\", \"\")),\n\t str(val.get(\"Tag\", \"\"))\n\t ]\n\t\n\t # Escape commas for CSV safety\n\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Error during CSV export: \" + str(e))\n\t csv_content \u003d \"Error exporting alarm data\\n\"\n\t\n\t# Convert to bytes and trigger download\n\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " + "script": "\tfrom datetime import datetime\n\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t \n\t column_order \u003d [\n\t \"ID\",\n\t \"StartTimestamp\", \n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t # CSV header\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes) \n\t \n\t \n\t \n\t\n#\t if data and len(data) \u003e 0:\n#\t for row in data:\n#\t val \u003d row.get(\"value\", {})\n#\t row_data \u003d [\n#\t str(val.get(\"NumberID\", \"\")),\n#\t str(val.get(\"EventTimestamp\", \"\")),\n#\t str(val.get(\"Duration\", \"\")),\n#\t str(val.get(\"Priority\", \"\")),\n#\t str(val.get(\"Description\", \"\")),\n#\t str(val.get(\"Tag\", \"\"))\n#\t ]\n#\t\n#\t # Escape commas for CSV safety\n#\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n#\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n#\t else:\n#\t csv_content +\u003d \"No alarms in current view\\n\"\n#\t\n#\texcept Exception as e:\n#\t system.perspective.print(\"Error during CSV export: \" + str(e))\n#\t csv_content \u003d \"Error exporting alarm data\\n\"\n#\t\n#\t# Convert to bytes and trigger download\n#\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n#\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " }, "scope": "G", "type": "script" @@ -691,24 +692,6 @@ { "children": [ { - "custom": { - "rawData": [ - { - "style": { - "classes": "Alarms-Styles/Low" - }, - "value": { - "Description": "MCM01 Hello world", - "Duration": "00:05:48", - "EventTimestamp": "2025-06-23 13:10:26", - "Location": "MCM01", - "NumberID": 60, - "Priority": "Low", - "Tag": "MCM01.HMI.Beacon_Light" - } - } - ] - }, "meta": { "name": "Table" }, @@ -721,33 +704,34 @@ "config": { "path": ".../FlexContainer/FlexContainer.custom.priorities" }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "path": "this.custom.rawData" - }, "transforms": [ { - "code": "\t\n\tpriorities \u003d self.custom.priorities if hasattr(self.custom, \"priorities\") else []\n\t\n\tactivePriorities \u003d [k.capitalize() for k, v in priorities.items() if v]\n\t\n\tif not activePriorities:\n\t return value\n\t\n\tfiltered_data \u003d []\n\t\n\tfor row in value:\n\t\tpriority \u003d row[\"value\"][\"Priority\"]\n\t\tif priority in activePriorities:\n\t \t filtered_data.append(row)\n\t\n\treturn filtered_data", + "code": "\t\n\tpriority_to_number \u003d {\n\t \"critical\": 4,\n\t \"high\": 3,\n\t \"medium\": 2,\n\t \"low\": 1,\n\t \"diagnostic\": 0\n\t}\n\t\n\t\n\t# Collect enabled priorities\n\tenabled \u003d [str(priority_to_number[k]) for k, v in value.items() if v]\n\t\n\tresult \u003d \",\".join(enabled)\n\t\n\tif not result:\n\t\treturn \"\"\n\t\n\treturn result\n\t\n", "type": "script" } ], "type": "property" } }, - "props.query": { + "props.data": { "binding": { "config": { - "expression": "now(2000)" + "parameters": { + "priorityList": "{this.custom.priorities}" + }, + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetActiveAlarms" }, - "type": "expr" - }, - "onChange": { - "enabled": null, - "script": "\tfrom system import date\n\t\n\ttag_provider \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\"\n\n\t# Helper: format row for table\n\tdef testRow(eventTimeStamp, duration, location, priority, description, tag, className, numberId):\n\t\treturn {\n\t\t \"value\": {\n\t\t \"NumberID\": numberId,\n\t\t \"EventTimestamp\": eventTimeStamp,\n\t\t \"Duration\": duration,\n\t\t \"Priority\": priority,\n\t\t \"Location\": location,\n\t\t \"Description\": description,\n\t\t \"Tag\": tag,\n\t\t },\n\t\t \"style\": {\n\t\t \"classes\": className,\n\t\t }\n\t\t}\n\t\n\t# Query active alarms\n\tresults \u003d system.alarm.queryStatus(state\u003d[\"ActiveUnacked\", \"ActiveAcked\"])\n\t\n\t# Build rows\n\tdata \u003d []\n\tnumberID \u003d \"\"\n\tlcoation \u003d \"\"\n\tclassName \u003d \"\"\n\tif(results \u003d\u003d0):\n\t\treturn\n\t\n\tfor i, alarm in enumerate(results):\n\t\tactiveTime \u003d alarm.eventTime\n\t\tmyTag \u003d alarm.myTag\n\t\tOPCItemTag \u003d system.tag.read(tag_provider + myTag + \".OpcItemPath\").value\n\t\tif(OPCItemTag):\t\t\n\t\t\tparts \u003d OPCItemTag.split(\".\")\n\t\t\ttag \u003d str(alarm.displayPath) +\".\" + parts[1] + \".\" + parts[2]\n\t\telse:\n\t\t\ttag \u003d \"Unknown tag\"\n\t\t\n\t\ttag_parts \u003d myTag.split(\"/\")\n\t\tif(tag_parts):\n\t\t\tlocation \u003d tag_parts[1] \n\t\telse:\n\t\t\tlocation \u003d \"Unknown Location\"\n\t\t\n\t\t\n\t\ttry:\n\t\t query \u003d system.db.runQuery(\"SELECT id, eventtime FROM alarm_events WHERE eventid \u003d \" + \"\u0027\" + str(alarm.id) + \"\u0027\",\"MariaDB\")\n\t\t if(query):\n\t\t \tnumberID \u003d query[0][0]\n\t\t durationSeconds \u003d date.secondsBetween(activeTime, date.now())\n\t\t durationStr \u003d date.format(date.addSeconds(date.midnight(date.now()), durationSeconds), \"HH:mm:ss\")\n\t\t \n\t\t priority \u003d alarm.priority.toString()\n\t\t if priority \u003d\u003d \"High\":\n\t\t color \u003d \"Alarms-Styles/High\"\n\t\t elif priority \u003d\u003d \"Medium\":\n\t\t className \u003d \"Alarms-Styles/Medium\"\n\t\t elif priority \u003d\u003d \"Low\":\n\t\t className \u003d \"Alarms-Styles/Low\"\n\t\t elif priority \u003d\u003d \"Diagnostic\":\n\t\t className \u003d \"Alarms-Styles/Diagnostic\"\n\t\t else:\n\t\t className \u003d \"Alarms-Styles/NoAlarm\"\n\t\t \n\t\n\t\t data.append(testRow(\n\t\t eventTimeStamp \u003d date.format(activeTime, \"yyyy-MM-dd HH:mm:ss\"),\n\t\t duration \u003d durationStr,\n\t\t location \u003d location,\n\t\t numberId \u003d numberID,\n\t\t priority \u003d priority,\n\t\t description \u003d alarm.myLocation + \" \" + alarm.name,\n\t\t tag \u003d tag,\n\t\t className \u003d className,\n\t\t ))\n\t\texcept:\n\t\t\tpass\n\t\n\tself.custom.rawData \u003d data" + "transforms": [ + { + "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d [col for col in ds.columnNames if col !\u003d \"EndTimestamp\"]\n\t\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", + "type": "script" + } + ], + "type": "query" } } }, @@ -848,9 +832,9 @@ { "align": "center", "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", + "dateFormat": "MM/DD/YYYY HH:mm:ss", "editable": false, - "field": "EventTimestamp", + "field": "StartTimestamp", "filter": { "boolean": { "condition": "" @@ -1401,28 +1385,73 @@ "emptyMessage": { "noData": { "text": "No Active Alarms" + }, + "noFilterResults": { + "text": "No Active Alarms" } }, "filter": { "enabled": true, "results": { - "data": [ - { - "Description": "MCM01 Hello world", - "Duration": "00:03:48", - "EventTimestamp": "2025-06-23 13:10:26", - "Location": "MCM01", - "NumberID": 60, - "Priority": "Low", - "Tag": "MCM01.HMI.Beacon_Light" - } - ], "enabled": true - }, - "text": " " + } }, "selection": { - "mode": "multiple interval" + "data": [ + { + "Description": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": "MCM01 - Hello world" + }, + "Duration": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": "00:53:47" + }, + "ID": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": 103 + }, + "Location": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": "MCM01" + }, + "Priority": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": "High" + }, + "StartTimestamp": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": { + "$": [ + "ts", + 0, + 1750677703466 + ], + "$ts": 1750674476000 + } + }, + "Tag": { + "style": { + "classes": "Alarms-Styles/High" + }, + "value": "MCM01.HMI.Beacon_Light" + } + } + ], + "mode": "multiple interval", + "selectedRow": 0 } }, "type": "ia.display.table" @@ -2923,7 +2952,7 @@ "$": [ "ts", 192, - 1750667761263 + 1750674251724 ], "$ts": 1750435156149 }, @@ -2931,7 +2960,7 @@ "$": [ "ts", 192, - 1750667761263 + 1750674251724 ], "$ts": 1750436956149 } @@ -3871,7 +3900,7 @@ "$": [ "ts", 192, - 1750667761263 + 1750674251724 ], "$ts": 1750435156149 }, @@ -3879,7 +3908,7 @@ "$": [ "ts", 192, - 1750667761263 + 1750674251724 ], "$ts": 1750436956149 }, @@ -4138,7 +4167,6 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, - "currentTabIndex": 2, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql new file mode 100644 index 0000000..d3c2165 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql @@ -0,0 +1,60 @@ +WITH Active AS ( + SELECT + ae.id, + ae.eventtime, + ae.eventid, + ae.source, + ae.priority, + ae.displaypath, + TIMESTAMPDIFF(SECOND, ae.eventtime, NOW()) AS duration_seconds + FROM alarm_events ae + WHERE ae.eventtype = 0 + AND NOT EXISTS ( + SELECT 1 FROM alarm_events ae_clear + WHERE ae_clear.eventid = ae.eventid + AND ae_clear.eventtype = 1 + ) + AND ae.displaypath NOT LIKE '%System Startup%' + AND ae.source NOT LIKE '%System Startup%' + -- Priority filter using FIND_IN_SET for comma-separated values + AND ( + :priorityList IS NULL + OR :priorityList = '' + OR FIND_IN_SET(ae.priority, :priorityList) > 0 + ) + GROUP BY ae.id +), +SingleMyTag AS ( + SELECT aed.id, aed.strValue + FROM alarm_event_data aed + WHERE aed.propname = 'myTag' + GROUP BY aed.id +) +SELECT + Active.id AS ID, + Active.eventtime AS StartTimestamp, + NULL AS EndTimestamp, -- no end time since it's still active + CONCAT( + LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':', + LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':', + LPAD(Active.duration_seconds % 60, 2, '0') + ) AS Duration, + CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, + CASE Active.priority + WHEN 0 THEN 'Diagnostic' + WHEN 1 THEN 'Low' + WHEN 2 THEN 'Medium' + WHEN 3 THEN 'High' + WHEN 4 THEN 'Critical' + ELSE 'Unknown' + END AS Priority, + CONCAT( + Active.displaypath, + '.HMI.', + SUBSTRING_INDEX(aed.strValue, '/', -1) + ) AS Tag, + SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location +FROM Active +LEFT JOIN SingleMyTag aed + ON aed.id = Active.id +ORDER BY Active.eventtime DESC; \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/resource.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/resource.json new file mode 100644 index 0000000..9fc8d6e --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/resource.json @@ -0,0 +1,40 @@ +{ + "scope": "DG", + "version": 2, + "restricted": false, + "overridable": true, + "files": [ + "query.sql" + ], + "attributes": { + "useMaxReturnSize": false, + "autoBatchEnabled": false, + "fallbackValue": "", + "maxReturnSize": 100, + "cacheUnit": "SEC", + "type": "Query", + "enabled": true, + "cacheAmount": 1, + "cacheEnabled": false, + "database": "MariaDB", + "fallbackEnabled": false, + "lastModificationSignature": "d4eef6a8194fc16fb2061c0ffe057909fb37ddedbe4fd6e4f2416cc6050f6209", + "permissions": [ + { + "zone": "default", + "role": "" + } + ], + "lastModification": { + "actor": "admin", + "timestamp": "2025-06-23T10:38:45Z" + }, + "parameters": [ + { + "type": "Parameter", + "identifier": "priorityList", + "sqlType": 7 + } + ] + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql index 165ff92..3f3a3e2 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -11,6 +11,8 @@ WITH Active AS ( LEFT JOIN alarm_events ae_clear ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1 WHERE ae.eventtype = 0 + AND ae.displaypath NOT LIKE '%System Startup%' + AND ae.source NOT LIKE '%System Startup%' GROUP BY ae.id -- Ensure one row per alarm ), SingleMyTag AS ( diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql index 28a2e21..fc32678 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql @@ -46,6 +46,8 @@ FROM ( LEFT JOIN alarm_events ae_clear ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1 WHERE ae.eventtype = 0 + AND ae.displaypath NOT LIKE '%System Startup%' + AND ae.source NOT LIKE '%System Startup%' ) AS Active -- OPC tag path for building .hmi.Tag output From b7f745ea6462096dc6dd583045701b8bc04055a7 Mon Sep 17 00:00:00 2001 From: Salijoghli <107577102+Salijoghli@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:50:04 +0400 Subject: [PATCH 10/10] Added no alarms texts to all tables --- .../views/Alarm-Views/RealTime/view.json | 70 ++++--------------- 1 file changed, 14 insertions(+), 56 deletions(-) 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 d6f97c7..fb215e9 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 @@ -1397,61 +1397,7 @@ } }, "selection": { - "data": [ - { - "Description": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": "MCM01 - Hello world" - }, - "Duration": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": "00:53:47" - }, - "ID": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": 103 - }, - "Location": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": "MCM01" - }, - "Priority": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": "High" - }, - "StartTimestamp": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": { - "$": [ - "ts", - 0, - 1750677703466 - ], - "$ts": 1750674476000 - } - }, - "Tag": { - "style": { - "classes": "Alarms-Styles/High" - }, - "value": "MCM01.HMI.Beacon_Light" - } - } - ], - "mode": "multiple interval", - "selectedRow": 0 + "mode": "multiple interval" } }, "type": "ia.display.table" @@ -2324,7 +2270,10 @@ ], "emptyMessage": { "noData": { - "text": "No Shelved Alarms" + "text": "No Alarms" + }, + "noFilterResults": { + "text": "No Alarms" } }, "filter": { @@ -3764,6 +3713,14 @@ "width": "" } ], + "emptyMessage": { + "noData": { + "text": "No Alarms" + }, + "noFilterResults": { + "text": "No Alarms" + } + }, "enabled": true, "filter": { "enabled": true, @@ -4167,6 +4124,7 @@ "contentStyle": { "classes": "Background-Styles/Grey-Background" }, + "currentTabIndex": 2, "menuType": "modern", "style": { "classes": "Background-Styles/Grey-Background"