From 835b0ad79da236561c8328a4307cbcb35ea43e88 Mon Sep 17 00:00:00 2001 From: beka makharadze Date: Mon, 8 Sep 2025 17:05:18 +0400 Subject: [PATCH] Update Queries --- .../CommandControlActions/view.json | 464 ++++++++++++++++-- .../ControllerStatus/view.json | 45 +- .../named-query/GetActiveAlarms/query.sql | 4 +- .../ignition/named-query/GetAlarms/query.sql | 4 +- .../named-query/GetAlarms/resource.json | 4 +- .../named-query/GetAlarmsWithCount/query.sql | 4 +- 6 files changed, 443 insertions(+), 82 deletions(-) diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json index d782399..2005c02 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/CommandControlActions/view.json @@ -83,27 +83,107 @@ "fallbackDelay": 2.5, "mode": "indirect", "references": { - "0": "{view.params.value.tagProps[0]}", + "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Start_PB_STATE" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start_PB_Color" }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},{view.params.forceFaultStatus},\"#006400\")", "type": "expression" }, { - "fallback": "#00A700", + "fallback": "#006400", "inputType": "scalar", "mappings": [ + { + "input": 0, + "output": "#C2C2C2" + }, + { + "input": 1, + "output": "#FF0000" + }, { "input": 2, - "output": "#41E841" + "output": "#FFA500" + }, + { + "input": 3, + "output": "#0008FF" }, { "input": 4, - "output": "#41E841" + "output": "#00FF00" + }, + { + "input": 5, + "output": "#FFF700" + }, + { + "input": 6, + "output": "#87CEEB" + }, + { + "input": 7, + "output": "#90EE90" + }, + { + "input": 8, + "output": "#964B00" + }, + { + "input": 9, + "output": "#FFFFFF" + }, + { + "input": 10, + "output": "#000000" + }, + { + "input": 11, + "output": "#8B0000" + }, + { + "input": 12, + "output": "#808080" + }, + { + "input": 13, + "output": "#8B8000" + }, + { + "input": 14, + "output": "#006400" + }, + { + "input": 15, + "output": "#FFFFC5" + }, + { + "input": 16, + "output": "#00008B" + }, + { + "input": 17, + "output": "#FF7276" + }, + { + "input": 18, + "output": "#556B2F" + }, + { + "input": 19, + "output": "#B43434" + }, + { + "input": 20, + "output": "#4682B4" + }, + { + "input": 21, + "output": "#FFD700" } ], "outputType": "color", @@ -206,7 +286,7 @@ "0": "{view.params.value.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Stop_PB" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stop_PB" }, "transforms": [ { @@ -318,27 +398,107 @@ "fallbackDelay": 2.5, "mode": "indirect", "references": { - "0": "{view.params.value.tagProps[0]}", + "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Motor_Fault_Reset_PB_STATE" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Motor_Fault_Reset_PB_Color" }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},{view.params.forceFaultStatus},\"#FFF700\")", "type": "expression" }, { - "fallback": "#DCDC03", + "fallback": "#FFF700", "inputType": "scalar", "mappings": [ + { + "input": 0, + "output": "#C2C2C2" + }, + { + "input": 1, + "output": "#FF0000" + }, { "input": 2, - "output": "#FCFF86" + "output": "#FFA500" + }, + { + "input": 3, + "output": "#0008FF" }, { "input": 4, - "output": "#FCFF86" + "output": "#00FF00" + }, + { + "input": 5, + "output": "#FFF700" + }, + { + "input": 6, + "output": "#87CEEB" + }, + { + "input": 7, + "output": "#90EE90" + }, + { + "input": 8, + "output": "#964B00" + }, + { + "input": 9, + "output": "#FFFFFF" + }, + { + "input": 10, + "output": "#000000" + }, + { + "input": 11, + "output": "#8B0000" + }, + { + "input": 12, + "output": "#808080" + }, + { + "input": 13, + "output": "#8B8000" + }, + { + "input": 14, + "output": "#006400" + }, + { + "input": 15, + "output": "#FFFFC5" + }, + { + "input": 16, + "output": "#00008B" + }, + { + "input": 17, + "output": "#FF7276" + }, + { + "input": 18, + "output": "#556B2F" + }, + { + "input": 19, + "output": "#B43434" + }, + { + "input": 20, + "output": "#4682B4" + }, + { + "input": 21, + "output": "#FFD700" } ], "outputType": "color", @@ -437,27 +597,107 @@ "fallbackDelay": 2.5, "mode": "indirect", "references": { - "0": "{view.params.value.tagProps[0]}", + "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Power_Branch_Fault_Reset_PB_STATE" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Power_Branch_Fault_Reset_PB_Color" }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},{view.params.forceFaultStatus},\"#FFF700\")", "type": "expression" }, { - "fallback": "#DCDC03", + "fallback": "#FFF700", "inputType": "scalar", "mappings": [ + { + "input": 0, + "output": "#C2C2C2" + }, + { + "input": 1, + "output": "#FF0000" + }, { "input": 2, - "output": "#FCFF86" + "output": "#FFA500" + }, + { + "input": 3, + "output": "#0008FF" }, { "input": 4, - "output": "#FCFF86" + "output": "#00FF00" + }, + { + "input": 5, + "output": "#FFF700" + }, + { + "input": 6, + "output": "#87CEEB" + }, + { + "input": 7, + "output": "#90EE90" + }, + { + "input": 8, + "output": "#964B00" + }, + { + "input": 9, + "output": "#FFFFFF" + }, + { + "input": 10, + "output": "#000000" + }, + { + "input": 11, + "output": "#8B0000" + }, + { + "input": 12, + "output": "#808080" + }, + { + "input": 13, + "output": "#8B8000" + }, + { + "input": 14, + "output": "#006400" + }, + { + "input": 15, + "output": "#FFFFC5" + }, + { + "input": 16, + "output": "#00008B" + }, + { + "input": 17, + "output": "#FF7276" + }, + { + "input": 18, + "output": "#556B2F" + }, + { + "input": 19, + "output": "#B43434" + }, + { + "input": 20, + "output": "#4682B4" + }, + { + "input": 21, + "output": "#FFD700" } ], "outputType": "color", @@ -556,27 +796,107 @@ "fallbackDelay": 2.5, "mode": "indirect", "references": { - "0": "{view.params.value.tagProps[0]}", + "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Low_Air_Pressure_Reset_PB_STATE" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Low_Air_Pressure_Reset_PB_Color" }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},{view.params.forceFaultStatus},\"#00008B\")", "type": "expression" }, { - "fallback": "#0A0AA4", + "fallback": "#00008B", "inputType": "scalar", "mappings": [ + { + "input": 0, + "output": "#C2C2C2" + }, + { + "input": 1, + "output": "#FF0000" + }, { "input": 2, - "output": "#5D5DFF" + "output": "#FFA500" + }, + { + "input": 3, + "output": "#0008FF" }, { "input": 4, - "output": "#5D5DFF" + "output": "#00FF00" + }, + { + "input": 5, + "output": "#FFF700" + }, + { + "input": 6, + "output": "#87CEEB" + }, + { + "input": 7, + "output": "#90EE90" + }, + { + "input": 8, + "output": "#964B00" + }, + { + "input": 9, + "output": "#FFFFFF" + }, + { + "input": 10, + "output": "#000000" + }, + { + "input": 11, + "output": "#8B0000" + }, + { + "input": 12, + "output": "#808080" + }, + { + "input": 13, + "output": "#8B8000" + }, + { + "input": 14, + "output": "#006400" + }, + { + "input": 15, + "output": "#FFFFC5" + }, + { + "input": 16, + "output": "#00008B" + }, + { + "input": 17, + "output": "#FF7276" + }, + { + "input": 18, + "output": "#556B2F" + }, + { + "input": 19, + "output": "#B43434" + }, + { + "input": 20, + "output": "#4682B4" + }, + { + "input": 21, + "output": "#FFD700" } ], "outputType": "color", @@ -675,27 +995,107 @@ "fallbackDelay": 2.5, "mode": "indirect", "references": { - "0": "{view.params.value.tagProps[0]}", + "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Jam_Restart_PB_STATE" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Jam_Restart_PB_Color" }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},{view.params.forceFaultStatus},\"#C2C2C2\")", "type": "expression" }, { - "fallback": "#D4D4D4", + "fallback": "#C2C2C2", "inputType": "scalar", "mappings": [ { - "input": 4, - "output": "#FFFFFF" + "input": 0, + "output": "#C2C2C2" + }, + { + "input": 1, + "output": "#FF0000" }, { "input": 2, + "output": "#FFA500" + }, + { + "input": 3, + "output": "#0008FF" + }, + { + "input": 4, + "output": "#00FF00" + }, + { + "input": 5, + "output": "#FFF700" + }, + { + "input": 6, + "output": "#87CEEB" + }, + { + "input": 7, + "output": "#90EE90" + }, + { + "input": 8, + "output": "#964B00" + }, + { + "input": 9, "output": "#FFFFFF" + }, + { + "input": 10, + "output": "#000000" + }, + { + "input": 11, + "output": "#8B0000" + }, + { + "input": 12, + "output": "#808080" + }, + { + "input": 13, + "output": "#8B8000" + }, + { + "input": 14, + "output": "#006400" + }, + { + "input": 15, + "output": "#FFFFC5" + }, + { + "input": 16, + "output": "#00008B" + }, + { + "input": 17, + "output": "#FF7276" + }, + { + "input": 18, + "output": "#556B2F" + }, + { + "input": 19, + "output": "#B43434" + }, + { + "input": 20, + "output": "#4682B4" + }, + { + "input": 21, + "output": "#FFD700" } ], "outputType": "color", @@ -797,7 +1197,7 @@ "0": "{view.params.value.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/{0}/{0}/Setup_Motor_Speeds" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Setup_Motor_Speeds" }, "transforms": [ { diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json index 5e0ef42..0d576a9 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Controller-Views/ControllerStatus/view.json @@ -58,45 +58,6 @@ } }, "type": "ia.display.label" - }, - { - "meta": { - "name": "JAM", - "tooltip": { - "enabled": true, - "text": "Jams" - } - }, - "position": { - "basis": "24px", - "shrink": 0 - }, - "props": { - "path": "Symbol-Views/Equipment-Views/JAM", - "style": { - "marginRight": "5px" - } - }, - "type": "ia.display.view" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px", - "grow": 1 - }, - "props": { - "style": { - "marginRight": "10px" - }, - "text": 0, - "textStyle": { - "textAlign": "end" - } - }, - "type": "ia.display.label" } ], "meta": { @@ -428,7 +389,7 @@ "basis": "32px" }, "props": { - "text": 0, + "text": 2, "textStyle": { "fontSize": 10, "textAlign": "center" @@ -544,7 +505,7 @@ "basis": "32px" }, "props": { - "text": 0, + "text": 2, "textStyle": { "fontSize": 10, "textAlign": "center" @@ -610,7 +571,7 @@ "counts": { "Critical": 0, "Diagnostic": 0, - "High": 0, + "High": 2, "Low": 0, "Medium": 0 } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql index 7538ec6..56c445e 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetActiveAlarms/query.sql @@ -7,7 +7,7 @@ SELECT 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, + CONCAT(REPLACE(Active.displaypath, '_', '-'), ' ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, CASE Active.priority WHEN 0 THEN 'Diagnostic' WHEN 1 THEN 'Low' @@ -18,7 +18,7 @@ SELECT END AS Priority, CONCAT( Active.displaypath, - '.HMI.', + '.HMI.Alarm.', SUBSTRING_INDEX(aed.strValue, '/', -1) ) AS Tag, SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location, 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 aaea1b4..65accd1 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/query.sql @@ -9,7 +9,7 @@ SELECT LPAD(Active.duration_seconds % 60, 2, '0') ) AS Duration, - CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, + CONCAT(REPLACE(Active.displaypath, '_', '-'), ' ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, CASE Active.priority WHEN 0 THEN 'Diagnostic' @@ -22,7 +22,7 @@ SELECT CONCAT( Active.displaypath, - '.HMI.', + '.HMI.Alarm.', SUBSTRING_INDEX(aed.strValue, '/', -1) ) AS Tag, diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/resource.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/resource.json index 0e2de6e..9e1904c 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/resource.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarms/resource.json @@ -18,7 +18,7 @@ "cacheEnabled": false, "database": "MariaDB", "fallbackEnabled": false, - "lastModificationSignature": "4a441ffeae19cedc080c1a5d9560ddbc112dbe2f0b5b62cc56c4b751ba613665", + "lastModificationSignature": "9b2e813ab5770f22d3565e07d85c5c5a7dfb85f0f10fe709999ea953c7ca9ec3", "permissions": [ { "zone": "default", @@ -27,7 +27,7 @@ ], "lastModification": { "actor": "admin", - "timestamp": "2025-08-04T14:02:46Z" + "timestamp": "2025-09-08T13:03:49Z" } } } \ No newline at end of file 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 e4db936..a6b8936 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/named-query/GetAlarmsWithCount/query.sql @@ -1,11 +1,11 @@ SELECT - CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, + CONCAT(REPLACE(Active.displaypath, '_', '-'), ' ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description, SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location, CONCAT( Active.displaypath, - '.HMI.', + '.HMI.Alarm.', SUBSTRING_INDEX(aed.strValue, '/', -1) ) AS Tag,