Update status components, named queries, images, search and add FMH Extendo

This commit is contained in:
b.makharadze 2025-08-08 18:37:56 +04:00
parent 155d054381
commit e6e43d5bb9
34 changed files with 61847 additions and 533 deletions

Binary file not shown.

View File

@ -6,9 +6,9 @@
"$": [
"ts",
192,
1751383350721
1754491976060
],
"$ts": 1751383350721
"$ts": 1754491976060
}
}
},
@ -66,20 +66,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/AMZ_MTN6_Overview.svg?var\" + toMillis(now(1000)) "
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
}
},
"source": "/system/images/image-server/AMZ_MTN6_Overview.svg"
},
"type": "ia.display.image"
},

View File

@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM01_Singulated_Inbound.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM01_Singulated_Inbound.svg",
"style": {
"backgroundColor": "#EEEEEE"
}
@ -5884,7 +5875,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM01/Conveyor/VFD/MCM01_VFD1",
"System/MCM01/MCM01",
"value",
"value",
"value",
@ -8335,7 +8326,7 @@
"position": {
"height": 0.0126,
"width": 0.007,
"x": 0.388,
"x": 0.4165,
"y": 0.8161
},
"props": {
@ -9151,7 +9142,7 @@
"position": {
"height": 0.0126,
"width": 0.007,
"x": 0.3966,
"x": 0.4251,
"y": 0.8161
},
"props": {

View File

@ -41,20 +41,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM02_Singulated_Inbound.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM02_Singulated_Inbound.svg",
"style": {
"backgroundColor": "#EEEEEE"
}

View File

@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM02_Fluid_Inbound_Upper.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM02_Fluid_Inbound_Upper.svg",
"style": {
"backgroundColor": "#EEEEEE"
}

View File

@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM03_Non_Con.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM03_Non_Con.svg",
"style": {
"backgroundColor": "#EEEEEE",
"overflow": "hidden"

View File

@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM04_Bulk_Inbound_Problem_Solve_Chutes.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM04_Bulk_Inbound_Problem_Solve_Chutes.svg",
"style": {
"backgroundColor": "#EEEEEE"
}
@ -10930,7 +10921,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1014_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1014_2_VFD1",
"value",
"value",
"value",
@ -10971,7 +10962,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1018_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1018_2_VFD1",
"value",
"value",
"value",
@ -11053,7 +11044,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1026_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1026_2_VFD1",
"value",
"value",
"value",
@ -11094,7 +11085,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1034_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1034_2_VFD1",
"value",
"value",
"value",
@ -11135,7 +11126,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1038_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1038_2_VFD1",
"value",
"value",
"value",
@ -11176,7 +11167,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3012_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3012_2_VFD1",
"value",
"value",
"value",
@ -11217,7 +11208,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3016_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3016_2_VFD1",
"value",
"value",
"value",
@ -11258,7 +11249,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3020_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3020_2_VFD1",
"value",
"value",
"value",
@ -11299,7 +11290,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3024_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3024_2_VFD1",
"value",
"value",
"value",

View File

@ -7,7 +7,7 @@
"params.highlightTagPath": {
"onChange": {
"enabled": null,
"script": "\tfound = utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM04_Chutes = \"Detailed-Views/MCM04 Chutes\"\n\t\tsystem.perspective.navigate(view = MCM04_Chutes, params = {'highlightTagPath':currentValue})"
"script": "\tfound \u003d utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM04_Chutes \u003d \"Detailed-Views/MCM04 Chutes\"\n\t\tsystem.perspective.navigate(view \u003d MCM04_Chutes, params \u003d {\u0027highlightTagPath\u0027:currentValue})"
},
"paramDirection": "input",
"persistent": true
@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM04_Bulk_Inbound_Problem_Solve.svg?var\" + toMillis(now(1000))\r\n"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM04_Bulk_Inbound_Problem_Solve.svg",
"style": {
"backgroundColor": "#EEEEEE"
}
@ -993,7 +984,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3020_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3020_2_VFD1",
"value",
"value",
"value",
@ -1033,7 +1024,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3024_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3024_2_VFD1",
"value",
"value",
"value",
@ -1073,7 +1064,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3012_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3012_2_VFD1",
"value",
"value",
"value",
@ -1113,7 +1104,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL3016_2_VFD1",
"System/MCM04/Conveyor/VFD/FL3016_2_VFD1",
"value",
"value",
"value",
@ -1153,7 +1144,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1022_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1022_2_VFD1",
"value",
"value",
"value",
@ -1193,7 +1184,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1018_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1018_2_VFD1",
"value",
"value",
"value",
@ -1233,7 +1224,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1014_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1014_2_VFD1",
"value",
"value",
"value",
@ -1273,7 +1264,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1034_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1034_2_VFD1",
"value",
"value",
"value",
@ -1313,7 +1304,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1026_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1026_2_VFD1",
"value",
"value",
"value",
@ -1353,7 +1344,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM04/Conveyor/APF/FL1038_2_VFD1",
"System/MCM04/Conveyor/VFD/FL1038_2_VFD1",
"value",
"value",
"value",
@ -11204,6 +11195,10 @@
"meta": {
"name": "root"
},
"position": {
"x": 0.0838,
"y": -0.0623
},
"props": {
"mode": "percent"
},

View File

@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM05_Bulk_Inbound_Problem_Solve_+_Fluid_Inbound_Chutes.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM05_Bulk_Inbound_Problem_Solve_+_Fluid_Inbound_Chutes.svg",
"style": {
"backgroundColor": "#EEEEEE"
}
@ -303,7 +294,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2074_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2074_2_VFD1",
"value",
"value",
"value",
@ -343,7 +334,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2078_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2078_2_VFD1",
"value",
"value",
"value",
@ -383,7 +374,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2086_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2086_2_VFD1",
"value",
"value",
"value",
@ -423,7 +414,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2090_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2090_2_VFD1",
"value",
"value",
"value",
@ -463,7 +454,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2094_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2094_2_VFD1",
"value",
"value",
"value",
@ -503,7 +494,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4078_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4078_2_VFD1",
"value",
"value",
"value",
@ -543,7 +534,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4082_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4082_2_VFD1",
"value",
"value",
"value",
@ -583,7 +574,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4070_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4070_2_VFD1",
"value",
"value",
"value",
@ -623,7 +614,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4066_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4066_2_VFD1",
"value",
"value",
"value",
@ -663,7 +654,7 @@
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4074_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4074_2_VFD1",
"value",
"value",
"value",

View File

@ -7,7 +7,7 @@
"params.highlightTagPath": {
"onChange": {
"enabled": null,
"script": "\tfound = utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM05_Chutes = \"Detailed-Views/MCM05 Chutes\"\n\t\tsystem.perspective.navigate(view = MCM05_Chutes, params = {'highlightTagPath':currentValue})"
"script": "\tfound \u003d utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM05_Chutes \u003d \"Detailed-Views/MCM05 Chutes\"\n\t\tsystem.perspective.navigate(view \u003d MCM05_Chutes, params \u003d {\u0027highlightTagPath\u0027:currentValue})"
},
"paramDirection": "input",
"persistent": true
@ -29,20 +29,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM05_Bulk_Inbound_Problem_Solve_%2B_Fluid_Inbound.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM05_Bulk_Inbound_Problem_Solve_+_Fluid_Inbound.svg",
"style": {
"backgroundColor": "#EEEEEE"
}
@ -3184,7 +3175,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2074_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2074_2_VFD1",
"value",
"value",
"value",
@ -3424,7 +3415,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2078_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2078_2_VFD1",
"value",
"value",
"value",
@ -3544,7 +3535,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2086_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2086_2_VFD1",
"value",
"value",
"value",
@ -3744,7 +3735,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2090_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2090_2_VFD1",
"value",
"value",
"value",
@ -3864,7 +3855,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL2094_2_VFD1",
"System/MCM05/Conveyor/VFD/FL2094_2_VFD1",
"value",
"value",
"value",
@ -4064,7 +4055,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4082_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4082_2_VFD1",
"value",
"value",
"value",
@ -4184,7 +4175,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4078_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4078_2_VFD1",
"value",
"value",
"value",
@ -4384,7 +4375,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4074_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4074_2_VFD1",
"value",
"value",
"value",
@ -4544,7 +4535,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4066_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4066_2_VFD1",
"value",
"value",
"value",
@ -4584,7 +4575,7 @@
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM05/Conveyor/APF/FL4070_2_VFD1",
"System/MCM05/Conveyor/VFD/FL4070_2_VFD1",
"value",
"value",
"value",

View File

@ -32,20 +32,11 @@
},
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM06_Non_Con.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM06_Non_Con.svg",
"style": {
"backgroundColor": "#EEEEEE"
}

View File

@ -33,20 +33,11 @@
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/MCM07_Bypass.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
},
"source": "/system/images/image-server/MCM07_Bypass.svg",
"style": {
"backgroundColor": "#EEEEEE"
}

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-08-08T12:31:36Z"
},
"lastModificationSignature": "7d71bf1841fe7896576af8b3c4414ef8ee5312e85ac4ea682ed8d9ac45fa7a84"
}
}

View File

@ -11,8 +11,8 @@
},
"props": {
"defaultSize": {
"height": 512,
"width": 117
"height": 410,
"width": 100
}
},
"root": {
@ -22,28 +22,19 @@
"name": "Image"
},
"position": {
"height": 0.8196,
"height": 0.998,
"rotate": {
"anchor": "251% 110%"
},
"width": 0.7949,
"x": 0.094,
"y": 0.1478
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/EN4TR.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
"width": 1,
"x": -0.0049,
"y": -0.0006
},
"props": {
"fit": {
"mode": "fill"
}
},
"source": "/system/images/image-server/EN4TR.svg"
},
"type": "ia.display.image"
},
@ -94,8 +85,8 @@
"anchor": "-132% -413%"
},
"width": 0.7094,
"x": 0.1452,
"y": 0.0098
"x": 0.1252,
"y": 0.0368
},
"props": {
"mode": "percent",

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-08-05T13:18:42Z"
},
"lastModificationSignature": "8b10eac8888ffc2181c626167191512c03a31ce84de5f75baf8ff2156b563d02"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

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-08-08T12:19:58Z"
},
"lastModificationSignature": "843679a7b20cc35896cc4fc328affed98afc927fa913a6c01b2d526bf60cd6f6"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,837 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 180,
"width": 240
}
},
"root": {
"children": [
{
"meta": {
"name": "TIPPER"
},
"position": {
"basis": "300px"
},
"props": {
"elements": [
{
"elements": [
{
"elements": [
{
"id": "stop17",
"name": "stop17",
"offset": "0",
"stopColor": "#5f75d8",
"stopOpacity": "1",
"style": {
"stopColor": "#5f75d8",
"stopOpacity": "1"
},
"type": "stop"
}
],
"id": "swatch17",
"name": "swatch17",
"type": "linearGradient"
},
{
"elements": [
{
"d": "M 3,-3 L -3,3 M 0,-5 L 0,5",
"id": "path1-4",
"name": "path1-4",
"stroke": {
"paint": "#000000",
"width": "0.5"
},
"type": "path"
}
],
"id": "DistanceX",
"name": "DistanceX",
"orient": "auto",
"refX": "0.0",
"refY": "0.0",
"style": {
"overflow": "visible"
},
"type": "marker"
},
{
"elements": [
{
"d": "M8 4 l-4,4",
"id": "path2-2",
"name": "path2-2",
"stroke": {
"paint": "#000000",
"width": "0.25"
},
"type": "path"
},
{
"d": "M6 2 l-4,4",
"id": "path3-7",
"name": "path3-7",
"stroke": {
"paint": "#000000",
"width": "0.25"
},
"type": "path"
},
{
"d": "M4 0 l-4,4",
"id": "path4",
"name": "path4",
"stroke": {
"paint": "#000000",
"width": "0.25"
},
"type": "path"
}
],
"height": "8",
"id": "Hatch",
"name": "Hatch",
"patternUnits": "userSpaceOnUse",
"type": "pattern",
"width": "8",
"x": "0",
"y": "0"
},
{
"id": "$MODEL_SPACE",
"name": "$MODEL_SPACE",
"type": "symbol"
},
{
"id": "$PAPER_SPACE",
"name": "$PAPER_SPACE",
"type": "symbol"
},
{
"id": "1",
"name": "1",
"type": "symbol"
},
{
"id": "*U3",
"name": "*U3",
"type": "symbol"
},
{
"id": "*U4",
"name": "*U4",
"type": "symbol"
},
{
"id": "*U5",
"name": "*U5",
"type": "symbol"
},
{
"id": "*U6",
"name": "*U6",
"type": "symbol"
},
{
"id": "*U7",
"name": "*U7",
"type": "symbol"
},
{
"id": "*U8",
"name": "*U8",
"type": "symbol"
},
{
"id": "*U9",
"name": "*U9",
"type": "symbol"
},
{
"id": "*U10",
"name": "*U10",
"type": "symbol"
},
{
"id": "*U11",
"name": "*U11",
"type": "symbol"
},
{
"id": "*U12",
"name": "*U12",
"type": "symbol"
}
],
"id": "defs1",
"name": "defs1",
"type": "defs"
},
{
"id": "layer-MC0",
"name": "layer-MC0",
"type": "group"
},
{
"d": "M 44.75,130.875 57.625,35.125 61.650873,35.841475 70.843261,24.306796 90.288697,12.59534 141.5625,12.875 137,27.1875 126.9375,40.875 108.875,162.6875 Z",
"fill": {
"paint": "transparent"
},
"id": "path1",
"name": "path1",
"stroke": {
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 62.923636,36.423456 62.715224,5.465588 z",
"fill": {
"paint": "transparent"
},
"id": "path2",
"name": "path2",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "2.9716"
},
"type": "path"
},
{
"d": "m 65.634361,41.777534 58.939299,5.191654 z",
"fill": {
"paint": "transparent"
},
"id": "path2-4",
"name": "path2-4",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "2.80764"
},
"type": "path"
},
{
"d": "M 61.75,36.375 48.6875,132",
"fill": {
"paint": "transparent"
},
"id": "path3",
"name": "path3",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "M 48.875,131.6875 108,117.75 107.5625,41.4375 115.5,13.125",
"fill": {
"paint": "transparent"
},
"id": "path5",
"name": "path5",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 108.6875,118 6.25,2.1875",
"fill": {
"paint": "transparent"
},
"id": "path6",
"name": "path6",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 186.75,39.625 -0.0625,10.625 -6.1875,14.125 -63.9375,89.25 2.8125,1.625 61.4375,-87.8125 7.375,-17.5 -0.5,-10.875 z",
"fill": {
"paint": "transparent"
},
"id": "path7",
"name": "path7",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 119.3125,155.4375 -0.1875,4.375",
"fill": {
"paint": "transparent"
},
"id": "path8",
"name": "path8",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 129.1875,46.875 3.6875,0.75 2.75,2.9375 -5.0625,-1.0625 z",
"fill": {
"paint": "transparent"
},
"id": "path10",
"name": "path10",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 130.5625,47.625 1.9375,1.6875 1.4375,0.375 -1.0625,-1.625 -1.4375,0.875 h 1.25 l -1,-1.125 -1.0625,0.625",
"fill": {
"paint": "transparent"
},
"id": "path11",
"name": "path11",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"cx": "189.93552",
"cy": "40.901707",
"fill": {
"paint": "transparent"
},
"id": "path12",
"name": "path12",
"rx": "0.54137862",
"ry": "0.50823301",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "ellipse"
},
{
"cx": "189.80411",
"cy": "49.963356",
"fill": {
"paint": "transparent"
},
"id": "path12-2",
"name": "path12-2",
"rx": "0.54137862",
"ry": "0.50823301",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "ellipse"
},
{
"cx": "195.1295",
"cy": "49.616291",
"fill": {
"paint": "transparent"
},
"id": "path12-4",
"name": "path12-4",
"rx": "0.54137862",
"ry": "0.50823301",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "ellipse"
},
{
"cx": "195.5554",
"cy": "40.771824",
"fill": {
"paint": "transparent"
},
"id": "path12-21",
"name": "path12-21",
"rx": "0.54137862",
"ry": "0.50823301",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "ellipse"
},
{
"d": "m 151.63021,39.288621 0.13258,9.103999 9.23659,-0.662912 -0.0442,-9.059806 z",
"fill": {
"paint": "transparent"
},
"id": "path13",
"name": "path13",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 177.90625,73.875 15.21875,-2.40625 14.25,2.25 -1.71875,28.71875 -15.3125,3.6875 -14.25,-3.8125 z",
"fill": {
"paint": "transparent"
},
"id": "path14",
"name": "path14",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 178.5,74.375 12.8125,2.0625 -1.53125,29.34375",
"fill": {
"paint": "transparent"
},
"id": "path15",
"name": "path15",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 206.71875,74.09375 -15.5,2.5",
"fill": {
"paint": "transparent"
},
"id": "path16",
"name": "path16",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "1.1"
},
"type": "path"
},
{
"cx": "193.89062",
"cy": "91.359375",
"fill": {
"opacity": "1",
"paint": "#000000"
},
"id": "path17",
"name": "path17",
"rx": "0.77607769",
"ry": "0.74482769",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.766595"
},
"type": "ellipse"
},
{
"cx": "197.69063",
"cy": "90.628128",
"fill": {
"opacity": "1",
"paint": "#000000"
},
"id": "path17-7",
"name": "path17-7",
"rx": "0.77607769",
"ry": "0.74482769",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.766595"
},
"type": "ellipse"
},
{
"cx": "198.28438",
"cy": "85.315628",
"fill": {
"opacity": "1",
"paint": "#000000"
},
"id": "path17-9",
"name": "path17-9",
"rx": "0.77607769",
"ry": "0.74482769",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.766595"
},
"type": "ellipse"
},
{
"cx": "209.1272",
"cy": "24.184483",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path17-5",
"name": "path17-5",
"rx": "1.431578",
"ry": "2.1190782",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.63476"
},
"transform": "rotate(15.987027)",
"type": "ellipse"
},
{
"cx": "208.66664",
"cy": "62.949574",
"fill": {
"opacity": "1",
"paint": "#ffffff"
},
"id": "path17-5-7",
"name": "path17-5-7",
"rx": "1.2205637",
"ry": "1.3071641",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.460334"
},
"transform": "matrix(0.99560122,0.09369212,-0.18120188,0.98344592,0,0)",
"type": "ellipse"
},
{
"cx": "214.80388",
"cy": "50.720142",
"fill": {
"opacity": "1",
"paint": "#000000"
},
"id": "path18-2",
"name": "path18-2",
"rx": "1.4606016",
"ry": "2.2887268",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.672547"
},
"transform": "rotate(8.8217042)",
"type": "ellipse"
},
{
"cx": "203.75",
"cy": "82.953125",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path21",
"name": "path21",
"rx": "2.677115",
"ry": "3.38024",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.39577"
},
"type": "ellipse"
},
{
"cx": "199.28859",
"cy": "99.362465",
"fill": {
"opacity": "1",
"paint": "#ffffff"
},
"id": "path18",
"name": "path18",
"rx": "2.8372014",
"ry": "0.86542016",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.34718"
},
"transform": "matrix(0.99688459,-0.0788741,0.08715985,0.99619434,0,0)",
"type": "ellipse"
},
{
"d": "m 197.07962,80.311389 -1.59674,-1.247778",
"fill": {
"opacity": "1",
"paint": "#ffffff"
},
"id": "path24",
"name": "path24",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"paint": "#000000",
"width": "0.558791"
},
"type": "path"
},
{
"d": "M 194.03125,83.0625 196.5,82.71875",
"fill": {
"opacity": "1",
"paint": "#ffffff"
},
"id": "path25",
"name": "path25",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "0.4"
},
"type": "path"
},
{
"d": "m 141.9375,12.875 0.375,-1.5625 L 168,12 l 10,13.5 -0.625,15.625 6.9375,-0.1875 1.875,-1.875 8.875,-0.125 -0.875,26.4375 -1.125,0.1875 -0.375,5.25",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path26",
"name": "path26",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 191.125,106.3125 -1.0625,32.5625 -70.6875,24.75 -0.3125,-3.3125 -0.9375,-0.25 -9.0625,3.0625",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path27",
"name": "path27",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 130,151 55.0625,-17.6875 1.5625,-28",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path28",
"name": "path28",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 183.875,104.625 -1,27.6875 -51.4375,16.5625",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path29",
"name": "path29",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 129.8125,151.125 47.375,-68.6875",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path30",
"name": "path30",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "1.1"
},
"type": "path"
},
{
"d": "m 176.51153,103.06081 -2.20971,31.99659",
"fill": {
"opacity": "1",
"paint": "transparent"
},
"id": "path31",
"name": "path31",
"stroke": {
"dasharray": "none",
"linecap": "round",
"linejoin": "round",
"opacity": "1",
"paint": "#242424",
"width": "1.1"
},
"type": "path"
},
{
"elements": [
{
"id": "g16556",
"name": "g16556",
"type": "group"
},
{
"elements": [
{
"href": "#1",
"id": "use16556",
"name": "use16556",
"stroke": {
"width": "0.5px"
},
"transform": "rotate(90,38356.95,25149.65)",
"type": "use"
}
],
"id": "g16557",
"name": "g16557",
"type": "group"
},
{
"id": "g16558",
"name": "g16558",
"type": "group"
}
],
"id": "g31",
"name": "g31",
"transform": "translate(-61043.124,6094.1198)",
"type": "group"
}
],
"viewBox": "0 0 240 180"
},
"type": "ia.shapes.svg"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

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-08-08T07:59:07Z"
},
"lastModificationSignature": "ad73ff524c8fde80e7df7e6a4b6fba1f5e5bc6f0df64b1c624e3bf1ddd3e04c6"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,21 +1,27 @@
def handleTagHighlight(view, currentValue):
tag_priority = currentValue.value
if tag_priority == None:
return
# --- CASE 1: Remove all highlights by applying CLEAR class ---
if not tag_priority or str(tag_priority).upper() == "CLEAR":
for child in view.rootContainer.getChildren():
try:
child.props.style.classes = "Highlight/Pulse-Clear"
except:
pass
return False
# --- CASE 2: Highlight as normal ---
parts = str(tag_priority).split("||")
tag = parts[0]
priority = parts[1] if len(parts) > 1 else "1"
splitedTag = tag.split("/")
deviceName = splitedTag[-1]
Docked_East_Map = {
"VFD" : "Docked-East-VFD",
"MCM" : "Docked-East-MCM"
"VFD": "Docked-East-VFD",
"MCM": "Docked-East-MCM"
}
Docked_East_View = Docked_East_Map["VFD"]
if "PE" in deviceName:
@ -24,13 +30,13 @@ def handleTagHighlight(view, currentValue):
if "MCM" in deviceName:
Docked_East_View = Docked_East_Map["MCM"]
# Clear old highlights (set to Clear class)
components = view.rootContainer.getChildren()
for child in components:
child.props.style.classes = "Highlight/Pulse-Clear"
priority = parts[1]
# Apply highlight if found
foundMatch = False
# clear all highlights and apply new one when found
for child in components:
params = child.props.get("params", {})
tagProps = params.get("tagProps", {})
@ -39,12 +45,10 @@ def handleTagHighlight(view, currentValue):
if len(tagsList) == 0:
continue
child.props.style.classes = ""
tagPath = tagsList[0]
if tag == tagPath:
child.props.style["classes"] = "Highlight/Pulse-" + priority
child.props.style.classes = "Highlight/Pulse-" + priority
system.perspective.openDock(Docked_East_View, params={'tagProps': tagProps})
foundMatch = True

View File

@ -11,11 +11,12 @@
],
"running_state": -1,
"state": 0,
"type": 0,
"views_data": []
},
"params": {
"tagProps": [
"System/MCM04/Conveyor/Extendo/FL1038_4_EX1",
"System/MCM01/Conveyor/EXTENDO/UL1_1_EX1",
"value",
"value",
"value",
@ -108,6 +109,43 @@
},
"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}/EX_Type"
},
"transforms": [
{
"expression": "if(isNull({value}), 0, {value})",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.views_data": {
"binding": {
"config": {
@ -417,11 +455,48 @@
"basis": "50%",
"grow": 1
},
"propConfig": {
"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}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "BELT RUNNING"
},
{
"input": 0,
"output": "AOPEN ACTIVE"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"paddingLeft": 20
},
"text": "AOPEN ACTIVE"
}
},
"type": "ia.display.label"
},
@ -465,28 +540,12 @@
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Aopen_Active"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "ACTIVE"
},
{
"input": 0,
"output": "NOT ACTIVE"
}
],
"outputType": "scalar",
"type": "map"
"code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\tunit \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"Belt_Running\"\n\telse:\n\t child \u003d \"Aopen_Active\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"Running\" if result else \"Not Running\"\n\t else:\n\t \treturn \"Active\" if result else \"Not Active\"\n\t ",
"type": "script"
}
],
"type": "tag"
@ -497,6 +556,7 @@
"config": {
"path": "this.props.text"
},
"enabled": false,
"transforms": [
{
"fallback": "#000000",
@ -523,6 +583,9 @@
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
},
"textStyle": {
"color": "#000000"
}
},
"type": "ia.display.label"
@ -549,6 +612,44 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": true
},
{
"input": 0,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
@ -566,11 +667,48 @@
"basis": "50%",
"grow": 1
},
"propConfig": {
"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}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "PLC READY TO RUN"
},
{
"input": 0,
"output": "FULLY EXTENDED"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"paddingLeft": 20
},
"text": "FULLY EXTENDED"
}
},
"type": "ia.display.label"
},
@ -614,28 +752,12 @@
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Fully_Extended"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "EXTENDED"
},
{
"input": 0,
"output": "NOT EXTENDED"
}
],
"outputType": "scalar",
"type": "map"
"code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"PLC_Ready_To_Run\"\n\telse:\n\t child \u003d \"Fully_Extended\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"Ready\" if result else \"Not Ready\"\n\t else:\n\t \treturn \"Extended\" if result else \"Not Extended\"\n\t ",
"type": "script"
}
],
"type": "tag"
@ -646,6 +768,7 @@
"config": {
"path": "this.props.text"
},
"enabled": false,
"transforms": [
{
"fallback": "#000000",
@ -672,6 +795,9 @@
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
},
"textStyle": {
"color": "#000000"
}
},
"type": "ia.display.label"
@ -698,6 +824,44 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": true
},
{
"input": 0,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
@ -715,11 +879,48 @@
"basis": "50%",
"grow": 1
},
"propConfig": {
"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}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "OK TO RUN"
},
{
"input": 0,
"output": "FULLY RETRACTED"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"paddingLeft": 20
},
"text": "FULLY RETRACTED"
}
},
"type": "ia.display.label"
},
@ -763,28 +964,12 @@
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Fully_Retracted"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "RETRACTED"
},
{
"input": 0,
"output": "NOT RETRACTED"
}
],
"outputType": "scalar",
"type": "map"
"code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"OK_To_Run\"\n\telse:\n\t child \u003d \"Fully_Retracted\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"OK\" if result else \"Not OK\"\n\t else:\n\t \treturn \"Retracted\" if result else \"Not Retracted\"\n\t ",
"type": "script"
}
],
"type": "tag"
@ -795,6 +980,7 @@
"config": {
"path": "this.props.text"
},
"enabled": false,
"transforms": [
{
"fallback": "#000000",
@ -821,6 +1007,9 @@
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
},
"textStyle": {
"color": "#000000"
}
},
"type": "ia.display.label"
@ -847,6 +1036,44 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": true
},
{
"input": 0,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
@ -864,11 +1091,48 @@
"basis": "50%",
"grow": 1
},
"propConfig": {
"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}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)",
"type": "expression"
},
{
"fallback": "UNKNOWN",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "READY TO RECEIVE"
},
{
"input": 0,
"output": "LODAING MODE"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"paddingLeft": 20
},
"text": "LOADING MODE"
}
},
"type": "ia.display.label"
},
@ -912,28 +1176,12 @@
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Loading_Mode"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"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"
"code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"Ready_To_Receive\"\n\telse:\n\t child \u003d \"Loading_Mode\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"Ready\" if result else \"Not Ready\"\n\t else:\n\t \treturn \"ON\" if result else \"OFF\"\n\t ",
"type": "script"
}
],
"type": "tag"
@ -944,6 +1192,7 @@
"config": {
"path": "this.props.text"
},
"enabled": false,
"transforms": [
{
"fallback": "#000000",
@ -970,6 +1219,9 @@
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"paddingLeft": 10
},
"textStyle": {
"color": "#000000"
}
},
"type": "ia.display.label"
@ -996,6 +1248,44 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": true
},
{
"input": 0,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
@ -1145,6 +1435,44 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": false
},
{
"input": 0,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
@ -1294,6 +1622,44 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": false
},
{
"input": 0,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
@ -1546,7 +1912,24 @@
"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 0 or value \u003d\u003d 3:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\"]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"currentTabIndex": 1,
"menuType": "modern",
"tabSize": {
"width": 1000
@ -1568,12 +1951,7 @@
"fontWeight": "bold",
"paddingLeft": 10
}
},
"tabs": [
"Alarms",
"Info",
"Commands"
]
}
},
"type": "ia.container.tab"
}

View File

@ -7,9 +7,9 @@
"$": [
"ts",
192,
1710275608985
1754654771271
],
"$ts": 1710275608985
"$ts": 1754654771271
}
}
},
@ -46,8 +46,8 @@
},
"props": {
"defaultSize": {
"height": 294,
"width": 500
"height": 325,
"width": 700
}
},
"root": {
@ -190,7 +190,7 @@
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 200
"width": 250
},
{
"align": "center",
@ -282,14 +282,14 @@
"viewParams": {},
"viewPath": "",
"visible": true,
"width": ""
"width": 75
}
],
"data": {
"$": [
"ds",
192,
1710275544545
1754654771334
],
"$columns": [
{
@ -353,7 +353,7 @@
"system": {
"onStartup": {
"config": {
"script": "\tids \u003d config.project_config.global_project_page_ids\n\tdata \u003d []\n\tfor k,v in ids.items():\n\t items \u003d [str(k),str(v)]\n\t data.append(items)\n\theader \u003d [\"SourceId\", \"Page\"]\n\tdataset \u003d system.dataset.toDataSet(header, data)\n\tself.getChild(\"Table\").props.data \u003d dataset"
"script": "\tids \u003d config.project_config.global_project_page_ids\n\tdata \u003d []\n\t\n\tfor k, v in ids.items():\n\t short_page \u003d str(v)[:5]\n\t data.append([str(k), short_page])\n\t\n\theader \u003d [\"SourceId\", \"Page\"]\n\tdataset \u003d system.dataset.toDataSet(header, data)\n\t\n\t# Assign to the Table component\n\tself.getChild(\"Table\").props.data \u003d dataset"
},
"scope": "G",
"type": "script"

View File

@ -1,12 +1,12 @@
{
"custom": {
"disconnected": true,
"disconnected": false,
"plc": "value",
"priority": 0,
"priority_string": "No Active Alarms",
"searchId": "PLC01",
"state": 0,
"state_string": "Loading Not Allowed"
"state_string": "Running"
},
"params": {
"directionLeft": false,
@ -23,7 +23,8 @@
"value",
"value",
"value"
]
],
"type": 1
},
"propConfig": {
"custom.disconnected": {
@ -193,7 +194,7 @@
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n0, \"Loading Not Allowed\",\r\n1, \"Loading Allowed\",\r\n2, \"Running\",\r\n3, \"Full\",\r\n4, \"Communication Faulted\",\r\n5, \"Extendo Faulted\",\r\n6, \"Estopped\",\r\n\"Unknown\")"
"expression": "if(\r\n {view.params.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \"Loading Not Allowed\",\r\n 1, \"Loading Allowed\",\r\n 2, \"Running\",\r\n 3, \"Full\",\r\n 4, \"Communication Faulted\",\r\n 5, \"Extendo Faulted\",\r\n 6, \"Estopped\",\r\n \"Unknown\"\r\n ),\r\n case(\r\n {view.custom.state},\r\n 0, \"Running\", \r\n 1, \"OK to Run\", \r\n 2, \"PLC Ready to Run\", \r\n 3, \"Ready To Receive\", \r\n 4, \"Motor Faulted\", \r\n 5, \"Estopped\", \r\n \"Unknown\"\r\n )\r\n)\r\n"
},
"type": "expr"
},
@ -214,6 +215,10 @@
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
},
"params.type": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
@ -249,7 +254,7 @@
"props.elements[0].fill.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, 2, 3, 4, 5, 6,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#0000FF\",\r\n \"#FF0000\", \"#FF0000\", \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n if(\r\n toInt({view.params.type}) \u003d 0,\r\n if(\r\n toInt({view.custom.state}) \u003d 0, \"#c2c2c2\",\r\n if(\r\n toInt({view.custom.state}) \u003d 1, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 2, \"#00ff11\",\r\n if(\r\n toInt({view.custom.state}) \u003d 3, \"#0000FF\",\r\n if(\r\n toInt({view.custom.state}) \u003d 4, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 5, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 6, \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n ),\r\n if(\r\n toInt({view.custom.state}) \u003d 0, \"#00ff11\",\r\n if(\r\n toInt({view.custom.state}) \u003d 1, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 2, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 3, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 4, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 5, \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}
@ -257,7 +262,7 @@
"props.elements[1].fill.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, 2, 3, 4, 5, 6,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#0000FF\",\r\n \"#FF0000\", \"#FF0000\", \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n if(\r\n toInt({view.params.type}) \u003d 0,\r\n if(\r\n toInt({view.custom.state}) \u003d 0, \"#c2c2c2\",\r\n if(\r\n toInt({view.custom.state}) \u003d 1, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 2, \"#00ff11\",\r\n if(\r\n toInt({view.custom.state}) \u003d 3, \"#0000FF\",\r\n if(\r\n toInt({view.custom.state}) \u003d 4, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 5, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 6, \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n ),\r\n if(\r\n toInt({view.custom.state}) \u003d 0, \"#00ff11\",\r\n if(\r\n toInt({view.custom.state}) \u003d 1, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 2, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 3, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 4, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 5, \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}
@ -265,7 +270,7 @@
"props.elements[2].fill.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, 2, 3, 4, 5, 6,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#0000FF\",\r\n \"#FF0000\", \"#FF0000\", \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n if(\r\n toInt({view.params.type}) \u003d 0,\r\n if(\r\n toInt({view.custom.state}) \u003d 0, \"#c2c2c2\",\r\n if(\r\n toInt({view.custom.state}) \u003d 1, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 2, \"#00ff11\",\r\n if(\r\n toInt({view.custom.state}) \u003d 3, \"#0000FF\",\r\n if(\r\n toInt({view.custom.state}) \u003d 4, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 5, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 6, \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n ),\r\n if(\r\n toInt({view.custom.state}) \u003d 0, \"#00ff11\",\r\n if(\r\n toInt({view.custom.state}) \u003d 1, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 2, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 3, \"#c9fcc0\",\r\n if(\r\n toInt({view.custom.state}) \u003d 4, \"#FF0000\",\r\n if(\r\n toInt({view.custom.state}) \u003d 5, \"#FF0000\",\r\n \"#fff700\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}

View File

@ -1,39 +1,7 @@
WITH Active AS (
SELECT
ae.id,
ae.eventtime,
ae.eventid,
ae.source,
ae.priority,
ae.displaypath,
TIMESTAMPDIFF(SECOND, ae.eventtime, NOW()) AS duration_seconds
FROM alarm_events ae
WHERE ae.eventtype = 0
AND NOT EXISTS (
SELECT 1 FROM alarm_events ae_clear
WHERE ae_clear.eventid = ae.eventid
AND ae_clear.eventtype = 1
)
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
-- Priority filter using FIND_IN_SET for comma-separated values
AND (
:priorityList IS NULL
OR :priorityList = ''
OR FIND_IN_SET(ae.priority, :priorityList) > 0
)
GROUP BY ae.id
),
SingleMyTag AS (
SELECT aed.id, aed.strValue
FROM alarm_event_data aed
WHERE aed.propname = 'myTag'
GROUP BY aed.id
)
SELECT
Active.id AS ID,
Active.eventtime AS StartTimestamp,
NULL AS EndTimestamp, -- no end time since it's still active
NULL AS EndTimestamp, -- still active
CONCAT(
LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':',
LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':',
@ -53,10 +21,42 @@ SELECT
'.HMI.',
SUBSTRING_INDEX(aed.strValue, '/', -1)
) AS Tag,
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location ,
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location,
aed.strValue AS FullTag,
Active.displaypath as Device
FROM Active
LEFT JOIN SingleMyTag aed
FROM
(
SELECT
ae.id,
ae.eventtime,
ae.eventid,
ae.source,
ae.priority,
ae.displaypath,
TIMESTAMPDIFF(SECOND, ae.eventtime, NOW()) AS duration_seconds
FROM alarm_events ae
WHERE ae.eventtype = 0
AND NOT EXISTS (
SELECT 1
FROM alarm_events ae_clear
WHERE ae_clear.eventid = ae.eventid
AND ae_clear.eventtype = 1
)
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
AND (
:priorityList IS NULL
OR :priorityList = ''
OR FIND_IN_SET(ae.priority, :priorityList) > 0
)
GROUP BY ae.id
) AS Active
LEFT JOIN
(
SELECT aed.id, aed.strValue
FROM alarm_event_data aed
WHERE aed.propname = 'myTag'
GROUP BY aed.id
) AS aed
ON aed.id = Active.id
ORDER BY Active.eventtime DESC;

View File

@ -1,20 +1,3 @@
WITH Active AS (
SELECT
ae.id,
ae.eventid,
ae.priority,
aed.strValue
FROM alarm_events ae
LEFT JOIN alarm_event_data aed ON ae.id = aed.id AND aed.propname = 'myTag'
WHERE ae.eventtype = 0
AND NOT EXISTS (
SELECT 1 FROM alarm_events ae_clear
WHERE ae_clear.eventid = ae.eventid
AND ae_clear.eventtype = 1
)
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
)
SELECT
SUBSTRING_INDEX(SUBSTRING_INDEX(strValue, '/', 2), '/', -1) AS Location,
CASE priority
@ -26,6 +9,25 @@ SELECT
ELSE 'Unknown'
END AS Priority,
COUNT(*) AS Count
FROM Active
FROM (
SELECT
ae.id,
ae.eventid,
ae.priority,
aed.strValue
FROM alarm_events ae
LEFT JOIN alarm_event_data aed
ON ae.id = aed.id
AND aed.propname = 'myTag'
WHERE ae.eventtype = 0
AND NOT EXISTS (
SELECT 1
FROM alarm_events ae_clear
WHERE ae_clear.eventid = ae.eventid
AND ae_clear.eventtype = 1
)
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
) AS Active
GROUP BY Location, Priority
ORDER BY Location, Priority;

View File

@ -1,33 +1,3 @@
WITH Active AS (
SELECT
ae.id,
ae.eventtime,
ae.eventid,
ae.source,
ae.priority,
ae.displaypath,
TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds
FROM alarm_events ae
LEFT JOIN alarm_events ae_clear
ON ae.eventid = ae_clear.eventid AND ae_clear.eventtype = 1
WHERE ae.eventtype = 0
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
GROUP BY ae.id -- Ensure one row per alarm
),
SingleMyTag AS (
SELECT aed.id, aed.strValue
FROM alarm_event_data aed
WHERE aed.propname = 'myTag'
GROUP BY aed.id -- Collapse duplicates by id
),
SingleClear AS (
SELECT eventid, MIN(eventtime) AS eventtime
FROM alarm_events
WHERE eventtype = 1
GROUP BY eventid
)
SELECT
Active.id AS ID,
Active.eventtime AS StartTimestamp,
@ -56,16 +26,42 @@ SELECT
SUBSTRING_INDEX(aed.strValue, '/', -1)
) AS Tag,
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location ,
aed.strValue AS FullTag,
Active.displaypath as Device
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location, aed.strValue AS FullTag,
Active.displaypath AS Device
FROM Active
FROM (
SELECT
ae.id,
ae.eventtime,
ae.eventid,
ae.source,
ae.priority,
ae.displaypath,
TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds
FROM alarm_events ae
LEFT JOIN alarm_events ae_clear
ON ae.eventid = ae_clear.eventid
AND ae_clear.eventtype = 1
WHERE ae.eventtype = 0
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
GROUP BY ae.id
) AS Active
LEFT JOIN SingleClear Clear
LEFT JOIN (
SELECT eventid, MIN(eventtime) AS eventtime
FROM alarm_events
WHERE eventtype = 1
GROUP BY eventid
) AS Clear
ON Active.eventid = Clear.eventid
LEFT JOIN SingleMyTag aed
LEFT JOIN (
SELECT aed.id, aed.strValue
FROM alarm_event_data aed
WHERE aed.propname = 'myTag'
GROUP BY aed.id
) AS aed
ON aed.id = Active.id
ORDER BY Active.eventtime DESC;

View File

@ -69,47 +69,75 @@ def navigate_to_url(self, source_id, page_id):
navigation.amzl_navigation.set_session_variables(self, source_id, False)
system.perspective.navigate(page = url_to_navigate)
def reset_highlights(self):
"""
Clears highlights, closes docks and popups, and resets session variables.
"""
# 1. Reset session variables
self.session.custom.searchId = ""
self.session.custom.deviceSearchId = ""
# 2. Close popup and docks
system.perspective.closePopup(id="TagSearch")
for dock_id in ["Docked-East-VFD", "Docked-East-MCM", "Docked-East-SNP"]:
system.perspective.closeDock(dock_id)
# 3. Trigger CLEAR state via navigate to same view
current_page = self.page.props.primaryView
system.perspective.navigate(
view=current_page,
params={"highlightTagPath": "CLEAR"}
)
def source_id_lookup(self, source_id):
"""
This function looks for the source_id in
the global_project_page_ids variable.
If found it returns the corrresponding page id.
If no page id is found it will search up the hierachy
of the source_id until it finds a match. It will then
navigate the user to the correct page and set the session
custom variable search_id.
if not source_id:
return
Args:
param1: self. refrence to the object being called.
param2: source_id. The source_id of the alarm.
Returns:
N/A.
Raises:
KeyError: N/A.
"""
logger = system.util.getLogger("Naviagtion function")
# logger.info(str(global_project_page_ids))
page_id = global_project_page_ids.get(source_id)
found = False
if page_id:
found = True
navigate_to_url(self, source_id, page_id)
else:
final_source_id = source_id
if not page_id:
items = source_id.split("/")
length_of_items = len(items)-1
length_of_items = len(items) - 1
while length_of_items > 0:
items.pop()
source_id = "/".join(items)
page_id = global_project_page_ids.get(source_id)
candidate_id = "/".join(items)
page_id = global_project_page_ids.get(candidate_id)
if page_id:
found = True
navigate_to_url(self, source_id, page_id)
final_source_id = candidate_id
break
length_of_items -= 1
if not found:
else:
found = True
if not found or not page_id:
open_pop_up("No page id found")
return
parts = final_source_id.split("/")
device = parts[-1]
if "MCM" in device:
pathToDevice = "/".join(parts[:3])
else:
idx = final_source_id.find(device)
pathToDevice = final_source_id[:idx + len(device)] if idx != -1 else final_source_id
highlight_path = pathToDevice + "||High"
view_prefix = "Detailed-Views/"
page_path = page_id
if not page_id.startswith("/"):
page_path = view_prefix + page_id
system.perspective.navigate(
view=page_path,
params={"highlightTagPath": highlight_path}
)
def get_child_scada_projects():
"""