Update PullChord

This commit is contained in:
beka makharadze 2025-06-26 16:26:57 +04:00
parent 1e311e3c36
commit bb13144029
3 changed files with 48 additions and 453 deletions

View File

@ -1,11 +1,10 @@
{
"custom": {
"alarm_message": null,
"disconnected": false,
"plc": "value",
"plc": "System",
"priority": 0,
"priority_string": "No active alarms",
"searchId": "PLC01",
"searchId": "value",
"state": 0,
"state_string": "Normal"
},
@ -13,7 +12,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"value",
"System/Station/EPC/UL1_3_EPC1",
"value",
"value",
"value",
@ -32,14 +31,14 @@
"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}/STATE"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"expression": "!isGood({value})",
"type": "expression"
}
],
@ -92,16 +91,12 @@
},
"transforms": [
{
"fallback": "Unknown",
"fallback": "No active alarms",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "High"
},
{
"input": 0,
"output": "No active alarms"
}
],
"outputType": "scalar",
@ -136,22 +131,6 @@
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
@ -161,7 +140,7 @@
"custom.state_string": {
"binding": {
"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"
},
@ -202,27 +181,9 @@
"props.elements[0].fill.paint": {
"binding": {
"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": [
{
"fallback": "#AC0000",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "#AAAAAA"
},
{
"input": 1,
"output": "#AAAAAA"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
"type": "expr"
}
},
"props.elements[1].fill.paint": {
@ -242,29 +203,17 @@
"props.elements[2].visibility": {
"binding": {
"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": [
{
"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"
"type": "expr"
}
},
"props.elements[3].visibility": {
"binding": {
"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": [
{
"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"
"type": "expr"
}
}
},
@ -367,20 +316,6 @@
}
},
"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": {
"binding": {
"config": {
@ -403,24 +338,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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\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\", 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"
}
@ -432,32 +353,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": {

View File

@ -4,7 +4,7 @@
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"searchId": "PLC01",
"searchId": "value",
"state": 0,
"state_string": "Normal"
},
@ -31,14 +31,14 @@
"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}/STATE"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"expression": "!isGood({value})",
"type": "expression"
}
],
@ -68,12 +68,12 @@
},
"transforms": [
{
"fallback": 1,
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": 0
"input": 1,
"output": 1
}
],
"outputType": "scalar",
@ -91,16 +91,12 @@
},
"transforms": [
{
"fallback": "Unknown",
"fallback": "No active alarms",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "High"
},
{
"input": 0,
"output": "No active alarms"
}
],
"outputType": "scalar",
@ -135,22 +131,6 @@
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
@ -160,7 +140,7 @@
"custom.state_string": {
"binding": {
"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"
},
@ -199,88 +179,8 @@
"props.elements[0].fill.paint": {
"binding": {
"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"
}
}
@ -299,7 +199,6 @@
}
],
"preserveAspectRatio": "none",
"style": {},
"viewBox": "-0.5 -0.5 27 42"
},
"type": "ia.shapes.svg"
@ -340,20 +239,6 @@
}
},
"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": {
"binding": {
"config": {
@ -376,24 +261,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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\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\", 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"
}
@ -405,32 +276,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": {

View File

@ -1,11 +1,10 @@
{
"custom": {
"alarm_message": null,
"disconnected": false,
"disconnected": true,
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"searchId": "PLC01",
"searchId": "value",
"state": 0,
"state_string": "Normal"
},
@ -32,14 +31,14 @@
"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}/STATE"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"expression": "!isGood({value})",
"type": "expression"
}
],
@ -69,12 +68,12 @@
},
"transforms": [
{
"fallback": 1,
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": 0
"input": 1,
"output": 1
}
],
"outputType": "scalar",
@ -92,16 +91,12 @@
},
"transforms": [
{
"fallback": "Unknown",
"fallback": "No active alarms",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "High"
},
{
"input": 0,
"output": "No active alarms"
}
],
"outputType": "scalar",
@ -136,22 +131,6 @@
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
@ -161,7 +140,7 @@
"custom.state_string": {
"binding": {
"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"
},
@ -197,61 +176,15 @@
"width": 1
},
"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": {
"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": {
"config": {
"expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)"
@ -262,30 +195,6 @@
},
"props": {
"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",
"fill": {
@ -344,20 +253,6 @@
}
},
"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": {
"binding": {
"config": {
@ -380,24 +275,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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\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\", 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"
}
@ -409,32 +290,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": {