From 5d9d450eba80d0e63467ac76281c19d4888c9449 Mon Sep 17 00:00:00 2001 From: beka makharadze Date: Wed, 2 Jul 2025 11:25:35 +0400 Subject: [PATCH] MTN6-7, MTN6-8 --- .../Equipment-Views/ControlCabinet/view.json | 267 +----------------- 1 file changed, 14 insertions(+), 253 deletions(-) diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json index c0e179f..74e35be 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/ControlCabinet/view.json @@ -1,18 +1,13 @@ { "custom": { "alarm_message": null, - "covert_mode": true, - "disconnected": false, - "display_icon": true, - "error": false, - "isMatch": 0, + "disconnected": true, "plc": "value", "priority": 0, "priority_string": "No active alarms", - "running_status": 0, "searchId": "value", - "state": 5, - "state_string": "Unknown" + "state": 0, + "state_string": "Normal" }, "params": { "forceFaultStatus": null, @@ -32,38 +27,20 @@ ] }, "propConfig": { - "custom.alarm_message": { - "persistent": true - }, - "custom.covert_mode": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_gateways},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm}||{session.custom.alarm_filter.show_gateways},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic}||{session.custom.alarm_filter.show_gateways},\r\n\t\t5, {session.custom.alarm_filter.show_gateways},\r\n\t\tFalse)", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, "custom.disconnected": { "binding": { "config": { "fallbackDelay": 2.5, "mode": "indirect", "references": { - "fc": "{session.custom.fc}", - "plc": "{view.custom.plc}" + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" }, "transforms": [ { - "expression": "if(isNull({value}), False, {value})", + "expression": "!isGood({value})", "type": "expression" } ], @@ -71,39 +48,6 @@ }, "persistent": true }, - "custom.display_icon": { - "binding": { - "config": { - "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.error": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.isMatch": { - "binding": { - "config": { - "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" - }, - "type": "expr" - }, - "persistent": true - }, "custom.plc": { "binding": { "config": { @@ -157,33 +101,12 @@ "custom.priority_string": { "binding": { "config": { - "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n0, \"No active alarms\",\r\n\"Unknown\")" }, "type": "expr" }, "persistent": true }, - "custom.running_status": { - "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.forceRunningStatus},0)", - "type": "expression" - } - ], - "type": "tag" - }, - "persistent": true - }, "custom.searchId": { "binding": { "config": { @@ -202,40 +125,12 @@ "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" }, "transforms": [ { "expression": "coalesce({value},{view.params.forceFaultStatus},0)", "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 4, - "output": 1 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 - } - ], - "outputType": "scalar", - "type": "map" } ], "type": "tag" @@ -245,7 +140,7 @@ "custom.state_string": { "binding": { "config": { - "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" + "expression": "case({view.custom.state},\r\n1, \"Communication Faulted\",\r\n0, \"Normal\",\r\n\"Unknown\")" }, "type": "expr" }, @@ -288,80 +183,8 @@ "props.elements[0].fill.paint": { "binding": { "config": { - "path": "view.custom.state" + "expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#808080\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#FF0000\u0027,\r\n if(\r\n {view.custom.state} \u003d 0,\r\n \u0027#00D900\u0027,\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n)\r\n" }, - "transforms": [ - { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", - "type": "expression" - }, - { - "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", - "type": "expression" - } - ], - "type": "property" - } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], "type": "expr" } } @@ -393,7 +216,6 @@ } ], "preserveAspectRatio": "none", - "style": {}, "viewBox": "-0.5 -0.5 62 41" }, "type": "ia.shapes.svg" @@ -403,7 +225,7 @@ "dom": { "onClick": { "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + "script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" }, "scope": "G", "type": "script" @@ -434,20 +256,6 @@ } }, "propConfig": { - "meta.tooltip.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", - "type": "expression" - } - ], - "type": "property" - } - }, "meta.tooltip.style.classes": { "binding": { "config": { @@ -482,67 +290,20 @@ "type": "expr" } }, - "meta.tooltip.style.color": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", - "type": "expression" - } - ], - "type": "property" - } - }, "meta.tooltip.text": { "binding": { "config": { - "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" + "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" } - }, - "meta.visible": { - "binding": { - "config": { - "path": "view.custom.display_icon" - }, - "type": "property" - } - }, - "props.style.classes": { - "binding": { - "config": { - "path": "view.custom.disconnected" - }, - "transforms": [ - { - "fallback": "Disconnects/Device-Connected", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "Disconnects/Device-Disconnected" - }, - { - "input": false, - "output": "Disconnects/Device-Connected" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "property" - } } }, "props": { "aspectRatio": "68:47", "mode": "percent", "style": { + "classes": "Disconnects/Device-Connected", "cursor": "pointer" } },