From 965a4a1e6691bc54d8ed7db3e0e79d59df3a9d40 Mon Sep 17 00:00:00 2001 From: beka makharadze Date: Tue, 24 Jun 2025 11:18:04 +0400 Subject: [PATCH 1/2] MTN6-263 --- .../Equipment-Views/Extendo/resource.json | 16 + .../Equipment-Views/Extendo/view.json | 296 ++++++++++++++++++ .../ignition/global-props/resource.json | 16 + 3 files changed, 328 insertions(+) create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/resource.json create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/global-props/resource.json diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/resource.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/resource.json new file mode 100644 index 0000000..f4e8df6 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "G", + "version": 1, + "restricted": false, + "overridable": false, + "files": [ + "view.json" + ], + "attributes": { + "lastModification": { + "actor": "admin", + "timestamp": "2025-06-24T07:17:56Z" + }, + "lastModificationSignature": "bdc03d73c8ef5beb8021bd3661948edd869df058d44e67f6e471b9d2e23c3753" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json new file mode 100644 index 0000000..325c040 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/Extendo/view.json @@ -0,0 +1,296 @@ +{ + "custom": { + "disconnected": false, + "plc": "System", + "priority": 0, + "priority_string": 0, + "searchId": "value", + "state": 0, + "state_string": 0 + }, + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "System/D2C/D2C_Chute_1", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.disconnected": { + "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": "!isGood({value})", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.plc": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "expression": "split({value}, \"/\")[0]", + "type": "expression" + } + ], + "type": "property" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "type": "property" + }, + "persistent": true + }, + "custom.priority_string": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "type": "property" + }, + "onChange": { + "enabled": null, + "script": "\tif self.custom.priority not in [1, 2, 3, 4, 5, 6, 0]:\n\t self.custom.priority_string \u003d \"Unknown\"" + }, + "persistent": true + }, + "custom.searchId": { + "binding": { + "config": { + "path": "session.custom.searchId" + }, + "type": "property" + }, + "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": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state_string": { + "binding": { + "config": { + "path": "view.custom.priority" + }, + "type": "property" + }, + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.forceFaultStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.forceRunningStatus": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 20, + "width": 29 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "RunningStatus" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.rotate.angle": { + "binding": { + "config": { + "path": "view.params.directionLeft" + }, + "transforms": [ + { + "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", + "type": "expression" + } + ], + "type": "property" + } + } + }, + "props": { + "elements": [ + { + "d": "M 50 0 L 65 0 L 80 30 L 65 60 L 50 60 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + }, + { + "d": "M 45 0 L 25 0 L 25 30 L 25 60 L 45 60 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + }, + { + "d": "M 0 0 L 20 0 L 20 30 L 20 60 L 0 60 Z", + "fill": { + "paint": "#FFFFFF" + }, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-1.5 -1.5 73 63" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-East-SNP\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "Alarms-Styles/High" + }, + { + "input": 2, + "output": "Alarms-Styles/Medium" + }, + { + "input": 3, + "output": "Alarms-Styles/Low" + }, + { + "input": 4, + "output": "Alarms-Styles/Diagnostic" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n" + }, + "type": "expr" + } + } + }, + "props": { + "justify": "center" + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/global-props/resource.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/global-props/resource.json new file mode 100644 index 0000000..bba1a29 --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/ignition/global-props/resource.json @@ -0,0 +1,16 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "data.bin" + ], + "attributes": { + "lastModification": { + "actor": "admin", + "timestamp": "2025-06-23T09:49:39Z" + }, + "lastModificationSignature": "313b4c5f30285d01036dc81d7a3c917262e8c93b857070932fb364cb7f10f469" + } +} \ No newline at end of file From de67dc9f54266c2783410088e3ddc8d78686eea0 Mon Sep 17 00:00:00 2001 From: beka makharadze Date: Tue, 24 Jun 2025 11:53:52 +0400 Subject: [PATCH 2/2] MTN6-263 --- .../page-config/config.json | 32 +++++++++++++++++++ .../session-props/props.json | 1 + .../views/Simulations/Nav/view.json | 3 +- .../page-config/config.json | 14 ++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json b/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json index 44c75e0..88b3f0c 100644 --- a/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json +++ b/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json @@ -23,6 +23,10 @@ "/Device-manager": { "viewPath": "Main-Views/Device-Manager/DeviceManager" }, + "/Field_Devices": { + "title": "", + "viewPath": "Simulations/Field_Devices" + }, "/Help": { "title": "Help", "viewPath": "Main-Views/Help" @@ -145,6 +149,34 @@ "size": 400, "viewParams": {}, "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-VFD" + }, + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East-DS", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 400, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status" + }, + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East-SNP", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 150, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered" } ], "top": [ diff --git a/MTN6_Simulation/com.inductiveautomation.perspective/session-props/props.json b/MTN6_Simulation/com.inductiveautomation.perspective/session-props/props.json index 969a853..74550a9 100644 --- a/MTN6_Simulation/com.inductiveautomation.perspective/session-props/props.json +++ b/MTN6_Simulation/com.inductiveautomation.perspective/session-props/props.json @@ -3,6 +3,7 @@ "alarm_filter": { "magnificaiton": "x2", "orderby": false, + "show_buttons": true, "show_camera_jams": true, "show_diagnostic": true, "show_fio": true, diff --git a/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Nav/view.json b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Nav/view.json index dd10d8c..ce7a8e8 100644 --- a/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Nav/view.json +++ b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Nav/view.json @@ -100,8 +100,7 @@ "dom": { "onClick": { "config": { - "params": {}, - "view": "Simulations/Field_Devices" + "page": "/Field_Devices" }, "scope": "C", "type": "nav" diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json index 8b7235c..a6cfc9a 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/page-config/config.json @@ -147,6 +147,20 @@ "size": 400, "viewParams": {}, "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered" + }, + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East-DS", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 400, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status" } ], "top": [