From 31d5cdfd219a6ae066fbcf83de3a73ab75c3588e Mon Sep 17 00:00:00 2001 From: "b.makharadze" <81828475+bmidf@users.noreply.github.com> Date: Tue, 10 Jun 2025 11:45:27 +0400 Subject: [PATCH] MTN6-253, MTN6-247 --- .../views/Simulations/Station_JR_PB/view.json | 4 +- .../Information-Docked-East-JR-PB/view.json | 258 +++++------------- 2 files changed, 75 insertions(+), 187 deletions(-) diff --git a/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Station_JR_PB/view.json b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Station_JR_PB/view.json index 3de538f..1475c4d 100644 --- a/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Station_JR_PB/view.json +++ b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Station_JR_PB/view.json @@ -36,7 +36,7 @@ "params": { "forceFaultStatus": null, "tagProps": [ - "/System/Buttons/UL1_3_JR_PB1", + "/System/Station/Buttons/UL1_3_JR_PB1", "value", "value", "value", @@ -66,7 +66,7 @@ "params": { "forceFaultStatus": null, "tagProps": [ - "/System/Buttons/UL1_3_JR_PB2", + "/System/Station/Buttons/UL1_3_JR_PB2", "value", "value", "value", diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json index 4cd1df5..770b683 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json @@ -1,13 +1,21 @@ { "custom": { - "PLC_list": null, + "PLC_list": [ + "MCM01", + "MCM02", + "MCM03", + "MCM04", + "MCM05", + "MCM06", + "MCM07" + ], "running_state": -1, - "state": 5, + "state": 0, "views_data": [] }, "params": { "tagProps": [ - "UL1_3_JR_PB1/HMI", + "/System/Station/Buttons/UL1_3_JR_PB1", "value", "value", "value", @@ -64,7 +72,7 @@ "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" }, "transforms": [ { @@ -75,25 +83,21 @@ "fallback": null, "inputType": "scalar", "mappings": [ - { - "input": 4, - "output": 1 - }, { "input": 3, - "output": 2 - }, - { - "input": 2, "output": 3 }, + { + "input": 2, + "output": 2 + }, { "input": 1, - "output": 4 + "output": 1 }, { "input": 0, - "output": 5 + "output": 0 } ], "outputType": "scalar", @@ -216,164 +220,6 @@ }, "type": "ia.container.flex" }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "200px", - "grow": 1 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "path": "session.custom.command_auth.enabled" - }, - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "\u0027Control Enabled Timeout: \\n\u0027 + ({session.custom.command_auth.timeout_sp} - {session.custom.command_auth.auth_timeout}) + \u0027 seconds\u0027" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#000000", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5, - "whiteSpace": "pre" - }, - "textStyle": { - "textAlign": "center" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif self.session.custom.command_auth.enabled:\n\t\t\tself.session.custom.command_auth.enabled \u003d False\n\telse:\n\t\t#self.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.openPopup(\u0027command-auth\u0027, \u0027PopUp-Views/Command-Authenticate\u0027, showCloseIcon \u003d False, draggable \u003d False, modal \u003d True, overlayDismiss \u003d True)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_0", - "tooltip": { - "enabled": true, - "location": "bottom", - "style": { - "whiteSpace": "pre" - } - } - }, - "position": { - "basis": "170px", - "shrink": 0 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "//if({this.props.enabled}, \u0027Re-Authenticate to Enable Command Controls\u0027, \u0027Insufficient Privileges - User Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)\r\nif({session.custom.command_auth.enabled},\u0027Click to Disable Controls.\u0027, \u0027Re-Authenticate to Enable Command Controls \\nUser Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)" - }, - "type": "expr" - } - }, - "props.image.icon.path": { - "binding": { - "config": { - "expression": "if({session.custom.command_auth.enabled},\u0027material/lock_open\u0027,\u0027material/lock\u0027)" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "if({session.custom.command_auth.enabled},\u0027Disable Controls\u0027,\u0027Enable Controls\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": {} - }, - "primary": false, - "style": { - "marginBottom": 5, - "marginRight": 25, - "marginTop": 5 - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "50px", - "grow": 1 - }, - "props": { - "justify": "center" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "shrink": 0 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\n\tplcList \u003d self.view.custom.PLC_list\n\n\tshowCommand \u003d False\n\n\tfor i in plcList:\n\t\tif value \u003d\u003d i:\n\t\t\tshowCommand \u003d True\n\n\treturn showCommand", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Clear-Background" - } - }, - "type": "ia.container.flex" - }, { "children": [ { @@ -498,7 +344,7 @@ }, "transforms": [ { - "code": "\treturn value[:-4]", + "code": "\treturn value[24:]", "type": "script" } ], @@ -524,7 +370,8 @@ }, "props": { "style": { - "classes": "PopUp-Styles/InfoLabel" + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" } }, "type": "ia.container.flex" @@ -602,22 +449,27 @@ "fallbackDelay": 2.5, "mode": "indirect", "references": { - "0": "{view.params.tagProps[0]}" + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" }, - "tagPath": "[MTN6_SCADA_TAG_PROVIDER]{0}/JR_PB_LT" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Pressed" }, "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, { "fallback": "OFF", "inputType": "scalar", "mappings": [ - { - "input": true, - "output": "ON" - }, { "input": false, "output": "OFF" + }, + { + "input": true, + "output": "ON" } ], "outputType": "scalar", @@ -697,7 +549,10 @@ "tabIndex": 1 }, "props": { - "direction": "column" + "direction": "column", + "style": { + "margin-left": "" + } }, "type": "ia.container.flex" }, @@ -712,7 +567,7 @@ "component": { "onActionPerformed": { "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[MTN6_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.perspective.print(tag_path)\n\tsystem.tag.writeBlocking([tag_path],[True])\n\tsystem.perspective.print(tag_path)\n" + "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Start_PB\"\n\tsystem.perspective.print(tag_path)\n\tsystem.tag.writeBlocking([tag_path],[True])\n\tsystem.perspective.print(tag_path)" }, "scope": "G", "type": "script" @@ -726,8 +581,24 @@ "basis": "80px", "grow": 1 }, + "propConfig": { + "props.enabled": { + "binding": { + "config": { + "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" + }, + "type": "expr" + } + } + }, "props": { + "image": { + "icon": { + "path": "material/sync_problem" + } + }, "style": { + "backgroundColor": "#FE9240", "classes": "Background-Styles/Controller" }, "text": "RESET JAM" @@ -743,7 +614,8 @@ }, "props": { "style": { - "classes": "PopUp-Styles/InfoLabel" + "classes": "PopUp-Styles/InfoLabel", + "padding": "" } }, "type": "ia.container.flex" @@ -757,7 +629,14 @@ "grow": 1 }, "props": { - "direction": "column" + "direction": "column", + "style": { + "gap": 6, + "paddingBottom": 20, + "paddingLeft": 10, + "paddingRight": 10, + "paddingTop": 13 + } }, "type": "ia.container.flex" } @@ -769,7 +648,10 @@ "tabIndex": 2 }, "props": { - "direction": "column" + "direction": "column", + "style": { + "paddingTop": 1 + } }, "type": "ia.container.flex" } @@ -820,6 +702,12 @@ "basis": "670px", "grow": 1 }, + "props": { + "style": { + "border-top": "1px solid white", + "gap": "" + } + }, "type": "ia.container.flex" } ],