Updated Project

This commit is contained in:
gigi.mamaladze 2025-10-13 23:53:40 +04:00
parent 5500715d18
commit 6db7ff33fc
41 changed files with 576 additions and 2491 deletions

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:13:50Z"
},
"lastModificationSignature": "5a32859f2500e344ceafdf82caa7136387e09ee7308abbdfa737f982014723c3"
}
}

View File

@ -833,7 +833,7 @@
},
{
"meta": {
"name": "ULC3_06_FIO1"
"name": "ULC3_6_FIO1"
},
"position": {
"height": 0.1667,
@ -844,7 +844,7 @@
"props": {
"params": {
"tagProps": [
"System/MCM01/IO_BLOCK/FIO/ULC3_06_FIO1",
"System/MCM01/IO_BLOCK/FIO/ULC3_6_FIO1",
"value",
"value",
"value",
@ -993,7 +993,7 @@
"y": 0.7583
},
"props": {
"text": "DPM1_ULC3-6",
"text": "DPM1_ULC3_6",
"textStyle": {
"fontSize": "2vmin"
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:14:28Z"
},
"lastModificationSignature": "16ef832b0a6c6d213badb801619f08a70c0fe9870a94d56e54e9adfd8b1054be"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:14:42Z"
},
"lastModificationSignature": "56a14591a9e4e00dec5410b8b53a661afc65331c03d9d9f82bd8d3b29cabad6f"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:14:51Z"
},
"lastModificationSignature": "1e3e1b4e5df116d70be27bd5ab387b001496f15c1703ba248a6da9df30751312"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:15:15Z"
},
"lastModificationSignature": "49703d20bf732edf53698773e61ded070bb3831ee6af415ec6c1356f09a3324a"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:15:54Z"
},
"lastModificationSignature": "021c6a8a5ffd7e62575a9f0b50c63e952e98a7c2ec14632ee5a27ee02c50f668"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:16:02Z"
},
"lastModificationSignature": "45250a2b4c4cfee45fff9f09128c0df59cc5496084ffb79421e98974f6e2857f"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:16:14Z"
},
"lastModificationSignature": "990886d902393dfee18f97e6d530415285fbc216c62e707ef93b3a4f1533e344"
}
}

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-10-13T19:16:26Z"
},
"lastModificationSignature": "91b980983e967aded2b065feed482c0a30b726970ae60a46d6e091ac926225be"
}
}

View File

@ -417,7 +417,7 @@
"y": 0.6
},
"props": {
"text": "DPM1_ULC3-6 11.200.1.4",
"text": "DPM1_ULC3_6 11.200.1.4",
"textStyle": {
"fontSize": "1vmin"
}

View File

@ -230,10 +230,10 @@
"name": "MCM"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666,
"y": 0.5
"height": 0.4262,
"width": 0.3839,
"x": 0.6681,
"y": 0.5066
},
"propConfig": {
"props.params.communicationFaulted": {
@ -274,9 +274,10 @@
"name": "DPM1_PS1-1"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666
"height": 0.4262,
"width": 0.3839,
"x": 0.6681,
"y": 0.0825
},
"propConfig": {
"props.params.communicationFaulted": {
@ -324,9 +325,10 @@
"name": "DPM1_PS2-1"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333
"height": 0.4262,
"width": 0.3839,
"x": 0.3333,
"y": 0.0825
},
"propConfig": {
"props.params.communicationFaulted": {
@ -374,8 +376,10 @@
"name": "DPM2_PS1-1"
},
"position": {
"height": 0.5,
"width": 0.3333
"height": 0.4262,
"width": 0.3839,
"x": -0.0055,
"y": 0.082
},
"propConfig": {
"props.params.communicationFaulted": {
@ -422,9 +426,10 @@
"name": "DPM2_PS2-1"
},
"position": {
"height": 0.5,
"width": 0.3333,
"y": 0.5
"height": 0.4262,
"width": 0.3839,
"x": -0.0055,
"y": 0.5065
},
"propConfig": {
"props.params.communicationFaulted": {
@ -463,11 +468,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.65,
"y": 0.1
"x": 0.8411,
"y": 0.0783
},
"props": {
"text": "DPM1_PS1-1 11.200.1.2",
"text": "DPM1_PS1_1 11.200.1.2",
"textStyle": {
"fontSize": "1vmin"
}
@ -481,11 +486,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.1
"x": 0.5044,
"y": 0.0737
},
"props": {
"text": "DPM1_PS2-1 11.200.1.4",
"text": "DPM1_PS2_1 11.200.1.4",
"textStyle": {
"fontSize": "1vmin"
}
@ -499,11 +504,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.1
"x": 0.1644,
"y": 0.0748
},
"props": {
"text": "DPM2_PS1-1 11.200.1.3",
"text": "DPM2_PS1_1 11.200.1.3",
"textStyle": {
"fontSize": "1vmin"
}
@ -517,11 +522,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.6
"x": 0.1644,
"y": 0.4981
},
"props": {
"text": "DPM2_PS2-1 11.200.1.5",
"text": "DPM2_PS2_1 11.200.1.5",
"textStyle": {
"fontSize": "1vmin"
}
@ -545,8 +550,8 @@
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333,
"width": 0.2901,
"x": 0.3785,
"y": 0.4999
},
"props": {

View File

@ -230,10 +230,10 @@
"name": "MCM"
},
"position": {
"height": 0.5,
"width": 0.3333,
"height": 0.4262,
"width": 0.3839,
"x": 0.6666,
"y": 0.5
"y": 0.5059
},
"propConfig": {
"props.params.communicationFaulted": {
@ -274,9 +274,10 @@
"name": "DPM1_PS3-1"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666
"height": 0.4262,
"width": 0.3839,
"x": 0.6666,
"y": 0.0804
},
"propConfig": {
"props.params.communicationFaulted": {
@ -324,9 +325,10 @@
"name": "DPM1_PS4-1"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333
"height": 0.4262,
"width": 0.3839,
"x": 0.3333,
"y": 0.0804
},
"propConfig": {
"props.params.communicationFaulted": {
@ -374,8 +376,10 @@
"name": "DPM2_PS3-1"
},
"position": {
"height": 0.5,
"width": 0.3333
"height": 0.4262,
"width": 0.3839,
"x": -0.0075,
"y": 0.0804
},
"propConfig": {
"props.params.communicationFaulted": {
@ -422,9 +426,10 @@
"name": "DPM2_PS4-1"
},
"position": {
"height": 0.5,
"width": 0.3333,
"y": 0.5
"height": 0.4262,
"width": 0.3839,
"x": -0.0075,
"y": 0.5067
},
"propConfig": {
"props.params.communicationFaulted": {
@ -463,11 +468,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.65,
"y": 0.1
"x": 0.8443,
"y": 0.0731
},
"props": {
"text": "DPM1_PS3-1 11.200.1.2",
"text": "DPM1_PS3_1 11.200.1.2",
"textStyle": {
"fontSize": "1vmin"
}
@ -481,11 +486,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.1
"x": 0.508,
"y": 0.0776
},
"props": {
"text": "DPM1_PS4-1 11.200.1.4",
"text": "DPM1_PS4_1 11.200.1.4",
"textStyle": {
"fontSize": "1vmin"
}
@ -499,11 +504,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.1
"x": 0.1826,
"y": 0.072
},
"props": {
"text": "DPM2_PS3-1 11.200.1.3",
"text": "DPM2_PS3_1 11.200.1.3",
"textStyle": {
"fontSize": "1vmin"
}
@ -517,11 +522,11 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.6
"x": 0.1685,
"y": 0.5004
},
"props": {
"text": "DPM2_PS4-1 11.200.1.5",
"text": "DPM2_PS4_1 11.200.1.5",
"textStyle": {
"fontSize": "1vmin"
}
@ -544,10 +549,10 @@
"name": "DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333,
"y": 0.4999
"height": 0.4094,
"width": 0.2953,
"x": 0.3737,
"y": 0.5081
},
"props": {
"params": {
@ -574,7 +579,8 @@
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
"backgroundColor": "#ffffff",
"overflow": "hidden"
}
},
"type": "ia.container.coord"

View File

@ -764,8 +764,8 @@
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.065,
"y": 0.3
"x": 0.0077,
"y": 0.1009
},
"props": {
"text": "DPM03_VS01A 11.200.1.4",

View File

@ -1,18 +0,0 @@
{
"base": {
"animation": {
"duration": "2.5s",
"keyframes": {
"0%": {
"boxShadow": "0 0 12px 5px rgba(255, 255, 0, 0.8)"
},
"50%": {
"boxShadow": "0 0 20px 8px rgba(255, 255, 0, 1)"
},
"100%": {
"boxShadow": "0 0 5px 2px rgba(255, 255, 0, 0.3)"
}
}
}
}
}

View File

@ -106,14 +106,14 @@
}
},
"props": {
"formattedValue": "Oct 11, 2025 1:43 AM",
"formattedValue": "Oct 13, 2025 9:20 PM",
"value": {
"$": [
"ts",
192,
1760121836384
1760365224310
],
"$ts": 1760132636382
"$ts": 1760376024303
}
},
"type": "ia.input.date-time-input"
@ -156,14 +156,14 @@
"shrink": 0
},
"props": {
"formattedValue": "Oct 11, 2025 2:43 AM",
"formattedValue": "Oct 13, 2025 10:20 PM",
"value": {
"$": [
"ts",
192,
1760121836384
1760365224308
],
"$ts": 1760136236382
"$ts": 1760379624303
}
},
"type": "ia.input.date-time-input"

View File

@ -6,8 +6,7 @@
"MCM03",
"MCM04",
"MCM05"
],
"state": null
]
},
"params": {
"tagProps": [
@ -44,51 +43,6 @@
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "if(isNull({value}), 0, {value})",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 3,
"output": 3
},
{
"input": 2,
"output": 2
},
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true

View File

@ -7,8 +7,8 @@
"MCM04",
"MCM05"
],
"color": "#C2C2C2",
"state": "Closed"
"color": "#FF0000",
"state": "VFD Reset Required"
},
"params": {
"tagProps": [
@ -1571,6 +1571,244 @@
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "NameField"
},
"position": {
"basis": "50%",
"grow": 1
},
"props": {
"style": {
"paddingLeft": 20
},
"text": "LOCAL MODE"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Last_VFD_Fault_Code"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "this.props.text"
},
"transforms": [
{
"fallback": "#D5D5D5",
"inputType": "scalar",
"mappings": [
{
"input": "UNKNOWN",
"output": "#FFFFFF"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Local_Mode_Active"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)",
"type": "expression"
},
{
"fallback": "INACTIVE",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "ACTIVE"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Property"
},
"position": {
"basis": "35px"
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel",
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Local_Mode_Active"
},
"position": {
"basis": "35px"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "NameField"
},
"position": {
"basis": "50%",
"grow": 1
},
"props": {
"style": {
"paddingLeft": 20
},
"text": "LOCAL DISCONNECT"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Last_VFD_Fault_Code"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "this.props.text"
},
"transforms": [
{
"fallback": "#D5D5D5",
"inputType": "scalar",
"mappings": [
{
"input": "UNKNOWN",
"output": "#FFFFFF"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Local_Disconnect_Off"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)",
"type": "expression"
},
{
"fallback": "ON",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "OFF"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Property"
},
"position": {
"basis": "35px"
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel",
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Local_Disconnect_Off"
},
"position": {
"basis": "35px"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {

View File

@ -1,12 +1,12 @@
{
"custom": {
"color": "#808080",
"priority": "No Active Alarms",
"state": "TagError"
"color": "#FFFF00",
"priority": "Low",
"state": "Half Full"
},
"params": {
"tagProps": [
"value",
"Status/Chute/Chute_68",
"value",
"value",
"value",
@ -74,7 +74,7 @@
},
"transforms": [
{
"code": " data \u003d dict(value) if value else {}\n \n if value is None or data.get(\"_quality\") \u003d\u003d \"Bad\" or data.get(\"error\"):\n return \"TagError\"\n \n\tif data.get(\"Jam\"):\n\t return \"Jammed\"\n\telif data.get(\"Full\"):\n\t return \"Full\"\n\telif data.get(\"Half_Full\"):\n\t return \"Half Full\"\n\telif data.get(\"No_Container\"):\n\t return \"No Container\"\n\telif data.get(\"Disabled\") \u003d\u003d False:\n\t return \"Enabled\"\n\telse:\n\t return \"Inactive\" \n return \"Inactive\"",
"code": " data \u003d dict(value) if value else {}\n\n if data.get(\"Jam\"):\n return \"Jammed\"\n elif data.get(\"Full\"):\n return \"Full\"\n elif data.get(\"Half_Full\"):\n return \"Half Full\"\n elif data.get(\"No_Container\"):\n return \"No Container\"\n elif data.get(\"Disabled\") \u003d\u003d False:\n return \"Enabled\"\n else:\n return \"Inactive\"",
"type": "script"
}
],

View File

@ -1,5 +1,5 @@
-- GetActiveAlarmsByLocationAndPriority: Count active alarms grouped by location and priority
-- Uses: idx_alarm_events_group, idx_alarm_events_clear, idx_alarm_event_data_lookup
-- Uses: idx_alarm_events_active, idx_alarm_events_clear, idx_alarm_event_data_lookup, idx_alarm_events_priority
-- Expected performance: <100ms on 37K rows, <200ms on 1M+ rows
SELECT
@ -13,7 +13,7 @@ SELECT
ELSE 'Unknown'
END AS Priority,
COUNT(*) AS Count
FROM alarm_events ae FORCE INDEX (idx_alarm_events_group)
FROM alarm_events ae FORCE INDEX (idx_alarm_events_active)
LEFT JOIN alarm_event_data aed FORCE INDEX (idx_alarm_event_data_lookup)
ON aed.id = ae.id AND aed.propname = 'myTag'
WHERE ae.eventtype = 0

View File

@ -3,7 +3,6 @@
-- MAXIMUM PERFORMANCE: Optimized for EndTimestamp filtering
-- Expected performance: <500ms on 37K rows
-- Params: :starttime (DATETIME), :endtime (DATETIME)
-- Uses: idx_alarm_events_type_time_id, idx_alarm_events_clear_agg, idx_alarm_events_eventid_only, idx_alarm_events_clear
/*+ MAX_EXECUTION_TIME(8000) */
@ -24,16 +23,15 @@ SELECT
WHEN 4 THEN 'Critical'
ELSE 'Unknown'
END AS Priority,
CONCAT(a.displaypath, '.HMI.Alarm.', SUBSTRING_INDEX(IFNULL(aed.strValue, ''), '/', -1)) AS Tag,
SUBSTRING_INDEX(SUBSTRING_INDEX(IFNULL(aed.strValue, ''), '/', 2), '/', -1) AS Location,
IFNULL(aed.strValue, SUBSTRING_INDEX(a.source, ':/tag:', -1)) AS Tag,
IFNULL(aed.strValue, a.source) AS FullTag,
aed.strValue AS FullTag,
a.displaypath AS Device
FROM alarm_events a FORCE INDEX (idx_alarm_events_type_time_id)
LEFT JOIN (
-- Find first clear time for each alarm
-- FORCE INDEX on clear_agg optimizes the MIN(eventtime) GROUP BY
SELECT eventid, MIN(eventtime) AS min_clear_time
FROM alarm_events FORCE INDEX (idx_alarm_events_clear_agg)
FROM alarm_events FORCE INDEX (idx_alarm_events_clear)
WHERE eventtype = 1
AND eventtime >= :starttime
AND eventtime < :endtime
@ -66,6 +64,7 @@ WHERE
clr.min_clear_time IS NOT NULL -- Cleared alarms in window
OR :endtime >= DATE_SUB(NOW(), INTERVAL 5 MINUTE) -- Active alarms if endtime is recent
)
ORDER BY
CASE WHEN clr.min_clear_time IS NULL THEN 0 ELSE 1 END,
IFNULL(clr.min_clear_time, a.eventtime) DESC,

View File

@ -1,16 +1,16 @@
-- GetAlarmsWithCount: Alarm statistics with activation counts for a time window
-- Uses: idx_alarm_events_type_time_id, idx_alarm_events_clear_agg, idx_alarm_events_eventid_only, idx_alarm_event_data_lookup
-- Uses: idx_alarm_events_type_time_id, idx_alarm_events_clear, idx_alarm_event_data_lookup
-- Expected performance: <300ms on 37K rows, <800ms on 1M+ rows
-- Params: :startTime (DATETIME or NULL/empty), :endTime (DATETIME or NULL/empty)
/*+ MAX_EXECUTION_TIME(8000) */
WITH ClearedEvents AS (
-- Pre-aggregate clear times - FORCED index for MIN(eventtime) GROUP BY optimization
-- Pre-aggregate clear times - FORCED index usage for speed
SELECT
eventid,
MIN(eventtime) AS clear_time
FROM alarm_events FORCE INDEX (idx_alarm_events_clear_agg)
FROM alarm_events FORCE INDEX (idx_alarm_events_clear)
WHERE eventtype = 1
GROUP BY eventid
)
@ -18,10 +18,9 @@ SELECT
CONCAT(IFNULL(ae.displaypath, 'Unknown'), ' - ',
SUBSTRING_INDEX(IFNULL(ae.source, ''), ':/alm:', -1)) AS Description,
SUBSTRING_INDEX(SUBSTRING_INDEX(IFNULL(aed.strValue, ''), '/', 2), '/', -1) AS Location,
CONCAT(ae.displaypath, '.HMI.Alarm.', SUBSTRING_INDEX(IFNULL(aed.strValue, ''), '/', -1)) AS Tag,
CONCAT(IFNULL(ae.displaypath, 'Unknown'), '.HMI.',
SUBSTRING_INDEX(IFNULL(aed.strValue, ''), '/', -1)) AS Tag,
SUBSTRING_INDEX(SUBSTRING_INDEX(IFNULL(aed.strValue, ''), '/', 2), '/', -1) AS Location,
CASE ae.priority
WHEN 0 THEN 'Diagnostic'