added docked view for the jr buttons

This commit is contained in:
Salijoghli 2025-09-02 16:30:51 +04:00
parent 99399c5a27
commit 86b9238431
4 changed files with 949 additions and 0 deletions

View File

@ -347,6 +347,22 @@
"viewPath": "autStand/Docked_Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-BTN",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button"
}
],
"top": [
{
"anchor": "fixed",
@ -401,6 +417,22 @@
"viewPath": "autStand/Docked_Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-BTN",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button"
}
],
"top": [
{
"anchor": "fixed",

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-09-02T12:21:23Z"
},
"lastModificationSignature": "40213ff1b964a48fef171fd7ac9f5a53ea307d8857055b1bf72d4616cbb6d767"
}
}

View File

@ -0,0 +1,900 @@
{
"custom": {
"PLC_list": [
"MCM01",
"MCM02"
],
"color": "#C2C2C2",
"type": "UNKNOWN"
},
"params": {
"tagProps": [
"System/MCM02/Chute/NC/S03_103CH",
"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.color": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}",
"type": "{view.custom.type}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{type}/Color"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": "#000000",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "#C2C2C2"
},
{
"input": 1,
"output": "#FF0000"
},
{
"input": 2,
"output": "#FFA500"
},
{
"input": 3,
"output": "#0008FF"
},
{
"input": 4,
"output": "#00FF00"
},
{
"input": 5,
"output": "#FFF700"
},
{
"input": 6,
"output": "#87CEEB"
},
{
"input": 7,
"output": "#90EE90"
},
{
"input": 8,
"output": "#964B00"
},
{
"input": 9,
"output": "#FFFFFF"
},
{
"input": 10,
"output": "#000000"
},
{
"input": 11,
"output": "#8B0000"
},
{
"input": 12,
"output": "#808080"
},
{
"input": 13,
"output": "#8B8000"
},
{
"input": 14,
"output": "#006400"
},
{
"input": 15,
"output": "#FFFFC5"
},
{
"input": 16,
"output": "#00008B"
},
{
"input": 17,
"output": "#FF7276"
},
{
"input": 18,
"output": "#556B2F"
},
{
"input": 19,
"output": "#B43434"
},
{
"input": 20,
"output": "#4682B4"
},
{
"input": 21,
"output": "#FFD700"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.type": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 5,
"output": "Chute_JR"
},
{
"input": 4,
"output": "GS"
},
{
"input": 3,
"output": "PR"
},
{
"input": 2,
"output": "Start"
},
{
"input": 1,
"output": "JR"
},
{
"input": 6,
"output": "Enable"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"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": "BUTTON LIGHT"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "PB_Light"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.color"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
},
"textStyle": {
"color": "#C2C2C2"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Name"
},
"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])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/JR_PB\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\n\ttag_path3 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB\"\n\tsystem.tag.writeBlocking([tag_path3],[True])\n\ttag_path4 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Enable_Chute_PB\"\n\tsystem.tag.writeBlocking([tag_path4],[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.image.icon.color": {
"binding": {
"config": {
"path": "view.custom.type"
},
"transforms": [
{
"fallback": "#000000",
"inputType": "scalar",
"mappings": [
{
"input": "Start",
"output": "#FFFFFF"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
},
"props.image.icon.path": {
"binding": {
"config": {
"path": "view.custom.type"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": "PR",
"output": "material/not_started"
},
{
"input": "Start",
"output": "material/not_started"
},
{
"input": "JR",
"output": "material/sync_problem"
},
{
"input": "GS",
"output": "material/not_started"
},
{
"input": "Chute_JR",
"output": "material/sync_problem"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.color"
},
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.custom.type"
},
"transforms": [
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": "PR",
"output": "ENABLE"
},
{
"input": "Start",
"output": "START"
},
{
"input": "JR",
"output": "JAM RESET"
},
{
"input": "GS",
"output": "GAYLORD START"
},
{
"input": "Chute_JR",
"output": "CHUTE JAM RESET"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.textStyle.color": {
"binding": {
"config": {
"path": "view.custom.type"
},
"transforms": [
{
"fallback": "#000000",
"inputType": "scalar",
"mappings": [
{
"input": "Start",
"output": "#FFFFFF"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"image": {
"icon": {}
},
"style": {
"classes": "Background-Styles/Controller"
}
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Reset Jam"
},
"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_tab"
},
"position": {
"tabIndex": 2
},
"props": {
"direction": "column",
"style": {
"paddingTop": 1
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "tabs"
},
"position": {
"grow": 1
},
"propConfig": {
"props.tabs": {
"binding": {
"config": {
"path": "view.custom.type"
},
"transforms": [
{
"code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d \"PR\" or value \u003d\u003d \"Enable\":\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"currentTabIndex": 2,
"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
}
}
},
"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"
}
}