From 02332e2368670c6c0dcc3fb70cb7afe9bf78bb14 Mon Sep 17 00:00:00 2001 From: beka makharadze Date: Tue, 15 Jul 2025 16:42:51 +0400 Subject: [PATCH] MTN6-49 --- .../page-config/config.json | 14 + .../page-config/config.json | 18 + .../views/Simulations/Nav/view.json | 33 +- .../views/Simulations/SS_PB/view.json | 145 +++ .../page-config/config.json | 14 + .../Information-Docked-East-MCM/view.json | 10 +- .../view.json | 894 ++++++++++++++++++ 7 files changed, 1121 insertions(+), 7 deletions(-) create mode 100644 MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/SS_PB/view.json create mode 100644 SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/page-config/config.json b/MTN6_SCADA/com.inductiveautomation.perspective/page-config/config.json index 92b1d23..c9665a2 100644 --- a/MTN6_SCADA/com.inductiveautomation.perspective/page-config/config.json +++ b/MTN6_SCADA/com.inductiveautomation.perspective/page-config/config.json @@ -273,6 +273,20 @@ "size": 400, "viewParams": {}, "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button" + }, + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East-SS-BTN", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 400, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button" } ], "top": [ diff --git a/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json b/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json index 271e7ca..182d9f5 100644 --- a/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json +++ b/MTN6_Simulation/com.inductiveautomation.perspective/page-config/config.json @@ -52,6 +52,10 @@ "/Real-Time": { "viewPath": "Alarm-Views/RealTime" }, + "/SS_PB": { + "title": "", + "viewPath": "Simulations/SS_PB" + }, "/Station_EPC": { "title": "", "viewPath": "Simulations/Station_EPC" @@ -213,6 +217,20 @@ "size": 400, "viewParams": {}, "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo" + }, + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East-SS-BTN", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 400, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button" } ], "top": [ 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 e68fecc..0993459 100644 --- a/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Nav/view.json +++ b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/Nav/view.json @@ -159,7 +159,7 @@ "dom": { "onClick": { "config": { - "page": "/Extendo" + "page": "/SS_PB" }, "scope": "C", "type": "nav" @@ -175,7 +175,36 @@ "anchor": "100% -106%" }, "width": 0.1187, - "x": 0.4282, + "x": 0.5287, + "y": 0.3839 + }, + "props": { + "text": "Start/Stop" + }, + "type": "ia.input.button" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "page": "/Extendo" + }, + "scope": "C", + "type": "nav" + } + } + }, + "meta": { + "name": "Button_5" + }, + "position": { + "height": 0.1313, + "rotate": { + "anchor": "100% -106%" + }, + "width": 0.1187, + "x": 0.3313, "y": 0.3858 }, "props": { diff --git a/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/SS_PB/view.json b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/SS_PB/view.json new file mode 100644 index 0000000..d633dc3 --- /dev/null +++ b/MTN6_Simulation/com.inductiveautomation.perspective/views/Simulations/SS_PB/view.json @@ -0,0 +1,145 @@ +{ + "custom": {}, + "params": {}, + "props": { + "defaultSize": { + "height": 1080, + "width": 1920 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "Image" + }, + "position": { + "height": 1, + "width": 1 + }, + "propConfig": { + "props.source": { + "binding": { + "config": { + "expression": "\"http://127.0.0.1:5500/VFD.svg?var\" + toMillis(now(1000))" + }, + "type": "expr" + } + } + }, + "props": { + "fit": { + "mode": "fill" + } + }, + "type": "ia.display.image" + }, + { + "meta": { + "name": "SS_PB1" + }, + "position": { + "height": 0.0907, + "width": 0.1271, + "x": 0.0639, + "y": 0.6156 + }, + "props": { + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "System/MCM01/Station/SSPB/SS_PB1", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/SS_Button" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "SS_PB2" + }, + "position": { + "height": 0.0907, + "width": 0.1271, + "x": 0.0639, + "y": 0.261 + }, + "props": { + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "System/MCM01/Station/SSPB/SS_PB2", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/SS_Button" + }, + "type": "ia.display.view" + }, + { + "meta": { + "name": "UL1_3_VFD1" + }, + "position": { + "height": 0.2083, + "width": 0.1255, + "x": 0.4296, + "y": 0.3797 + }, + "props": { + "params": { + "directionLeft": false, + "forceFaultStatus": null, + "forceRunningStatus": null, + "tagProps": [ + "/System/Conveyor/UL1_3_VFD1", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "path": "Symbol-Views/Equipment-Views/Status" + }, + "type": "ia.display.view" + } + ], + "meta": { + "name": "root" + }, + "props": { + "mode": "percent", + "style": { + "backgroundColor": "#FFFFFF" + } + }, + "type": "ia.container.coord" + } +} \ No newline at end of file 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 bf40544..ba13a57 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 @@ -203,6 +203,20 @@ "size": 400, "viewParams": {}, "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button" + }, + { + "anchor": "fixed", + "autoBreakpoint": 480, + "content": "cover", + "handle": "hide", + "iconUrl": "", + "id": "Docked-East-SS-BTN", + "modal": false, + "resizable": false, + "show": "onDemand", + "size": 400, + "viewParams": {}, + "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button" } ], "top": [ diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json index 5d3f440..6c20759 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json @@ -2459,7 +2459,7 @@ "type": "expression" }, { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BCBC52\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FCFF86\",\r\n if(\r\n {value},\r\n \"#DCDC03\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n", + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BCBC52\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FCFF86\",\r\n if(\r\n {value},\r\n \"#DCDC03\",\r\n \"#BCBC52\"\r\n )\r\n )\r\n)\r\n", "type": "expression" } ], @@ -2546,7 +2546,7 @@ "type": "expression" }, { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BCBC52\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FCFF86\",\r\n if(\r\n {value},\r\n \"#DCDC03\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n", + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BCBC52\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FCFF86\",\r\n if(\r\n {value},\r\n \"#DCDC03\",\r\n \"#BCBC52\"\r\n )\r\n )\r\n)\r\n", "type": "expression" } ], @@ -2633,7 +2633,7 @@ "type": "expression" }, { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#9090C2\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#5D5DFF\",\r\n if(\r\n {value},\r\n \"#0A0AA4\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n", + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#9090C2\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#5D5DFF\",\r\n if(\r\n {value},\r\n \"#0A0AA4\",\r\n \"#9090C2\"\r\n )\r\n )\r\n)\r\n", "type": "expression" } ], @@ -2716,7 +2716,7 @@ "type": "expression" }, { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FFFFFF\",\r\n if(\r\n {value},\r\n \"#D4D4D4\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)", + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 2 || {value} \u003d 4,\r\n \"#FFFFFF\",\r\n if(\r\n {value},\r\n \"#D4D4D4\",\r\n \"#A1A1A1\"\r\n )\r\n )\r\n)", "type": "expression" } ], @@ -2803,7 +2803,7 @@ "type": "expression" }, { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 1,\r\n \"#FFFFFF\",\r\n \"#D4D4D4\"\r\n )\r\n)\r\n", + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 1,\r\n \"#FFFFFF\",\r\n \"#A1A1A1\"\r\n )\r\n)\r\n", "type": "expression" } ], diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json new file mode 100644 index 0000000..5999dcf --- /dev/null +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button/view.json @@ -0,0 +1,894 @@ +{ + "custom": { + "PLC_list": [ + "MCM01", + "MCM02", + "MCM03", + "MCM04", + "MCM05", + "MCM06", + "MCM07" + ], + "running_state": -1, + "state": 0, + "views_data": [] + }, + "params": { + "tagProps": [ + "System/MCM01/Station/SSPB/SS_PB1", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.PLC_list": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + }, + "transforms": [ + { + "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", + "type": "script" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.running_state": { + "binding": { + "config": { + "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" + }, + "transforms": [ + { + "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", + "type": "expression" + } + ], + "type": "expr" + }, + "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 + }, + "custom.views_data": { + "binding": { + "config": { + "struct": { + "equipment_id": "{view.params.tagProps[0]}" + }, + "waitOnAll": true + }, + "transforms": [ + { + "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", + "type": "script" + } + ], + "type": "expr-struct" + }, + "persistent": true + }, + "params.tagProps": { + "paramDirection": "input", + "persistent": true + } + }, + "props": { + "defaultSize": { + "width": 400 + } + }, + "root": { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" + }, + "type": "expr" + } + } + }, + "props": { + "style": { + "color": "#FFFF", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + }, + { + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.closeDock(\u0027Docked-East-SS-BTN\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Icon", + "tooltip": { + "enabled": true, + "style": { + "cursor": "pointer" + }, + "text": "Close faceplate" + } + }, + "props": { + "path": "material/close", + "style": { + "cursor": "pointer", + "marginBottom": 5, + "marginLeft": 5, + "marginRight": 5, + "marginTop": 5 + } + }, + "type": "ia.display.icon" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "30px", + "shrink": 0 + }, + "props": { + "style": { + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "Label" + }, + "position": { + "basis": "32px", + "display": false + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" + }, + "enabled": false, + "type": "expr" + } + } + }, + "props": { + "style": { + "classes": "Labels/Label_1", + "marginTop": 20 + }, + "text": "No Active Alarms" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "AlarmStatusTable" + }, + "position": { + "basis": "400px", + "grow": 1 + }, + "propConfig": { + "props.filters.active.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "code": "\treturn value[1:]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "columns": { + "active": { + "displayPath": { + "enabled": false + }, + "priority": { + "enabled": false + }, + "source": { + "enabled": false + }, + "state": { + "enabled": false + } + } + }, + "filters": { + "active": { + "priorities": { + "critical": false, + "high": false, + "low": false, + "medium": false + }, + "states": { + "clearUnacked": false + } + } + }, + "refreshRate": 500, + "toolbar": { + "enabled": false + } + }, + "type": "ia.display.alarmstatustable" + } + ], + "meta": { + "name": "Active_tab" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "meta": { + "name": "NameField" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "props": { + "style": { + "paddingLeft": 20 + }, + "text": "NAME" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "DeviceName" + }, + "position": { + "basis": "50%", + "grow": 1 + }, + "propConfig": { + "props.text": { + "binding": { + "config": { + "path": "view.params.tagProps[0]" + }, + "transforms": [ + { + "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", + "type": "script" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "backgroundColor": "#FFFFFF", + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Name" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "overflow": "hidden" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "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": "LIGHT" + }, + "type": "ia.display.label" + }, + { + "meta": { + "name": "PB_Light" + }, + "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}/STATE" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", + "type": "expression" + }, + { + "fallback": "UNKNOWN", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "ON" + }, + { + "input": 0, + "output": "ON" + }, + { + "input": 2, + "output": "OFF" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + }, + "props.textStyle.color": { + "binding": { + "config": { + "path": "this.props.text" + }, + "transforms": [ + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": "ON", + "output": "#47FF47" + }, + { + "input": "OFF", + "output": "#FF0000" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "style": { + "classes": "Text-Styles/Ariel-Bold-12pt", + "paddingLeft": 10 + } + }, + "type": "ia.display.label" + } + ], + "meta": { + "name": "Property" + }, + "position": { + "basis": "35px", + "shrink": 2 + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "35px" + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Info_tab" + }, + "position": { + "tabIndex": 1 + }, + "props": { + "direction": "column", + "style": { + "margin-left": "" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "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.style.backgroundColor": { + "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({this.props.enabled} \u003d false, 3, coalesce({value}, {view.params.forceFaultStatus}, 0))\r\n", + "type": "expression" + }, + { + "fallback": "#00A700", + "inputType": "scalar", + "mappings": [ + { + "input": 2, + "output": "#00A700" + }, + { + "input": 1, + "output": "#41E841" + }, + { + "input": 0, + "output": "#41E841" + }, + { + "input": 3, + "output": "#7DB17D" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/not_started" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "START" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Start" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "padding": "" + } + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "events": { + "component": { + "onActionPerformed": { + "config": { + "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Stop_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "Button" + }, + "position": { + "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.style.backgroundColor": { + "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({this.props.enabled} \u003d false, 3, coalesce({value}, {view.params.forceFaultStatus}, 0))\r\n", + "type": "expression" + }, + { + "fallback": "#CA0D0D", + "inputType": "scalar", + "mappings": [ + { + "input": 2, + "output": "#CA0D0D" + }, + { + "input": 1, + "output": "#CA0D0D" + }, + { + "input": 0, + "output": "#CA0D0D" + }, + { + "input": 3, + "output": "#BB5050" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "image": { + "icon": { + "path": "material/stop_circle" + } + }, + "style": { + "classes": "Background-Styles/Controller" + }, + "text": "STOP" + }, + "type": "ia.input.button" + } + ], + "meta": { + "name": "Stop" + }, + "position": { + "basis": "35px" + }, + "props": { + "style": { + "classes": "PopUp-Styles/InfoLabel", + "padding": "" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer_0" + }, + "position": { + "basis": "100px", + "grow": 1 + }, + "props": { + "direction": "column", + "style": { + "gap": 6, + "paddingBottom": 20, + "paddingLeft": 10, + "paddingRight": 10, + "paddingTop": 13 + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "Commands" + }, + "position": { + "tabIndex": 2 + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "tabs" + }, + "position": { + "grow": 1 + }, + "props": { + "menuType": "modern", + "tabSize": { + "width": 1000 + }, + "tabStyle": { + "active": { + "classes": "", + "color": "#FFFFFF", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 10 + }, + "inactive": { + "classes": "", + "color": "#B8B8B8", + "fontFamily": "Arial", + "fontSize": 14, + "fontWeight": "bold", + "paddingLeft": 10 + } + }, + "tabs": [ + "Alarms", + "Info", + "Commands" + ] + }, + "type": "ia.container.tab" + } + ], + "meta": { + "name": "FlexContainer_1" + }, + "position": { + "basis": "670px", + "grow": 1 + }, + "props": { + "style": { + "border-top": "1px solid white", + "gap": "" + } + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "FlexContainer" + }, + "position": { + "basis": "800px", + "grow": 1 + }, + "props": { + "direction": "column" + }, + "type": "ia.container.flex" + } + ], + "meta": { + "name": "root" + }, + "props": { + "direction": "column", + "style": { + "classes": "Buttons/Button-Menu" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file