Merge pull request 'MTN6-6' (#154) from beka-4 into main

Reviewed-on: #154
This commit is contained in:
gigi.mamaladze 2025-07-02 12:17:45 +00:00
commit 37102f2d68
11 changed files with 734 additions and 252 deletions

View File

@ -259,6 +259,20 @@
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-MCM"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-BTN",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button"
}
],
"top": [

View File

@ -4951,7 +4951,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011055_GS1",
"/System/D2C/D2C_Chute_2",
"value",
"value",
"value",
@ -4987,7 +4987,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011053_GS1",
"/System/D2C/D2C_Chute_3",
"value",
"value",
"value",
@ -5023,7 +5023,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011051_GS1",
"/System/D2C/D2C_Chute_4",
"value",
"value",
"value",
@ -6353,7 +6353,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011056_PR1",
"/System/Chute/Chute_1",
"value",
"value",
"value",
@ -6389,7 +6389,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011054_PR1",
"System/Chute/Chute_2",
"value",
"value",
"value",
@ -6425,7 +6425,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011052_PR1",
"System/Chute/Chute_3",
"value",
"value",
"value",
@ -6461,7 +6461,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011050_PR1",
"System/Chute/Chute_4",
"value",
"value",
"value",
@ -13344,7 +13344,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Estop/S011057_GS1",
"/System/D2C/D2C_Chute_1",
"value",
"value",
"value",

View File

@ -189,6 +189,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-BTN",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button"
}
],
"top": [

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-07-02T11:48:18Z"
},
"lastModificationSignature": "de5bb9c72bf05ead61e866f16594f8e0422107f2e41098cad56320fdd7ff0b8d"
}
}

View File

@ -0,0 +1,651 @@
{
"custom": {
"PLC_list": [
"MCM01",
"MCM02",
"MCM03",
"MCM04",
"MCM05",
"MCM06",
"MCM07"
],
"running_state": -1,
"state": 0,
"views_data": []
},
"params": {
"tagProps": [
"/System/Station/Buttons/UL1_3_JR_PB2",
"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-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}/Alarm/Pressed"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "ON"
},
{
"input": 0,
"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"
}
],
"meta": {
"name": "tabs"
},
"position": {
"grow": 1
},
"props": {
"currentTabIndex": 1,
"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"
]
},
"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"
}
}

View File

@ -15,7 +15,7 @@
},
"params": {
"tagProps": [
"/System/Station/JR/UL1_3_JR_PB1",
"System/MCM01/Station/JR/S011050_JR1",
"value",
"value",
"value",
@ -580,7 +580,7 @@
"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])"
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/JR_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
},
"scope": "G",
"type": "script"
@ -606,7 +606,7 @@
"props.style.backgroundColor": {
"binding": {
"config": {
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#B17B50\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET PRESSED\",\r\n \"#FFB988\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET\",\r\n \"#FE9240\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#B17B50\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET PRESSED\",\r\n \"#FE9240\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET\",\r\n \"#EB6700\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}

View File

@ -2245,7 +2245,7 @@
"props.style.backgroundColor": {
"binding": {
"config": {
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#7DB17D\",\r\n if(\r\n {this.props.text} \u003d \"STARTED\",\r\n \"#009400\",\r\n if(\r\n {this.props.text} \u003d \"START\",\r\n \"#00D900\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#7DB17D\",\r\n if(\r\n {this.props.text} \u003d \"STARTED\",\r\n \"#41E841\",\r\n if(\r\n {this.props.text} \u003d \"START\",\r\n \"#00A700\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}
@ -2347,7 +2347,7 @@
"props.style.backgroundColor": {
"binding": {
"config": {
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"STOP PRESSED\",\r\n \"#FF9191\",\r\n if(\r\n {this.props.text} \u003d \"STOP\",\r\n \"#FF0000\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"STOP PRESSED\",\r\n \"#FF0000\",\r\n if(\r\n {this.props.text} \u003d \"STOP\",\r\n \"#CA0D0D\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}
@ -2759,7 +2759,7 @@
"props.style.backgroundColor": {
"binding": {
"config": {
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESTART PRESSED\",\r\n \"#DADADA\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESTART\",\r\n \"#FFFFFF\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESTART PRESSED\",\r\n \"#FFFFFF\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESTART\",\r\n \"#D4D4D4\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}
@ -2861,7 +2861,7 @@
"props.style.backgroundColor": {
"binding": {
"config": {
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {this.props.text} \u003d \"SETUP MOTOR SPEEDS PRESSED\",\r\n \"#DADADA\",\r\n if(\r\n {this.props.text} \u003d \"SETUP MOTOR SPEEDS\",\r\n \"#FFFFFF\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
"expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {this.props.text} \u003d \"SETUP MOTOR SPEEDS PRESSED\",\r\n \"#FFFFFF\",\r\n if(\r\n {this.props.text} \u003d \"SETUP MOTOR SPEEDS\",\r\n \"#D4D4D4\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}

View File

@ -1548,7 +1548,7 @@
"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+\"/Enable_Chute_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\t"
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Enable_Chute_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\t"
},
"scope": "G",
"type": "script"

View File

@ -10,7 +10,7 @@
"MCM07"
],
"running_state": -1,
"state": null,
"state": 0,
"views_data": []
},
"params": {
@ -1813,6 +1813,10 @@
{
"expression": "if(\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || \r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0,\r\n {value},\r\n false\r\n)\r\n",
"type": "expression"
},
{
"expression": "if(isNull({value}), false, {value})",
"type": "expression"
}
],
"type": "tag"

View File

@ -1,21 +1,15 @@
{
"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",
"priority_string": "Unknown",
"searchId": "PLC01",
"state": 5,
"status": 0,
"visible_status": false
"state": 0,
"state_string": "Normal"
},
"params": {
"color": 1,
"forceFaultStatus": null,
"tagProps": [
"value",
@ -34,35 +28,20 @@
"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_running},\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_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\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}/Alarm/Pressed"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"expression": "!isGood({value})",
"type": "expression"
}
],
@ -70,39 +49,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": {
@ -130,7 +76,7 @@
"mappings": [
{
"input": 1,
"output": 4
"output": 1
}
],
"outputType": "scalar",
@ -144,7 +90,7 @@
"custom.priority_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
"expression": "case({view.custom.state},\r\n1, \"Low\",\r\n\"Unknown\")"
},
"type": "expr"
},
@ -168,44 +114,7 @@
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 4
},
{
"input": 0,
"output": 5
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.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"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Pressed"
},
"transforms": [
{
@ -217,19 +126,15 @@
},
"persistent": true
},
"custom.visible_status": {
"custom.state_string": {
"binding": {
"config": {
"expression": "{view.custom.state} !\u003d 5"
"expression": "case({view.custom.state},\r\n1, \"Package Release Pressed\",\r\n0, \"Normal\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.color": {
"paramDirection": "input",
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
@ -259,86 +164,18 @@
"props.elements[0].fill.paint": {
"binding": {
"config": {
"expression": "\u0027#B2B2B2\u0027"
"expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#999999\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#D5D5D5\u0027,\r\n if(\r\n {view.custom.state} \u003d 0,\r\n \u0027#D5D5D5\u0027,\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n)\r\n"
},
"transforms": [
{
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
"type": "expression"
}
],
"type": "expr"
}
},
"props.elements[1].fill.paint": {
"binding": {
"config": {
"expression": "if(\r\n {view.params.color} \u003d 1,\r\n if({view.custom.status} \u003d 1, \"#FFFFFF\", \"#D5D5D5\"),\r\nif(\r\n {view.params.color} \u003d 2,\r\n if({view.custom.status} \u003d 1, \"#00FD47\", \"#00CC00\"),\r\n \"#150808\"\r\n))\r\n"
"expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#D5D5D5\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#00D900\u0027,\r\n \u0027#D5D5D5\u0027\r\n )\r\n)\r\n"
},
"type": "expr"
}
},
"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"
}
}
},
"props": {
@ -364,7 +201,6 @@
"type": "path"
}
],
"style": {},
"viewBox": "0 0 20 20"
},
"type": "ia.shapes.svg"
@ -374,7 +210,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-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
@ -403,20 +239,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": {
@ -451,24 +273,10 @@
"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\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_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"
}
@ -480,32 +288,6 @@
},
"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": {