Merge pull request 'Update PullChord' (#144) from beka-pullchord into main

Reviewed-on: #144
This commit is contained in:
gigi.mamaladze 2025-06-26 15:33:12 +00:00
commit 458a3e1d7e
3 changed files with 48 additions and 453 deletions

View File

@ -1,11 +1,10 @@
{ {
"custom": { "custom": {
"alarm_message": null,
"disconnected": false, "disconnected": false,
"plc": "value", "plc": "System",
"priority": 0, "priority": 0,
"priority_string": "No active alarms", "priority_string": "No active alarms",
"searchId": "PLC01", "searchId": "value",
"state": 0, "state": 0,
"state_string": "Normal" "state_string": "Normal"
}, },
@ -13,7 +12,7 @@
"forceFaultStatus": null, "forceFaultStatus": null,
"forceRunningStatus": null, "forceRunningStatus": null,
"tagProps": [ "tagProps": [
"value", "System/Station/EPC/UL1_3_EPC1",
"value", "value",
"value", "value",
"value", "value",
@ -32,14 +31,14 @@
"fallbackDelay": 2.5, "fallbackDelay": 2.5,
"mode": "indirect", "mode": "indirect",
"references": { "references": {
"fc": "{session.custom.fc}", "0": "{view.params.tagProps[0]}",
"plc": "{view.custom.plc}" "fc": "{session.custom.fc}"
}, },
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
}, },
"transforms": [ "transforms": [
{ {
"expression": "if(isNull({value}), False, {value})", "expression": "!isGood({value})",
"type": "expression" "type": "expression"
} }
], ],
@ -92,16 +91,12 @@
}, },
"transforms": [ "transforms": [
{ {
"fallback": "Unknown", "fallback": "No active alarms",
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{ {
"input": 1, "input": 1,
"output": "High" "output": "High"
},
{
"input": 0,
"output": "No active alarms"
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -136,22 +131,6 @@
{ {
"expression": "coalesce({value},{view.params.forceFaultStatus},0)", "expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression" "type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
} }
], ],
"type": "tag" "type": "tag"
@ -161,7 +140,7 @@
"custom.state_string": { "custom.state_string": {
"binding": { "binding": {
"config": { "config": {
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" "expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
}, },
"type": "expr" "type": "expr"
}, },
@ -202,27 +181,9 @@
"props.elements[0].fill.paint": { "props.elements[0].fill.paint": {
"binding": { "binding": {
"config": { "config": {
"path": "view.custom.state" "expression": "if(\r\n {view.custom.disconnected},\r\n \"#FFFFFF\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#AAAAAA\", \"#AAAAAA\", \r\n \"#FFFF00\"\r\n )\r\n)"
}, },
"transforms": [ "type": "expr"
{
"fallback": "#AC0000",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "#AAAAAA"
},
{
"input": 1,
"output": "#AAAAAA"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
} }
}, },
"props.elements[1].fill.paint": { "props.elements[1].fill.paint": {
@ -242,29 +203,17 @@
"props.elements[2].visibility": { "props.elements[2].visibility": {
"binding": { "binding": {
"config": { "config": {
"path": "view.custom.state" "expression": "if(\r\n {view.custom.state} \u003d 0 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
}, },
"transforms": [ "type": "expr"
{
"expression": "if(\r\n !{value} \u0026\u0026 \r\n {view.custom.state} \u003d 0 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)",
"type": "expression"
}
],
"type": "property"
} }
}, },
"props.elements[3].visibility": { "props.elements[3].visibility": {
"binding": { "binding": {
"config": { "config": {
"path": "view.custom.state" "expression": "if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
}, },
"transforms": [ "type": "expr"
{
"expression": "if(\r\n {value} \u0026\u0026 \r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)",
"type": "expression"
}
],
"type": "property"
} }
} }
}, },
@ -367,20 +316,6 @@
} }
}, },
"propConfig": { "propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": { "meta.tooltip.style.classes": {
"binding": { "binding": {
"config": { "config": {
@ -403,24 +338,10 @@
"type": "expr" "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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": { "meta.tooltip.text": {
"binding": { "binding": {
"config": { "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" "type": "expr"
} }
@ -432,32 +353,6 @@
}, },
"type": "property" "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": { "props": {

View File

@ -4,7 +4,7 @@
"plc": "value", "plc": "value",
"priority": 0, "priority": 0,
"priority_string": "No active alarms", "priority_string": "No active alarms",
"searchId": "PLC01", "searchId": "value",
"state": 0, "state": 0,
"state_string": "Normal" "state_string": "Normal"
}, },
@ -31,14 +31,14 @@
"fallbackDelay": 2.5, "fallbackDelay": 2.5,
"mode": "indirect", "mode": "indirect",
"references": { "references": {
"fc": "{session.custom.fc}", "0": "{view.params.tagProps[0]}",
"plc": "{view.custom.plc}" "fc": "{session.custom.fc}"
}, },
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
}, },
"transforms": [ "transforms": [
{ {
"expression": "if(isNull({value}), False, {value})", "expression": "!isGood({value})",
"type": "expression" "type": "expression"
} }
], ],
@ -68,12 +68,12 @@
}, },
"transforms": [ "transforms": [
{ {
"fallback": 1, "fallback": 0,
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{ {
"input": 0, "input": 1,
"output": 0 "output": 1
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -91,16 +91,12 @@
}, },
"transforms": [ "transforms": [
{ {
"fallback": "Unknown", "fallback": "No active alarms",
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{ {
"input": 1, "input": 1,
"output": "High" "output": "High"
},
{
"input": 0,
"output": "No active alarms"
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -135,22 +131,6 @@
{ {
"expression": "coalesce({value},{view.params.forceFaultStatus},0)", "expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression" "type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
} }
], ],
"type": "tag" "type": "tag"
@ -160,7 +140,7 @@
"custom.state_string": { "custom.state_string": {
"binding": { "binding": {
"config": { "config": {
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" "expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
}, },
"type": "expr" "type": "expr"
}, },
@ -199,88 +179,8 @@
"props.elements[0].fill.paint": { "props.elements[0].fill.paint": {
"binding": { "binding": {
"config": { "config": {
"path": "view.custom.state" "expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#AAAAAA\", \"#FF0000\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
}, },
"transforms": [
{
"fallback": "#AC0000",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "#AAAAAA"
},
{
"input": 1,
"output": "#B79D9D"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})"
},
"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" "type": "expr"
} }
} }
@ -299,7 +199,6 @@
} }
], ],
"preserveAspectRatio": "none", "preserveAspectRatio": "none",
"style": {},
"viewBox": "-0.5 -0.5 27 42" "viewBox": "-0.5 -0.5 27 42"
}, },
"type": "ia.shapes.svg" "type": "ia.shapes.svg"
@ -340,20 +239,6 @@
} }
}, },
"propConfig": { "propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": { "meta.tooltip.style.classes": {
"binding": { "binding": {
"config": { "config": {
@ -376,24 +261,10 @@
"type": "expr" "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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": { "meta.tooltip.text": {
"binding": { "binding": {
"config": { "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" "type": "expr"
} }
@ -405,32 +276,6 @@
}, },
"type": "property" "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": { "props": {

View File

@ -1,11 +1,10 @@
{ {
"custom": { "custom": {
"alarm_message": null, "disconnected": true,
"disconnected": false,
"plc": "value", "plc": "value",
"priority": 0, "priority": 0,
"priority_string": "No active alarms", "priority_string": "No active alarms",
"searchId": "PLC01", "searchId": "value",
"state": 0, "state": 0,
"state_string": "Normal" "state_string": "Normal"
}, },
@ -32,14 +31,14 @@
"fallbackDelay": 2.5, "fallbackDelay": 2.5,
"mode": "indirect", "mode": "indirect",
"references": { "references": {
"fc": "{session.custom.fc}", "0": "{view.params.tagProps[0]}",
"plc": "{view.custom.plc}" "fc": "{session.custom.fc}"
}, },
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
}, },
"transforms": [ "transforms": [
{ {
"expression": "if(isNull({value}), False, {value})", "expression": "!isGood({value})",
"type": "expression" "type": "expression"
} }
], ],
@ -69,12 +68,12 @@
}, },
"transforms": [ "transforms": [
{ {
"fallback": 1, "fallback": 0,
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{ {
"input": 0, "input": 1,
"output": 0 "output": 1
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -92,16 +91,12 @@
}, },
"transforms": [ "transforms": [
{ {
"fallback": "Unknown", "fallback": "No active alarms",
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{ {
"input": 1, "input": 1,
"output": "High" "output": "High"
},
{
"input": 0,
"output": "No active alarms"
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -136,22 +131,6 @@
{ {
"expression": "coalesce({value},{view.params.forceFaultStatus},0)", "expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression" "type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
} }
], ],
"type": "tag" "type": "tag"
@ -161,7 +140,7 @@
"custom.state_string": { "custom.state_string": {
"binding": { "binding": {
"config": { "config": {
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" "expression": "case({view.custom.state},\r\n1, \"Actuated\",\r\n0, \"Normal\",\r\n\"Unknown\")"
}, },
"type": "expr" "type": "expr"
}, },
@ -197,61 +176,15 @@
"width": 1 "width": 1
}, },
"propConfig": { "propConfig": {
"props.elements[0].stroke.paint": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, \r\n \"#00D900\", \"#FF0000\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
},
"type": "expr"
}
},
"props.elements[0].visibility": { "props.elements[0].visibility": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"props.elements[1].visibility": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"props.elements[2].stroke.paint": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": "#800000",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "#FF0000"
},
{
"input": 0,
"output": "#000000"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
},
"props.elements[2].visibility": {
"binding": { "binding": {
"config": { "config": {
"expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)" "expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)"
@ -262,30 +195,6 @@
}, },
"props": { "props": {
"elements": [ "elements": [
{
"d": "m -0.38931298,0.28431365 c 33.95623398,0 67.91246898,0 101.86870298,0",
"fill": {
"paint": "#FFFFFF"
},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
},
{
"d": "m -0.38931298,10.850587 c 33.95623398,0 67.91246898,0 101.86870298,0",
"fill": {
"paint": "#FFFFFF"
},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
},
{ {
"d": "m -0.38931298,5.5674501 c 33.95623398,0 67.91246898,0 101.86870298,0", "d": "m -0.38931298,5.5674501 c 33.95623398,0 67.91246898,0 101.86870298,0",
"fill": { "fill": {
@ -344,20 +253,6 @@
} }
}, },
"propConfig": { "propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": { "meta.tooltip.style.classes": {
"binding": { "binding": {
"config": { "config": {
@ -380,24 +275,10 @@
"type": "expr" "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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": { "meta.tooltip.text": {
"binding": { "binding": {
"config": { "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" "type": "expr"
} }
@ -409,32 +290,6 @@
}, },
"type": "property" "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": { "props": {