Updated Overview. added global start and stop. made status view, with plc, netwoork loop and start for both MCM. Created command control view for MCMs. Added devices DPM devices

This commit is contained in:
Salijoghli 2025-08-22 17:39:34 +04:00
parent 168a731872
commit 60d9f91a99
997 changed files with 365431 additions and 299 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -0,0 +1,15 @@
def detailed_view(page_id):
"""
This function is used to naviagte to a page from a navigation button
This function takes one parameter "page_id. This is the id of the page
the user wishes to navigate to.
Args:
page_id : Target page the function will use to navigate to.
Returns:
None.
Raises:
None.
"""
system.perspective.navigate(page_id)

View File

@ -0,0 +1,18 @@
{
"base": {
"animation": {
"duration": "2.5s",
"keyframes": {
"0%": {
"boxShadow": "0 0 12px 5px rgba(88, 158, 249, 0.8)"
},
"50%": {
"boxShadow": "0 0 20px 8px rgba(88, 158, 249, 1)"
},
"100%": {
"boxShadow": "0 0 5px 2px rgba(88, 158, 249, 0.3)"
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,17 @@
{
"base": {
"style": {
"backgroundColor": "transparent",
"borderBottomColor": "var(--neutral-30)",
"borderBottomStyle": "solid",
"borderBottomWidth": "1px",
"color": "var(--neutral-80)",
"fontSize": "12px",
"fontWeight": "bold",
"paddingLeft": "6px",
"paddingRight": "6px",
"textTransform": "uppercase",
"fill": "var(--neutral-70)"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,15 @@
{
"base": {
"style": {
"backgroundColor": "#2B2B2B",
"borderColor": "#909090",
"borderStyle": "solid",
"borderWidth": "0.5px",
"color": "#FFFFFF",
"fontFamily": "Arial",
"fontSize": "14px",
"fontWeight": "bold",
"textAlign": "center"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,9 @@
{
"type": "AllOf",
"securityLevels": [
{
"name": "Authenticated",
"children": []
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,58 @@
{
"custom": {},
"params": {
"text": "value"
},
"propConfig": {
"params.text": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 30,
"width": 210
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "209px",
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "{view.params.text}"
},
"type": "expr"
}
}
},
"props": {
"style": {
"classes": "Text/CenterAlign_with_Padding"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"alignItems": "center",
"justify": "center",
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
}

View File

@ -0,0 +1,13 @@
{
"base": {
"animation": {
"duration": "1s",
"keyframes": {
"0%": {
"backgroundColor": "#00CC00"
},
"100%": {}
}
}
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,7 @@
{
"base": {
"style": {
"borderStyle": "none"
}
}
}

View File

@ -0,0 +1,448 @@
{
"custom": {},
"params": {
"tagProps": [
"TAG0",
"TAG1",
"TAG2",
"TAG3",
"TAG4",
"TAG5",
"TAG6",
"TAG7",
"TAG8",
"TAG9",
"TAG10",
"TAG11"
]
},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "DPM"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"params": {
"con_lines": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"in": false,
"out": false,
"tagProps": [
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/DPM_TO_HUB"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL14_1_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.0256,
"y": 0.0056
},
"props": {
"params": {
"IP": "11.200.1.32",
"tagProps": [
"UL14_1_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL14_2_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.0715,
"y": 0.0056
},
"props": {
"params": {
"IP": "11.200.1.33",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL14_3_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.1148,
"y": 0.0056
},
"props": {
"params": {
"IP": "11.200.1.34",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL14_4_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.155,
"y": 0.0074
},
"props": {
"params": {
"IP": "11.200.1.35",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL14_5_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.1957,
"y": 0.0047
},
"props": {
"params": {
"IP": "11.200.1.36",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL15_1_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.2368,
"y": 0.0074
},
"props": {
"params": {
"IP": "11.200.1.37",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL15_2_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.2766,
"y": 0.0064
},
"props": {
"params": {
"IP": "11.200.1.38",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL15_3_SIO"
},
"position": {
"height": 0.1667,
"rotate": {
"anchor": "-607% 50%"
},
"width": 0.0349,
"x": 0.3167,
"y": 0.0064
},
"props": {
"params": {
"IP": "11.200.1.39",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL15_5_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.3979,
"y": 0.0064
},
"props": {
"params": {
"IP": "11.200.1.41",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS3_1_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.4386,
"y": 0.0056
},
"props": {
"params": {
"IP": "11.200.1.30",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM_label"
},
"position": {
"height": 0.0694,
"width": 0.101,
"x": 0.7498,
"y": 0.6527
},
"props": {
"text": "NCS1_1_DPM2",
"textStyle": {
"fontSize": "2vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "UL15_4_SIO"
},
"position": {
"height": 0.1667,
"width": 0.0349,
"x": 0.3578,
"y": 0.0064
},
"props": {
"params": {
"IP": "11.200.1.40",
"tagProps": [
"/system/someting_SIO",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 0.6348,
"y": -0.1546
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,8 @@
{
"base": {
"style": {
"backgroundColor": "transparent",
"margin": "1px"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@ -0,0 +1,19 @@
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
COUNT(*) AS Inducted,
SUM(alltable.ACTUAL_DEST <> 'S03999') AS Sorted,
SUM(alltable.DivertStatus = 7) AS DestinationInvalid,
SUM(alltable.DivertStatus = 16) AS DestinationNone,
SUM(alltable.DivertStatus = 12) AS DestinationDisabled,
SUM(alltable.DivertStatus = 5) AS DestinationFull,
SUM(alltable.DivertStatus = 2) AS Unexpected,
SUM(alltable.DivertStatus = 6) AS DestinationFault,
SUM(alltable.DivertStatus = 14) AS DivertFail,
SUM(alltable.DivertStatus = 4) AS GapError,
SUM(alltable.DivertStatus = 17) AS Lost,
SUM(alltable.DivertStatus = 3) AS TrackingError,
SUM(alltable.DivertStatus = 1) AS Unknown,
SUM(alltable.DivertStatus = 21) AS Unsafe
FROM alltable
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
GROUP BY hour(alltable.t_stamp)

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View File

@ -0,0 +1,97 @@
{
"custom": {},
"params": {
"Error_message": "none"
},
"propConfig": {
"params.Error_message": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 100,
"width": 242
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "200px"
},
"props": {
"color": "#FFFFFF",
"path": "material/error_outline",
"style": {
"backgroundColor": "#555555"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "250px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.Error_message"
},
"type": "property"
}
}
},
"props": {
"style": {
"backgroundColor": "#000000"
},
"textStyle": {
"color": "#FFFFFF",
"fontWeight": "bold",
"margin": 10,
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "200px"
},
"props": {
"direction": "column",
"style": {
"borderColor": "#FFFFFF",
"borderStyle": "solid",
"borderWidth": "1px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Error"
},
"props": {
"direction": "column",
"style": {
"classes": "Background-Styles/Controller"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,17 @@
{
"base": {
"style": {
"backgroundColor": "var(--error)",
"borderTopLeftRadius": "4px",
"borderTopRightRadius": "4px",
"borderBottomLeftRadius": "4px",
"borderBottomRightRadius": "4px",
"color": "var(--neutral-10)",
"fontSize": "12px",
"fontWeight": "bold",
"lineHeight": "16px",
"padding": "2px",
"textAlign": "center"
}
}
}

View File

@ -0,0 +1,732 @@
{
"custom": {
"FillColour": "value",
"alarm_message": null,
"covert_mode": true,
"disconnected": false,
"display_icon": true,
"error": false,
"isMatch": 0,
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"running": false,
"running_status": 0,
"searchId": "PLC01",
"show_error": false,
"show_running": true,
"state": 5,
"state_string": "Unknown"
},
"params": {
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.FillColour": {
"persistent": true
},
"custom.alarm_message": {
"persistent": true
},
"custom.covert_mode": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}",
"plc": "{view.custom.plc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.display_icon": {
"binding": {
"config": {
"expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0"
},
"type": "expr"
},
"persistent": true
},
"custom.error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.isMatch": {
"binding": {
"config": {
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
},
"type": "expr"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 4
},
{
"input": 2,
"output": 3
},
{
"input": 3,
"output": 2
},
{
"input": 4,
"output": 1
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"custom.running": {
"binding": {
"config": {
"expression": "{view.custom.running_status} \u003d 3"
},
"type": "expr"
},
"persistent": true
},
"custom.running_status": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.show_error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.show_running": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": 1
},
{
"input": 3,
"output": 2
},
{
"input": 2,
"output": 3
},
{
"input": 1,
"output": 4
},
{
"input": 0,
"output": 5
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 100,
"width": 100
}
},
"root": {
"children": [
{
"meta": {
"name": "Spiral"
},
"position": {
"height": 0.005,
"width": 0.005,
"x": 0.0225,
"y": 0.0277
},
"props": {
"params": {
"tagProps": [
"",
"",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "Symbol-Views/Equipment-Views/Spiral"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Spiral_Symbol"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,if({view.custom.running},{session.custom.colours.state5},{session.custom.colours.state0}),\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
},
{
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
"type": "expression"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": 101,
"output": "State-Styles/State101"
},
{
"input": 102,
"output": "State-Styles/State102"
},
{
"input": 103,
"output": "State-Styles/State103"
},
{
"input": 104,
"output": "State-Styles/State104"
},
{
"input": 105,
"output": "State-Styles/State105"
},
{
"input": 106,
"output": "State-Styles/State106"
},
{
"input": 201,
"output": "State-Styles/State201"
},
{
"input": 202,
"output": "State-Styles/State202"
},
{
"input": 203,
"output": "State-Styles/State203"
},
{
"input": 204,
"output": "State-Styles/State204"
},
{
"input": 205,
"output": "State-Styles/State205"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs2",
"name": "defs2",
"type": "defs"
},
{
"elements": [
{
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {},
"id": "path234",
"name": "path234",
"r": "6.303678",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.23"
},
"type": "circle"
},
{
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {
"paint": "transparent"
},
"id": "path234-7",
"name": "path234-7",
"r": "3.313657",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.221"
},
"type": "circle"
},
{
"d": "M 6.6188113,9.8749524 6.6103553,3.3542142",
"fill": {
"paint": "transparent"
},
"id": "path3429",
"name": "path3429",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.218"
},
"type": "path"
},
{
"d": "M 4.978764,9.47052 8.23181,3.819167",
"fill": {
"paint": "transparent"
},
"id": "path3429-8",
"name": "path3429-8",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.218"
},
"type": "path"
},
{
"d": "M 3.818909,8.2200703 9.461806,4.9523781",
"fill": {
"paint": "transparent"
},
"id": "path3429-8-2",
"name": "path3429-8-2",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.218"
},
"type": "path"
},
{
"d": "M 3.3168328,6.6175189 9.837571,6.6090589",
"fill": {
"paint": "transparent"
},
"id": "path3429-8-2-6",
"name": "path3429-8-2-6",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.218"
},
"type": "path"
},
{
"d": "M 3.7180036,4.9712623 6.8282074,6.7528116",
"fill": {
"paint": "transparent"
},
"id": "path3429-8-2-6-5",
"name": "path3429-8-2-6-5",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.219869"
},
"type": "path"
},
{
"d": "M 4.9523763,3.7647768 8.2200718,9.4076712",
"fill": {
"paint": "transparent"
},
"id": "path3429-8-2-6-5-5",
"name": "path3429-8-2-6-5-5",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.218"
},
"type": "path"
},
{
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {
"opacity": "1",
"paint": "#fefefe"
},
"id": "path234-7-0",
"name": "path234-7-0",
"r": "0.26523831",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.218"
},
"type": "circle"
}
],
"id": "layer1",
"name": "layer1",
"type": "group"
}
],
"style": {},
"viewBox": "0 0 13.229166 13.229167"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onDoubleClick": {
"config": {
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
},
"enabled": false,
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/Diagnostic"
},
{
"input": 2,
"output": "Alarms-Styles/Low"
},
{
"input": 3,
"output": "Alarms-Styles/Medium"
},
{
"input": 4,
"output": "Alarms-Styles/High"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.style.color": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", 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\")"
},
"type": "expr"
}
},
"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": {
"aspectRatio": "1:1",
"mode": "percent",
"style": {
"cursor": "pointer"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,7 @@
{
"base": {
"style": {
"color": "#808080"
}
}
}

View File

@ -0,0 +1,33 @@
{
"base": {
"style": {
"backgroundColor": "var(--neutral-10)",
"borderColor": "var(--warning)",
"borderStyle": "solid",
"borderWidth": "1px",
"boxShadow": "none",
"color": "var(--warning)",
"fontWeight": "normal",
"margin": "5px",
"textTransform": "uppercase",
"fill": "var(--warning)"
}
},
"variants": [
{
"pseudo": "hover",
"animation": {
"duration": "0.2s",
"direction": "normal",
"iterationCount": "1",
"timingFunction": "ease",
"keyframes": {
"0%": {},
"100%": {
"backgroundColor": "var(--neutral-20)"
}
}
}
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -0,0 +1,51 @@
def handleTagHighlight(view, currentValue):
tag_priority = currentValue.value
if tag_priority == None:
return
parts = str(tag_priority).split("||")
tag = parts[0]
splitedTag = tag.split("/")
deviceName = splitedTag[-1]
Docked_East_Map = {
"VFD" : "Docked-East-VFD",
"MCM" : "Docked-East-MCM"
}
Docked_East_View = Docked_East_Map["VFD"]
if "PE" in deviceName:
tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1"
if "MCM" in deviceName:
Docked_East_View = Docked_East_Map["MCM"]
components = view.rootContainer.getChildren()
priority = parts[1]
foundMatch = False
# clear all highlights and apply new one when found
for child in components:
params = child.props.get("params", {})
tagProps = params.get("tagProps", {})
tagsList = list(tagProps)
if len(tagsList) == 0:
continue
child.props.style.classes = ""
tagPath = tagsList[0]
if tag == tagPath:
child.props.style["classes"] = "Highlight/Pulse-" + priority
system.perspective.openDock(Docked_East_View, params={'tagProps': tagProps})
foundMatch = True
return foundMatch

View File

@ -0,0 +1,519 @@
{
"custom": {
"alarm_message": null,
"covert_mode": true,
"disconnected": true,
"display_icon": true,
"plc": "System",
"priority": 0,
"priority_string": "No Active Alarms",
"running": false,
"searchId": "PLC01",
"state": 0,
"state_string": "Off(Inactive)"
},
"params": {
"angle": 0,
"directionLeft": false,
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM01/Conveyor/UL1_3_VFD1",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.covert_mode": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t0, True,\r\n\t\t1, True,\r\n\t\t2, {session.custom.alarm_filter.show_running},\r\n\t\t3, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t4, True,\r\n\t\t5, True,\r\n\t\t6, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t7, True,\r\n\t\t8, True,\r\n\t\t9, True,\r\n\t\t13, True,\r\n\t\t14, True,\r\n\t\t61, True,\r\n 131, True,\t\r\n\t\tFalse )",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "!isGood({value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.display_icon": {
"binding": {
"config": {
"expression": "{this.custom.covert_mode} \u003e 0"
},
"type": "expr"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": 0
},
{
"input": 1,
"output": 0
},
{
"input": 2,
"output": 0
},
{
"input": 3,
"output": 4
},
{
"input": 4,
"output": 1
},
{
"input": 5,
"output": 3
},
{
"input": 6,
"output": 4
},
{
"input": 7,
"output": 1
},
{
"input": 8,
"output": 1
},
{
"input": 9,
"output": 1
},
{
"input": 13,
"output": 1
},
{
"input": 14,
"output": 2
},
{
"input": 61,
"output": 4
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": "Unknown",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "No Active Alarms"
},
{
"input": 1,
"output": "No Active Alarms"
},
{
"input": 2,
"output": "No Active Alarms"
},
{
"input": 3,
"output": "Diagnostic"
},
{
"input": 4,
"output": "High"
},
{
"input": 5,
"output": "Low"
},
{
"input": 6,
"output": "Diagnostic"
},
{
"input": 7,
"output": "High"
},
{
"input": 8,
"output": "High"
},
{
"input": 9,
"output": "High"
},
{
"input": 13,
"output": "High"
},
{
"input": 14,
"output": "Medium"
},
{
"input": 61,
"output": "Diagnostic"
},
{
"input": 131,
"output": "Medium"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.running": {
"binding": {
"config": {
"expression": "{view.custom.state} \u003d 1"
},
"type": "expr"
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n0, \"Off(Inactive)\",\r\n1, \"Enabled, Not Running\",\r\n2, \"Running\",\r\n3, \"Energy Management\",\r\n4, \"Jammed\",\r\n5, \"Full\",\r\n6, \"Maintenance Mode / Conveyor Stopped In Maintenance Mode\",\r\n7, \"Communication Fault\",\r\n8, \"VFD Fault\",\r\n9, \"E-Stop\",\r\n13,\"Encoder_Fault\",\r\n14,\"Stopped\",\r\n61,\"Conveyor Running In Maintenance Mode\",\r\n131, \"Disconnected\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.angle": {
"paramDirection": "input",
"persistent": true
},
"params.directionLeft": {
"paramDirection": "input",
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 20,
"width": 29
}
},
"root": {
"children": [
{
"meta": {
"name": "RunningStatus"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)"
},
"type": "expr"
}
},
"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, 7, 8, 9, 13, 14, 61, 131,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#00ffd0\", \"#ff8c00\",\r\n \"#0008ff\", \"#946446\", \"#ff0000\", \"#ff0000\", \"#ff0000\", \"#ff8c00\", \"#c2c2c2\", \"#B45C5C\", \"#c2c2c2\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
},
"type": "expr"
}
},
"props.style.transform": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},\"\")",
"type": "expression"
},
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "scaleX(-1)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"elements": [
{
"d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 30 30 Z",
"fill": {},
"name": "path",
"stroke": {
"paint": "#4c4c4c",
"width": "2"
},
"type": "path"
}
],
"style": {
"overflow": "hidden"
},
"viewBox": "-1.5 -1.5 73 63"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onDoubleClick": {
"config": {
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
},
"enabled": false,
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/High"
},
{
"input": 2,
"output": "Alarms-Styles/Medium"
},
{
"input": 3,
"output": "Alarms-Styles/Low"
},
{
"input": 4,
"output": "Alarms-Styles/Diagnostic"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"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"
}
},
"meta.visible": {
"binding": {
"config": {
"path": "view.custom.display_icon"
},
"type": "property"
}
},
"props.style.borderStyle": {
"binding": {
"config": {
"path": "view.custom.disconnected"
},
"enabled": false,
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "solid"
},
{
"input": false,
"output": "none"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"justify": "center",
"style": {
"borderColor": "#FF0000",
"borderStyle": "none",
"borderWidth": "2px",
"cursor": "pointer"
}
},
"type": "ia.container.flex"
}
}

View File

@ -0,0 +1,32 @@
def build_row(**kwargs):
"""
Args:
Any number of arguments using kwargs key = value format.
Key StyleClass is used for adding formatting to the row.
StyleClass = {classes:value}
Returns:
A python dict with style formatting for perspective tables..
Raises:
KeyError: Raises an exception.
"""
row = {}
column ={}
for key,value in kwargs.items():
if key != "StyleClass":
column[key]={"value":value}
row["value"]=column
style_class = kwargs.get("StyleClass")
row["style"] = style_class
return row
def build_row_with_view(**kwargs):
row = {}
column ={}
for key,value in kwargs.items():
if key != "StyleClass":
column[key]= value
row["value"]=column
style_class = kwargs.get("StyleClass")
row["style"] = style_class
return row

View File

@ -0,0 +1,656 @@
{
"custom": {
"FillColour": "value",
"alarm_message": null,
"covert_mode": true,
"disconnected": false,
"display_icon": true,
"error": false,
"isMatch": 0,
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"running": false,
"running_status": 0,
"searchId": "value",
"show_error": false,
"show_running": true,
"state": 5,
"state_string": "Unknown"
},
"params": {
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.FillColour": {
"persistent": true
},
"custom.alarm_message": {
"persistent": true
},
"custom.covert_mode": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}",
"plc": "{view.custom.plc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.display_icon": {
"binding": {
"config": {
"expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0"
},
"type": "expr"
},
"persistent": true
},
"custom.error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.isMatch": {
"binding": {
"config": {
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
},
"type": "expr"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 4
},
{
"input": 2,
"output": 3
},
{
"input": 3,
"output": 2
},
{
"input": 4,
"output": 1
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"custom.running": {
"binding": {
"config": {
"expression": "{view.custom.running_status} \u003d 3"
},
"type": "expr"
},
"persistent": true
},
"custom.running_status": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.show_error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.show_running": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": 1
},
{
"input": 3,
"output": 2
},
{
"input": 2,
"output": 3
},
{
"input": 1,
"output": 4
},
{
"input": 0,
"output": 5
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 100,
"width": 100
}
},
"root": {
"children": [
{
"meta": {
"name": "PPI"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
},
{
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
"type": "expression"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": 101,
"output": "State-Styles/State101"
},
{
"input": 102,
"output": "State-Styles/State102"
},
{
"input": 103,
"output": "State-Styles/State103"
},
{
"input": 104,
"output": "State-Styles/State104"
},
{
"input": 105,
"output": "State-Styles/State105"
},
{
"input": 106,
"output": "State-Styles/State106"
},
{
"input": 201,
"output": "State-Styles/State201"
},
{
"input": 202,
"output": "State-Styles/State202"
},
{
"input": 203,
"output": "State-Styles/State203"
},
{
"input": 204,
"output": "State-Styles/State204"
},
{
"input": 205,
"output": "State-Styles/State205"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs1",
"name": "defs1",
"type": "defs"
},
{
"elements": [
{
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {},
"id": "path1",
"name": "path1",
"r": "6.019948",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "circle"
},
{
"d": "m 2.1166666,8.5242134 h 3.175",
"fill": {
"paint": "transparent"
},
"id": "path2",
"name": "path2",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
},
{
"d": "M 7.9374999,8.5242134 H 11.112492",
"fill": {
"paint": "transparent"
},
"id": "path3",
"name": "path3",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
},
{
"d": "M 5.1593748,4.183724 V 8.4170573",
"fill": {
"paint": "transparent"
},
"id": "path5",
"name": "path5",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
},
{
"d": "m 8.2020833,4.1405926 h -3.175",
"fill": {
"paint": "transparent"
},
"id": "path6",
"name": "path6",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
},
{
"d": "M 8.0697914,4.183724 V 8.4170573",
"fill": {
"paint": "transparent"
},
"id": "path7",
"name": "path7",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
}
],
"id": "layer1",
"name": "layer1",
"type": "group"
}
],
"style": {},
"viewBox": "0 0 13.229166 13.229167"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onDoubleClick": {
"config": {
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
},
"enabled": false,
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/Diagnostic"
},
{
"input": 2,
"output": "Alarms-Styles/Low"
},
{
"input": 3,
"output": "Alarms-Styles/Medium"
},
{
"input": 4,
"output": "Alarms-Styles/High"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.style.color": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", 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\")"
},
"type": "expr"
}
},
"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": {
"aspectRatio": "1:1",
"mode": "percent",
"style": {
"cursor": "pointer"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,447 @@
{
"custom": {},
"params": {
"tagProps": [
"",
"",
"PLC",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 148,
"width": 362
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Spacer1"
},
"position": {
"basis": "20px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "NameField"
},
"position": {
"basis": "50px"
},
"props": {
"text": "NAME"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Spacer"
},
"position": {
"basis": "100px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DeviceName"
},
"position": {
"basis": "205px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "/root.custom.name"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Name"
},
"position": {
"basis": "35px"
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Spacer1"
},
"position": {
"basis": "20px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "NameField"
},
"position": {
"basis": "50px"
},
"props": {
"text": "PRIORITY"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Spacer"
},
"position": {
"basis": "100px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Priority"
},
"position": {
"basis": "205px"
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"expression": "{/root.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": "Alarms-Styles/Critical"
},
{
"input": 3,
"output": "Alarms-Styles/High"
},
{
"input": 2,
"output": "Alarms-Styles/Medium"
},
{
"input": 1,
"output": "Alarms-Styles/Low"
},
{
"input": 0,
"output": "Alarms-Styles/Diagnostic"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "/root.custom.priority"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": "Critical"
},
{
"input": 3,
"output": "High"
},
{
"input": 2,
"output": "Medium"
},
{
"input": 1,
"output": "Low"
},
{
"input": 0,
"output": "Warning"
},
{
"input": 5,
"output": "No active alarms"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"textAlign": "left"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Priority"
},
"position": {
"basis": "35px"
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Spacer1"
},
"position": {
"basis": "20px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "NameField"
},
"position": {
"basis": "50px"
},
"props": {
"text": "TIMESTAMP"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Spacer"
},
"position": {
"basis": "100px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DeviceName"
},
"position": {
"basis": "205px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "/root.custom.timestamp"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "EventTime"
},
"position": {
"basis": "35px"
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Spacer1"
},
"position": {
"basis": "20px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "NameField"
},
"position": {
"basis": "50px"
},
"props": {
"text": "DURATION"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Spacer"
},
"position": {
"basis": "91px"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Spacer_0"
},
"position": {
"basis": "199px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "/root.custom.duration"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "EventTime_0"
},
"position": {
"basis": "40px"
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel"
}
},
"type": "ia.container.flex"
}
],
"custom": {
"delay": 2000,
"duration": "",
"enable": true,
"name": "",
"priority": "",
"timestamp": ""
},
"meta": {
"name": "root"
},
"propConfig": {
"custom.active_bit": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"1": "{view.params.tagProps[1]}"
},
"tagPath": "{0}/Alarms/{1}.IsActive"
},
"type": "tag"
}
},
"custom.shelved_bit": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"1": "{view.params.tagProps[1]}"
},
"tagPath": "{0}/Alarms/{1}.IsShelved"
},
"type": "tag"
}
},
"custom.update": {
"binding": {
"config": {
"expression": "now({this.custom.delay})"
},
"type": "expr"
},
"onChange": {
"enabled": null,
"script": "\tif self.custom.enable:\n\t\t\n\t\timport time\n\t\t\n\t\tdef convert(millis):\n\t\t\tmillis \u003d int(millis)\n\t\t\tseconds\u003d(millis/1000)%60\n\t\t\tseconds \u003d int(seconds)\n\t\t\tminutes\u003d(millis/(1000*60))%60\n\t\t\tminutes \u003d int(minutes)\n\t\t\thours\u003d(millis/(1000*60*60))\n\t\t\treturn(\"%d:%d:%d\" % (hours, minutes, seconds))\n\t\t\n\t\tdef update_custom_properties(name, timestamp, duration, priority):\n\t\t\tself.custom.name \u003d name\n\t\t\tself.custom.timestamp \u003d timestamp\n\t\t\tself.custom.duration \u003d duration\n\t\t\tself.custom.priority \u003d priority\n\t\t\n\t\tdef get_alarms():\n\t\t\talarm_dict \u003d system.tag.readBlocking(\"System/ActiveAlarms\")\n\t\t\talarms_decoded \u003d system.util.jsonDecode(alarm_dict[0].value)\n\t\t\treturn alarms_decoded\n\t\t\t\n\t\tdef get_tag_config():\n\t\t\tname \u003d\"\"\n\t\t\tpath \u003d self.view.params.tagProps[0]\n\t\t\tif system.tag.exists(path) and path !\u003d \"\":\n\t\t\t\ttag_config \u003d system.tag.getConfiguration(path)[0]\n\t\t\t\talarms \u003d tag_config.get(\"alarms\")\n\t\t\t\tfor alarm in alarms:\n\t\t\t\t\tif alarm.get(\"name\") \u003d\u003d self.view.params.tagProps[1]:\n\t\t\t\t\t\tname \u003d alarm.get(\"AdditionalInfo\")\n\t\t\t\t\t\tbreak\n\t\t\t\ttimestamp \u003d \"N/A\"\n\t\t\t\tduration \u003d \"N/A\"\n\t\t\t\tpriority \u003d 5\n\t\t\t\tupdate_custom_properties(name, timestamp, duration, priority)\n\t\t\t\t\t\n\t\tdef get_active_alarm():\n\t\t\ttagPath \u003d self.view.params.tagProps[0]\n\t\t\tprops_alarm_name \u003d str(self.view.params.tagProps[1])\n\t\t\ttag_display_path \u003d tagPath + \"/\" + props_alarm_name\n\t\t\talarms \u003d get_alarms()\n\t\t\tfor i in alarms:\n\t\t\t\tdisplaypath \u003d alarms[i].get(\"DisplayPath\")\n\t\t\t\talarm_name \u003d alarms[i].get(\"Name\")\n\t\t\t\tsystem.perspective.print(displaypath)\n\t\t\t\tif tag_display_path \u003d\u003d displaypath:\n\t\t\t\t\tname \u003d alarms[i].get(\"AddInfo\")\n\t\t\t\t\ttimestamp \u003d alarms[i].get(\"TimeStamp\")\n\t\t\t\t\tduration \u003d alarms[i].get(\"Duration\")\n\t\t\t\t\tduration \u003d convert(duration)\n\t\t\t\t\tpriority \u003d alarms[i].get(\"Priority\")\n\t\t\t\t\tupdate_custom_properties(name, timestamp, duration, priority)\n\t\t\t\t\tbreak\n\t\t\t\t\t\n\t\tif self.custom.active_bit and not self.custom.shelved_bit:\n\t\t\tget_active_alarm()\n\t\t\t\n\t\telse:\n\t\t\talarms \u003d get_tag_config()"
}
}
},
"props": {
"direction": "column",
"style": {
"borderRadius": "10x",
"borderStyle": "solid",
"classes": "PopUp-Styles/Information-Device"
}
},
"type": "ia.container.flex"
}
}

View File

@ -0,0 +1,773 @@
{
"custom": {
"api_region_name": "na",
"bucket_options": [
{
"label": "Image Files",
"value": "na-ignition-image-repo"
},
{
"label": "Source Files",
"value": "na-ignition-image-source"
}
],
"default_query_params": {
"bucket": null,
"object_key": null,
"site": null,
"view": null
},
"destination_view_suffix": null,
"object_key": null,
"stage_config": {
"account_id": "925510716640",
"endpoint": "https://scada-s3-management.narme-scada.rme.amazon.dev/",
"lambda_name": "RMESDScadaS3ManagementFlaskLambda-prod",
"region": "us-east-2",
"repo_bucket": "na-ignition-image-repo",
"s3_region": "us-east-1",
"source_bucket": "na-ignition-image-source"
},
"view_options_by_site_and_bucket": [],
"view_suffix": null,
"whid_options": []
},
"params": {
"query_params": {
"bucket": null,
"object_key": null,
"site": null,
"view": null
}
},
"propConfig": {
"custom.api_region_name": {
"binding": {
"config": {
"path": "session.custom.aws.prefix"
},
"type": "property"
},
"persistent": true
},
"custom.bucket_options": {
"binding": {
"config": {
"path": "view.custom.stage_config"
},
"transforms": [
{
"code": "\treturn [{\u0027value\u0027: value.repo_bucket, \u0027label\u0027: \u0027Image Files\u0027},\n\t\t\t{\u0027value\u0027: value.source_bucket, \u0027label\u0027: \u0027Source Files\u0027}]",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"custom.default_query_params": {
"persistent": true
},
"custom.object_key": {
"binding": {
"config": {
"path": "view.params.query_params"
},
"transforms": [
{
"code": "\tstage_config \u003d self.custom.stage_config\n\tbucket \u003d self.params.query_params.bucket\n\tsite \u003d self.params.query_params.site\n\tview \u003d self.params.query_params.view\n\tif bucket and site and view:\n\t\tif bucket \u003d\u003d stage_config.repo_bucket:\n\t\t\tsuffix \u003d \u0027.svg\u0027\n\t\t\tsubfolder \u003d \u0027images\u0027\n\t\telse:\n\t\t\tsuffix \u003d \u0027.drawio\u0027\n\t\t\tsubfolder \u003d \u0027source\u0027\n\t\treturn \"SCADA/%s/%s/%s%s\" % (site, subfolder, view, suffix)\n\telse:\n\t\treturn None\n",
"type": "script"
}
],
"type": "property"
},
"onChange": {
"enabled": null,
"script": "\td \u003d self.params.query_params\n\tif getattr(currentValue, \u0027value\u0027, None):\n\t\tself.params.query_params.object_key \u003d currentValue.value\n\t"
},
"persistent": true
},
"custom.stage_config": {
"binding": {
"config": {
"expression": "{view.custom.api_region_name}"
},
"transforms": [
{
"code": "\treturn AWS.s3.STAGE_CONFIG[\u0027prod\u0027][value]",
"type": "script"
}
],
"type": "expr"
},
"persistent": true
},
"custom.view_options_by_site_and_bucket": {
"binding": {
"config": {
"expression": "{view.params.query_params.site}+{view.params.query_params.bucket}"
},
"transforms": [
{
"code": "\tbucket \u003d self.params.query_params.bucket\n\tsite \u003d self.params.query_params.site\n\tif bucket and site:\n\t\tfrom AWS.s3 import S3Manager\n\t\tfrom helper.helper import sanitize_tree\n\t\tfrom pprint import pformat\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.view.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(api_stage, api_region_name, username)\n\t\tsuffix \u003d self.custom.view_suffix\n\t\tfiles \u003d sanitize_tree(s3m.fetch_object_list_by_site_and_bucket(site, bucket))\n\t\treturn [{\u0027value\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027), \n\t\t\t\t\u0027label\u0027: x[\u0027Filename\u0027].replace(suffix,\u0027\u0027)} for x in files]\n\treturn []",
"type": "script"
}
],
"type": "expr"
},
"persistent": true
},
"custom.view_suffix": {
"binding": {
"config": {
"path": "view.params.query_params.bucket"
},
"transforms": [
{
"code": "\tif value:\n\t\tstage_config \u003d self.custom.stage_config\n\t\tif value \u003d\u003d stage_config.get(\u0027repo_bucket\u0027, None):\n\t\t\treturn \".svg\"\n\t\tif value \u003d\u003d stage_config.get(\"source_bucket\", None):\n\t\t\treturn \".drawio\"\n\treturn value",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"custom.whid_options": {
"binding": {
"config": {
"path": "view.params.query_params.bucket"
},
"transforms": [
{
"code": "\tif value:\n\t\tfrom AWS.s3 import S3Manager\n\t\t\n\t\tapi_stage \u003d \u0027prod\u0027\n\t\tusername \u003d self.session.props.auth.user.userName\n\t\tapi_region_name \u003d self.custom.api_region_name\n\t\t\n\t\ts3m \u003d S3Manager(\u0027prod\u0027, api_region_name, username)\n\t\t\n\t\treturn [{\u0027value\u0027: x, \u0027label\u0027: x} for x in s3m.fetch_site_list(value)]\n\treturn []",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"params.query_params": {
"onChange": {
"enabled": null,
"script": "\tif not missedEvents and origin in (\u0027Binding\u0027, \u0027Script\u0027, \u0027BindingWriteback\u0027):\n\t\tpayload \u003d currentValue.value\n\t\tsystem.perspective.sendMessage(\u0027list_versions_query_params_changed\u0027, payload, scope\u003d\u0027session\u0027)\n\t\t"
},
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 600
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"borderStyle": "none",
"classes": "Framework/Card/Title_transparent"
},
"text": "Select Query Params"
},
"type": "ia.display.label"
},
{
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\t# reset query params to default values \n\t# (stored in `view.custom.default_query_params`)\n\tself.view.params.query_params \u003d self.view.custom.default_query_params"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Clear Button",
"tooltip": {
"enabled": true,
"location": "bottom-right",
"text": "Clear Selections"
}
},
"position": {
"shrink": 0
},
"props": {
"image": {
"icon": {
"path": "material/clear_all"
}
},
"primary": false,
"style": {
"classes": "Input/Button/Secondary_minimal"
},
"text": ""
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\t# refresh version table query via message handler\n\tsystem.perspective.sendMessage(\u0027refresh_version_table_data\u0027, scope\u003d\u0027session\u0027)\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Refresh Button",
"tooltip": {
"enabled": true,
"location": "bottom-right",
"text": "Refresh Data"
}
},
"position": {
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026!isNull({view.params.query_params.site})\r\n\u0026\u0026!isNull({view.params.query_params.view})\r\n\u0026\u0026!isNull({view.params.query_params.object_key})"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/refresh"
}
},
"primary": false,
"style": {
"classes": "Input/Button/Secondary_minimal"
},
"text": ""
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"grow": 1
},
"props": {
"justify": "flex-end"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer Header"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "Framework/Card/Title_transparent",
"marginBottom": "2px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "125px",
"shrink": 0
},
"props": {
"style": {
"classes": "Framework/Card/Label",
"textAlign": "right"
},
"text": "Bucket"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Dropdown"
},
"position": {
"basis": "540px",
"grow": 1
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": "view.custom.bucket_options"
},
"type": "property"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"path": "view.params.query_params.bucket"
},
"type": "property"
}
}
},
"props": {
"dropdownOptionStyle": {
"overflowWrap": "break-word",
"whiteSpace": "normal"
},
"showClearIcon": true
},
"type": "ia.input.dropdown"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.view.params.query_params.bucket \u003d None\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Clear Button"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026{view.params.query_params.bucket}!\u003d\u0027\u0027"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/clear"
}
},
"primary": false,
"style": {
"classes": "Input/Button/Secondary_minimal"
},
"text": ""
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Bucket"
},
"position": {
"basis": "100%",
"grow": 1
},
"props": {
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_1"
},
"position": {
"shrink": 0
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "125px",
"shrink": 0
},
"props": {
"style": {
"classes": "Framework/Card/Label",
"textAlign": "right"
},
"text": "Site"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Dropdown"
},
"position": {
"basis": "540px",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026len({view.params.query_params.bucket})\u003e0"
},
"type": "expr"
}
},
"props.options": {
"binding": {
"config": {
"path": "view.custom.whid_options"
},
"type": "property"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"path": "view.params.query_params.site"
},
"type": "property"
}
}
},
"props": {
"dropdownOptionStyle": {
"overflowWrap": "break-word",
"whiteSpace": "normal"
},
"showClearIcon": true
},
"type": "ia.input.dropdown"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.view.params.query_params.site \u003d None\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Clear Button"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "!isNull({view.params.query_params.site})\r\n\u0026\u0026{view.params.query_params.site}!\u003d\u0027\u0027"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/clear"
}
},
"primary": false,
"style": {
"classes": "Input/Button/Secondary_minimal"
},
"text": ""
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Site"
},
"position": {
"basis": "100%",
"grow": 1
},
"props": {
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_2"
},
"position": {
"shrink": 0
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "125px",
"shrink": 0
},
"props": {
"style": {
"classes": "Framework/Card/Label",
"textAlign": "right"
},
"text": "View"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Dropdown"
},
"position": {
"basis": "540px",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "!isNull({view.params.query_params.bucket})\r\n\u0026\u0026len({view.params.query_params.bucket})\u003e0\r\n\u0026\u0026!isNull({view.params.query_params.site})\r\n\u0026\u0026len({view.params.query_params.site})\u003e0"
},
"type": "expr"
}
},
"props.options": {
"binding": {
"config": {
"path": "view.custom.view_options_by_site_and_bucket"
},
"type": "property"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"path": "view.params.query_params.view"
},
"type": "property"
}
}
},
"props": {
"dropdownOptionStyle": {
"overflowWrap": "break-word",
"whiteSpace": "normal"
},
"showClearIcon": true
},
"type": "ia.input.dropdown"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.view.params.query_params.view \u003d None\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Clear Button"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "!isNull({view.params.query_params.view})\r\n\u0026\u0026{view.params.query_params.view}!\u003d\u0027\u0027"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/clear"
}
},
"primary": false,
"style": {
"classes": "Input/Button/Secondary_minimal"
},
"text": ""
},
"type": "ia.input.button"
}
],
"meta": {
"name": "View"
},
"position": {
"basis": "100%",
"grow": 1
},
"props": {
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_3"
},
"position": {
"shrink": 0
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "125px",
"shrink": 0
},
"props": {
"style": {
"classes": "Framework/Card/Label",
"textAlign": "right"
},
"text": "Object Key"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_0"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.query_params.object_key"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Framework/Card/Value",
"textAlign": "left"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Object Key"
},
"position": {
"basis": "100%",
"grow": 1
},
"props": {
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_4"
},
"position": {
"shrink": 0
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,19 @@
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
concat(round(COUNT(*)/COUNT(*) * 100,2),'%') AS Inducted,
concat(round(SUM(alltable.ACTUAL_DEST <> 'S03999')/COUNT(*) * 100,2),'%') AS Sorted,
concat(round(SUM(alltable.DivertStatus = 7)/COUNT(*) * 100,2),'%') AS DestinationInvalid,
concat(round(SUM(alltable.DivertStatus = 16)/COUNT(*) * 100,2),'%') AS DestinationNone,
concat(round(SUM(alltable.DivertStatus = 12)/COUNT(*) * 100,2),'%') AS DestinationDisabled,
concat(round(SUM(alltable.DivertStatus = 5)/COUNT(*) * 100,2),'%') AS DestinationFull,
concat(round(SUM(alltable.DivertStatus = 2)/COUNT(*) * 100,2),'%') AS Unexpected,
concat(round(SUM(alltable.DivertStatus = 6)/COUNT(*) * 100,2),'%') AS DestinationFault,
concat(round(SUM(alltable.DivertStatus = 14)/COUNT(*) * 100,2),'%') AS DivertFail,
concat(round(SUM(alltable.DivertStatus = 4)/COUNT(*) * 100,2),'%') AS GapError,
concat(round(SUM(alltable.DivertStatus = 17)/COUNT(*) * 100,2),'%') AS Lost,
concat(round(SUM(alltable.DivertStatus = 3)/COUNT(*) * 100,2),'%') AS TrackingError,
concat(round(SUM(alltable.DivertStatus = 1)/COUNT(*) * 100,2),'%') AS Unknown,
concat(round(SUM(alltable.DivertStatus = 21)/COUNT(*) * 100,2),'%') AS Unsafe
FROM alltable
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
GROUP BY hour(alltable.t_stamp)

View File

@ -0,0 +1,141 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "Image"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.source": {
"binding": {
"config": {
"expression": "\"http://127.0.0.1:5500/VFD.svg?var\" + toMillis(now(1000))"
},
"type": "expr"
}
}
},
"props": {
"fit": {
"mode": "fill"
}
},
"type": "ia.display.image"
},
{
"meta": {
"name": "UL1_3_JR_PB1"
},
"position": {
"height": 0.1648,
"width": 0.0964,
"x": 0.0719,
"y": 0.1736
},
"props": {
"params": {
"forceFaultStatus": null,
"tagProps": [
"System/MCM01/Station/JR/UL1_3_JR_PB1",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "Symbol-Views/Equipment-Views/JR_Button"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL1_3_JR_PB2"
},
"position": {
"height": 0.1648,
"width": 0.0964,
"x": 0.0719,
"y": 0.6255
},
"props": {
"params": {
"forceFaultStatus": null,
"tagProps": [
"System/MCM01/Station/JR/UL1_3_JR_PB2",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "Symbol-Views/Equipment-Views/JR_Button"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "UL1_3_VFD1"
},
"position": {
"height": 0.2333,
"width": 0.1224,
"x": 0.427,
"y": 0.367
},
"props": {
"params": {
"directionLeft": false,
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"/System/MCM01/Conveyor/VFD/UL1_3_VFD1",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "Symbol-Views/Equipment-Views/Status"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#FFFFFF"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,7 @@
{
"base": {
"style": {
"backgroundColor": "#EEEEEE"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,510 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "DPM"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"params": {
"con_lines": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"con_lines_visible": [
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"in": false,
"out": false
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_TO_HUB"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3012_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3012_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.1667
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL1038_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.3333
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL1034_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.6667
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL1038_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.8333
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3020_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.375
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3016_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.5
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3016_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.625
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3020_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.75
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL1034_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.5
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3024_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.25
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FL3024_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.125,
"y": -0.0009
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0069,
"y": 0.5394
},
"props": {
"text": "FL1034_2_VFD1 11.200.1.80",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.7315
},
"props": {
"text": "FL1034_4_EX1 11.200.1.81",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.8981
},
"props": {
"text": "FL1038_2_VFD1 11.200.1.82",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.3986
},
"props": {
"text": "FL1038_4_EX1 11.200.1.83",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD5_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.2324
},
"props": {
"text": "FL3012_2_VFD1 11.200.1.84",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD6_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.0653
},
"props": {
"text": "FL3012_4_EX1 11.200.1.85",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD7_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.5062,
"y": 0.167
},
"props": {
"text": "FL3016_2_VFD1 11.200.1.86",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD8_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.6312,
"y": 0.167
},
"props": {
"text": "FL3016_4_EX1 11.200.1.87",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD9_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.75,
"y": 0.167
},
"props": {
"text": "FL3020_2_VFD1 11.200.1.88",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD10_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.3879,
"y": 0.167
},
"props": {
"text": "FL3020_4_EX1 11.200.1.89",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD11_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.316,
"y": 0.167
},
"props": {
"text": "FL3024_2_VFD1 11.200.1.90",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD12_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.2077,
"y": 0.167
},
"props": {
"text": "FL3024_4_EX1 11.200.1.91",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "FL3016_2_DPM1"
},
"position": {
"height": 0.0694,
"width": 0.101,
"x": 0.4491,
"y": 0.6407
},
"props": {
"text": "FL3016_2_DPM1 11.200.1.6",
"textStyle": {
"fontSize": "2vmin"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,17 @@
{
"base": {
"style": {
"backgroundColor": "var(--neutral-20)",
"borderBottomColor": "var(--neutral-30)",
"borderBottomStyle": "solid",
"borderBottomWidth": "1px",
"color": "var(--neutral-80)",
"fontSize": "12px",
"fontWeight": "bold",
"paddingLeft": "6px",
"paddingRight": "6px",
"textTransform": "uppercase",
"fill": "var(--neutral-70)"
}
}
}

View File

@ -0,0 +1,300 @@
{
"custom": {
"disconnected": true,
"plc": "System",
"priority": 0,
"priority_string": "Medium",
"searchId": "PLC01",
"state": 0,
"state_string": "Disabled",
"type": 0
},
"params": {
"directionLeft": false,
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/D2C/D2C_Chute_1",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "!isGood({value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n if(\r\n {view.custom.state} \u003d 0 || {view.custom.state} \u003d 3,\r\n {view.custom.state},\r\n 0\r\n ),\r\n 0, 0,\r\n 3, 3,\r\n 0\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 {view.custom.state} \u003c\u003d 6,\r\n {view.custom.state},\r\n 0\r\n ),\r\n 0, 0,\r\n 1, 2,\r\n 2, 3,\r\n 3, 3,\r\n 4, 1,\r\n 5, 3,\r\n 6, 3,\r\n 0\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n if(\r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 {view.custom.state} \u003c\u003d 4,\r\n {view.custom.state},\r\n 0\r\n ),\r\n 0, 0,\r\n 1, 2,\r\n 2, 3,\r\n 3, 3,\r\n 4, 1,\r\n 0\r\n ),\r\n 0\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Medium\u0027,\r\n 3, \u0027Low\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Medium\u0027,\r\n 1, \u0027Low\u0027,\r\n 2, \u0027Low\u0027,\r\n 3, \u0027No Active Alarms\u0027,\r\n 4, \u0027Low\u0027,\r\n 5, \u0027Low\u0027,\r\n 6, \u0027High\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Medium\u0027,\r\n 1, \u0027No Active Alarms\u0027,\r\n 2, \u0027Low\u0027,\r\n 3, \u0027Low\u0027,\r\n 4, \u0027High\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 3,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027No Active Alarms\u0027,\r\n 1, \u0027Low\u0027,\r\n 2, \u0027High\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n \u0027Unknown\u0027\r\n )\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
},
"onChange": {
"enabled": null,
"script": "\tif self.custom.priority not in [1, 2, 3, 4, 5, 6, 0]:\n\t self.custom.priority_string \u003d \"Unknown\""
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Disabled\u0027,\r\n 3, \u0027Full\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 1,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Disabled\u0027,\r\n 1, \u0027No Container\u0027,\r\n 2, \u0027Ready To Be Enabled\u0027,\r\n 3, \u0027Enabled\u0027,\r\n 4, \u0027Half Full\u0027,\r\n 5, \u0027Full\u0027,\r\n 6, \u0027Jammed\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Disabled\u0027,\r\n 1, \u0027Enabled\u0027,\r\n 2, \u0027Half Full\u0027,\r\n 3, \u0027Full\u0027,\r\n 4, \u0027Jammed\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 3,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027Enabled\u0027,\r\n 1, \u0027Full\u0027,\r\n 2, \u0027Jammed\u0027,\r\n \u0027Unknown\u0027\r\n ),\r\n \u0027Unknown\u0027\r\n )\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
},
"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}/Chute_Type"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"params.directionLeft": {
"paramDirection": "input",
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 20,
"width": 29
}
},
"root": {
"children": [
{
"meta": {
"name": "RunningStatus"
},
"position": {
"grow": 1
},
"propConfig": {
"position.rotate.angle": {
"binding": {
"config": {
"path": "view.params.directionLeft"
},
"transforms": [
{
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
"type": "expression"
}
],
"type": "property"
}
},
"props.elements[0].fill.paint": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#FFFFFF\",\r\n if(\r\n {view.custom.type} \u003d 0,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027#c2c2c2\u0027,\r\n 3, \u0027#0000FF\u0027,\r\n \u0027#fff700\u0027\r\n ),\r\n if( \r\n {view.custom.type} \u003d 1,\r\n case(\r\n {view.custom.state},\r\n 1, \u0027#FF4487\u0027,\r\n 2, \u0027#92FF00\u0027,\r\n 3, \u0027#CCFFCC\u0027,\r\n 4, \u0027#FFFF00\u0027,\r\n 5, \u0027#0000FF\u0027,\r\n 6, \u0027#FF8C00\u0027,\r\n \u0027#fff700\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 2,\r\n case(\r\n {view.custom.state},\r\n 0, \u0027#c2c2c2\u0027,\r\n 1, \u0027#CCFFCC\u0027,\r\n 2, \u0027#FFFF00\u0027,\r\n 3, \u0027#0000FF\u0027,\r\n 4, \u0027#FF8C00\u0027,\r\n \u0027#FFFFFF\u0027\r\n ),\r\n if(\r\n {view.custom.type} \u003d 3, \r\n case(\r\n {view.custom.state},\r\n 0, \u0027#CCFFCC\u0027,\r\n 1, \u0027#0000FF\u0027,\r\n 2, \u0027#FF8C00\u0027,\r\n \u0027#FFFFFF\u0027\r\n ),\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n )\r\n )\r\n)\r\n"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 0 0 Z",
"fill": {},
"name": "path",
"stroke": {
"paint": "#4c4c4c",
"width": 3
},
"type": "path"
}
],
"style": {
"overflow": "hidden"
},
"viewBox": "-1.5 -1.5 73 63"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East-SNP\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/High"
},
{
"input": 2,
"output": "Alarms-Styles/Medium"
},
{
"input": 3,
"output": "Alarms-Styles/Low"
},
{
"input": 4,
"output": "Alarms-Styles/Diagnostic"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"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"
}
}
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

View File

@ -0,0 +1,58 @@
{
"custom": {},
"params": {
"text": "value"
},
"propConfig": {
"params.text": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 30,
"width": 210
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "209px",
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "{view.params.text}"
},
"type": "expr"
}
}
},
"props": {
"style": {
"classes": "Text/LeftAlign_with_Padding"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"alignItems": "center",
"justify": "center",
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
}

View File

@ -0,0 +1,715 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "DPM"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"params": {
"con_lines": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"con_lines_visible": [
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
false
],
"in": false,
"out": false
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_TO_HUB"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "BYAB_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0232,
"y": 0.4991
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0094,
"y": 0.5394
},
"props": {
"text": "BYAB_2_VFD1 11.200.1.82",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_3"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.023,
"y": 0.6677
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.7315
},
"props": {
"text": "BYAB_3_VFD1 11.200.1.83",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0216,
"y": 0.8333
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.8981
},
"props": {
"text": "BYAB_4_VFD1 11.200.1.84",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_5"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.3333
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.3986
},
"props": {
"text": "BYAB_5_VFD1 11.200.1.85",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_6"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.1667
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD5_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.2324
},
"props": {
"text": "BYAB_6_VFD1 11.200.1.86",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_7"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0244,
"y": -0.0009
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD6_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.0653
},
"props": {
"text": "BYAB_7_VFD1 11.200.1.87",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_8"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.5
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD7_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.5117,
"y": 0.1662
},
"props": {
"text": "BYAB_8_VFD1 11.200.1.88",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_9"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.625
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD8_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.6312,
"y": 0.1664
},
"props": {
"text": "BYAB_9_VFD1 11.200.1.89",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_10"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.75
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD9_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.75,
"y": 0.1664
},
"props": {
"text": "BYAB_10_VFD1 11.200.1.90",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYDB_6"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.375
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD10_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.3864,
"y": 0.1664
},
"props": {
"text": "BYDB_6_VFD1 11.200.1.91",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYDB_7"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.2516,
"y": 0.0019
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD11_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.315,
"y": 0.1682
},
"props": {
"text": "BYDB_7_VFD1 11.200.1.92",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYDB_8"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.1245,
"y": -0.0009
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD12_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.2072,
"y": 0.1646
},
"props": {
"text": "BYDB_8_VFD1 11.200.1.93",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYDB_9"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.8509,
"y": 0.3332
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD13_label"
},
"position": {
"height": 0.0358,
"width": 0.0427,
"x": 0.9488,
"y": 0.3943
},
"props": {
"text": "BYDB_9_VFD1 11.200.1.94",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYDB_10"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.8514,
"y": 0.1667
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD14_label"
},
"position": {
"height": 0.0358,
"width": 0.0427,
"x": 0.9488,
"y": 0.2276
},
"props": {
"text": "BYDB_10_VFD1 11.200.1.95",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYDB_11"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.8528
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD15_label"
},
"position": {
"height": 0.0358,
"width": 0.0427,
"x": 0.9493,
"y": 0.0619
},
"props": {
"text": "BYDB_11_VFD1 11.200.1.96",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYBD_5"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.8509,
"y": 0.4988
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD16_label"
},
"position": {
"height": 0.0358,
"width": 0.0427,
"x": 0.9488,
"y": 0.561
},
"props": {
"text": "BYBD_5_VFD1 11.200.1.97",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYBD_6"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.8488,
"y": 0.6645
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "VFD17_label"
},
"position": {
"height": 0.0358,
"width": 0.0427,
"x": 0.9467,
"y": 0.7267
},
"props": {
"text": "BYBD_6_VFD1 11.200.1.98",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "FIO1_label"
},
"position": {
"height": 0.0358,
"width": 0.0427,
"x": 0.9325,
"y": 0.8933
},
"props": {
"text": "BYAB_2_FIO1 11.200.1.99",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "BYAB_2_FIO1"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.8378,
"y": 0.8302
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/FIO_SIO"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "BYAB_7_DPM1"
},
"position": {
"height": 0.0694,
"width": 0.101,
"x": 0.4498,
"y": 0.6342
},
"props": {
"text": "BYAB_7_DPM1 11.200.1.5",
"textStyle": {
"fontSize": "2vmin"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,171 @@
{
"custom": {
"filter_list": [
{
"color": "#8B008B",
"filter_id": 5,
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"text": "CP30"
},
{
"color": "#8B008B",
"filter_id": 3,
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"text": "CP71"
},
{
"color": "#8B008B",
"filter_id": 4,
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"text": "CP72"
}
]
},
"params": {
"filters": [
{
"color": "#8B008B",
"column": "controller",
"group": 0,
"id": 3,
"text": "CP71"
},
{
"color": "#8B008B",
"column": "controller",
"group": 0,
"id": 4,
"text": "CP72"
},
{
"color": "#8B008B",
"column": "controller",
"group": 0,
"id": 5,
"text": "CP30"
}
],
"group_name": "value"
},
"propConfig": {
"custom.filter_list": {
"binding": {
"config": {
"path": "view.params.filters"
},
"transforms": [
{
"code": "\tinstances \u003d []\n\tfor filter in value:\n\t\tinstance \u003d {\"instanceStyle\": {\n\t\t \t\t\t\"classes\": \"\"},\n\t\t \t\t\t \"instancePosition\": {}}\n\t \tinstance[\u0027text\u0027] \u003d filter.text\n\t \tinstance[\u0027color\u0027] \u003d filter.color\n\t \tinstance[\u0027filter_id\u0027] \u003d filter.id\n\t \tinstances.append(instance)\n\t\n\treturn sorted(instances, key\u003dlambda d: d[\u0027text\u0027])",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"params.filters": {
"paramDirection": "input",
"persistent": true
},
"params.group_name": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 178,
"width": 214
}
},
"root": {
"children": [
{
"meta": {
"name": "Title"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "UPPER({view.params.group_name})"
},
"type": "expr"
}
}
},
"props": {
"style": {
"borderBottomStyle": "solid",
"borderBottomWidth": 1,
"classes": "Title/Text",
"fontSize": 13,
"marginLeft": "10%",
"marginRight": "10%",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Filters"
},
"position": {
"basis": "138px",
"shrink": 0
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"path": "view.params.filters"
},
"transforms": [
{
"code": "\treturn sorted(value, key\u003dlambda d: d[\u0027text\u0027])",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"alignContent": "flex-start",
"direction": "column",
"path": "Objects/PowerTable/FilterMenuItem",
"style": {
"marginBottom": 5,
"marginLeft": "12%",
"marginRight": "12%"
},
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
SELECT
concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') AS StartTimestamp,
concat('H', TIMESTAMPDIFF(HOUR, DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"), DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) AS Hour,
concat(CAST(COUNT(*) AS CHAR), ' pph') AS Total_count
FROM alltable
WHERE alltable.t_stamp BETWEEN :starttime AND :endtime
GROUP BY date(alltable.t_stamp), hour(alltable.t_stamp)

View File

@ -0,0 +1,9 @@
{
"base": {
"style": {
"backgroundColor": "#FFFFFF",
"color": "#000000",
"fontFamily": "Arial"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
import sys
def error_handler(whid, logger_name):
logger_name = "%s-%s" % (whid, logger_name)
logger = system.util.getLogger(logger_name)
provider = "[%s_SCADA_TAG_PROVIDER]" % (whid)
exc_type, exc_obj, tb = sys.exc_info()
lineno = tb.tb_lineno
logger.error("Error: %s, %s, %s" % (lineno, exc_type, exc_obj))
system.tag.writeBlocking([provider + "System/wbsckt_running"], [0])

View File

@ -0,0 +1,10 @@
{
"base": {
"style": {
"backgroundColor": "#00CC00",
"color": "#FFFFFF",
"fontFamily": "Arial",
"fontWeight": "bold"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@ -0,0 +1,175 @@
{
"custom": {
"activityLogger": {
"start_time": {
"$": [
"ts",
192,
1709760479262
],
"$ts": 1709760479262
}
},
"show_alarms": false
},
"events": {
"system": {
"onShutdown": {
"config": {
"script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)"
},
"scope": "G",
"type": "script"
},
"onStartup": {
"config": {
"script": "\tself.custom.activityLogger.start_time \u003d system.date.now()"
},
"scope": "G",
"type": "script"
}
}
},
"params": {
"detailedView": "",
"plcTagPath": ""
},
"propConfig": {
"custom.activityLogger": {
"persistent": true
},
"custom.activityLogger.alt_pageid": {
"binding": {
"config": {
"expression": "\"detailed_views/\"+ {view.params.detailedView}"
},
"type": "expr"
}
},
"custom.activityLogger.pageid": {
"binding": {
"config": {
"expression": "{page.props.path}"
},
"transforms": [
{
"code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()",
"type": "script"
}
],
"type": "expr"
}
},
"custom.show_alarms": {
"persistent": true
},
"params.detailedView": {
"paramDirection": "input",
"persistent": true
},
"params.plcTagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"props.params.PLCTagPath": {
"binding": {
"config": {
"path": "view.params.plcTagPath"
},
"type": "property"
}
}
},
"props": {
"path": "Alarm-Views/Docked-Alarm"
},
"type": "ia.display.view"
}
],
"custom": {
"key": "value"
},
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "130px",
"display": false
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "show-south-dock",
"pageScope": true,
"script": "\tshow \u003d payload[\"show_alarms\"]\n\tsystem.perspective.print(show)\n\tself.position.display \u003d show",
"sessionScope": true,
"viewScope": false
}
]
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"props.path": {
"binding": {
"config": {
"expression": "\"Detailed-Views/\"+ {view.params.detailedView}"
},
"type": "expr"
}
}
},
"type": "ia.display.view"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"id": "Docked-East",
"type": "close"
},
"scope": "C",
"type": "dock"
}
}
},
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,604 @@
{
"custom": {
"FillColour": "value",
"alarm_message": null,
"covert_mode": true,
"disconnected": false,
"display_icon": true,
"error": false,
"isMatch": 0,
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"running": false,
"running_status": 0,
"searchId": "value",
"show_error": false,
"show_running": true,
"state": 5,
"state_string": "Unknown"
},
"params": {
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.FillColour": {
"persistent": true
},
"custom.alarm_message": {
"persistent": true
},
"custom.covert_mode": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}",
"plc": "{view.custom.plc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.display_icon": {
"binding": {
"config": {
"expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0"
},
"type": "expr"
},
"persistent": true
},
"custom.error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.isMatch": {
"binding": {
"config": {
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
},
"type": "expr"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 4
},
{
"input": 2,
"output": 3
},
{
"input": 3,
"output": 2
},
{
"input": 4,
"output": 1
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"custom.running": {
"binding": {
"config": {
"expression": "{view.custom.running_status} \u003d 3"
},
"type": "expr"
},
"persistent": true
},
"custom.running_status": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.show_error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.show_running": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": 1
},
{
"input": 3,
"output": 2
},
{
"input": 2,
"output": 3
},
{
"input": 1,
"output": 4
},
{
"input": 0,
"output": 5
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 100,
"width": 100
}
},
"root": {
"children": [
{
"meta": {
"name": "Photocell (Lift)"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
},
{
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
"type": "expression"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": 101,
"output": "State-Styles/State101"
},
{
"input": 102,
"output": "State-Styles/State102"
},
{
"input": 103,
"output": "State-Styles/State103"
},
{
"input": 104,
"output": "State-Styles/State104"
},
{
"input": 105,
"output": "State-Styles/State105"
},
{
"input": 106,
"output": "State-Styles/State106"
},
{
"input": 202,
"output": "State-Styles/State201"
},
{
"input": 201,
"output": "State-Styles/State202"
},
{
"input": 203,
"output": "State-Styles/State203"
},
{
"input": 204,
"output": "State-Styles/State204"
},
{
"input": 205,
"output": "State-Styles/State205"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs1",
"name": "defs1",
"type": "defs"
},
{
"elements": [
{
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {},
"id": "path1",
"name": "path1",
"r": "6.0761814",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "circle"
},
{
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {
"opacity": "1",
"paint": "#000000"
},
"id": "path2",
"name": "path2",
"rx": "0.5251264",
"ry": "0.52512622",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.272664"
},
"type": "ellipse"
}
],
"id": "layer1",
"name": "layer1",
"type": "group"
}
],
"style": {},
"viewBox": "0 0 13.229166 13.229167"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onDoubleClick": {
"config": {
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
},
"enabled": false,
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/Diagnostic"
},
{
"input": 2,
"output": "Alarms-Styles/Low"
},
{
"input": 3,
"output": "Alarms-Styles/Medium"
},
{
"input": 4,
"output": "Alarms-Styles/High"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.style.color": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", 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\")"
},
"type": "expr"
}
},
"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": {
"aspectRatio": "1:1",
"mode": "percent",
"style": {
"cursor": "pointer"
}
},
"type": "ia.container.coord"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,151 @@
{
"custom": {},
"params": {
"address": "test",
"params": {},
"path": "",
"system": {},
"title": "Card Title",
"useDefaultHeight": false,
"useDefaultWidth": false
},
"propConfig": {
"params.address": {
"paramDirection": "input",
"persistent": true
},
"params.params": {
"paramDirection": "input",
"persistent": true
},
"params.path": {
"paramDirection": "input",
"persistent": true
},
"params.system": {
"paramDirection": "input",
"persistent": true
},
"params.title": {
"paramDirection": "input",
"persistent": true
},
"params.useDefaultHeight": {
"paramDirection": "input",
"persistent": true
},
"params.useDefaultWidth": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 339,
"width": 369
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "20px",
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.title"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Framework/Card/Title"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.params": {
"binding": {
"config": {
"path": "view.params.params"
},
"type": "property"
}
},
"props.params.address": {
"binding": {
"config": {
"path": "view.params.address"
},
"type": "property"
}
},
"props.params.system": {
"binding": {
"config": {
"path": "view.params.system"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"path": "view.params.path"
},
"type": "property"
}
},
"props.useDefaultViewHeight": {
"binding": {
"config": {
"path": "view.params.useDefaultHeight"
},
"type": "property"
}
},
"props.useDefaultViewWidth": {
"binding": {
"config": {
"path": "view.params.useDefaultWidth"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Framework/Card/Embedded"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "Framework/Card/Card"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -0,0 +1,224 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/APF_VFD"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button"
},
"position": {
"height": 0.1259,
"rotate": {
"anchor": "100% 129%"
},
"width": 0.1091,
"x": 0.0546,
"y": 0.1862
},
"props": {
"text": "APF/VFD"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/Station_JR"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button_0"
},
"position": {
"height": 0.1296,
"rotate": {
"anchor": "75% 25%"
},
"width": 0.1211,
"x": 0.2349,
"y": 0.1825
},
"props": {
"text": "Station_JR"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/Station_EPC"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button_1"
},
"position": {
"height": 0.1313,
"rotate": {
"anchor": "100% -106%"
},
"width": 0.1187,
"x": 0.4282,
"y": 0.1812
},
"props": {
"text": "Station_EPC"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/Field_Devices"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button_2"
},
"position": {
"height": 0.1313,
"rotate": {
"anchor": "100% -106%"
},
"width": 0.1187,
"x": 0.6228,
"y": 0.1812
},
"props": {
"text": "SIO FIO HUB"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/MCM"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button_3"
},
"position": {
"height": 0.1313,
"rotate": {
"anchor": "100% -106%"
},
"width": 0.1187,
"x": 0.8134,
"y": 0.1803
},
"props": {
"text": "MCM"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/SS_PB"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button_4"
},
"position": {
"height": 0.1313,
"rotate": {
"anchor": "100% -106%"
},
"width": 0.1187,
"x": 0.5287,
"y": 0.3839
},
"props": {
"text": "Start/Stop"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"page": "/Extendo"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Button_5"
},
"position": {
"height": 0.1313,
"rotate": {
"anchor": "100% -106%"
},
"width": 0.1187,
"x": 0.3313,
"y": 0.3858
},
"props": {
"text": "Extendo"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,648 @@
{
"custom": {
"alarm_message": null,
"covert_mode": true,
"disconnected": false,
"display_icon": true,
"error": false,
"isMatch": 0,
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"running_status": 0,
"searchId": "PLC01",
"state": 5,
"state_string": "Unknown"
},
"params": {
"directionLeft": false,
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.alarm_message": {
"persistent": true
},
"custom.covert_mode": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"fc": "{session.custom.fc}",
"plc": "{view.custom.plc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
},
"transforms": [
{
"expression": "if(isNull({value}), False, {value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.display_icon": {
"binding": {
"config": {
"expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0"
},
"type": "expr"
},
"persistent": true
},
"custom.error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.isMatch": {
"binding": {
"config": {
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
},
"type": "expr"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 4
},
{
"input": 2,
"output": 3
},
{
"input": 3,
"output": 2
},
{
"input": 4,
"output": 1
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"custom.running_status": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": 1
},
{
"input": 3,
"output": 2
},
{
"input": 2,
"output": 3
},
{
"input": 1,
"output": 4
},
{
"input": 0,
"output": 5
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.directionLeft": {
"paramDirection": "input",
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 25,
"width": 25
}
},
"root": {
"children": [
{
"meta": {
"name": "PressureSwitch_2"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
},
{
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
"type": "expression"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": 101,
"output": "State-Styles/State101"
},
{
"input": 102,
"output": "State-Styles/State102"
},
{
"input": 103,
"output": "State-Styles/State103"
},
{
"input": 104,
"output": "State-Styles/State104"
},
{
"input": 105,
"output": "State-Styles/State105"
},
{
"input": 106,
"output": "State-Styles/State106"
},
{
"input": 201,
"output": "State-Styles/State201"
},
{
"input": 202,
"output": "State-Styles/State202"
},
{
"input": 203,
"output": "State-Styles/State203"
},
{
"input": 204,
"output": "State-Styles/State204"
},
{
"input": 205,
"output": "State-Styles/State205"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
}
},
"props": {
"elements": [
{
"elements": [
{
"elements": [
{
"id": "stop1507",
"name": "stop1507",
"offset": "0",
"stopColor": "#020101",
"stopOpacity": "1",
"style": {
"stopColor": "#020101",
"stopOpacity": "1"
},
"type": "stop"
}
],
"id": "linearGradient1509",
"name": "linearGradient1509",
"type": "linearGradient"
},
{
"gradientTransform": "matrix(1.0156665,0,0,0.98457489,-0.22712617,-0.22017344)",
"gradientUnits": "userSpaceOnUse",
"href": "#linearGradient1509",
"id": "linearGradient3055",
"name": "linearGradient3055",
"type": "linearGradient",
"x1": "2.4719212",
"x2": "5.6080947",
"y1": "4.8826461",
"y2": "4.8826461"
}
],
"id": "defs2",
"name": "defs2",
"type": "defs"
},
{
"elements": [
{
"fill": {
"opacity": 1
},
"height": "11.216189",
"id": "rect5779",
"name": "rect5779",
"stroke": {
"dasharray": "none",
"linejoin": "round",
"paint": "#000000",
"width": 1.2
},
"style": {
"paintOrder": "stroke fill markers"
},
"type": "rect",
"width": "11.21619",
"x": "7.7715612e-16",
"y": "0"
},
{
"elements": [
{
"fill": {
"opacity": "1",
"url": "url(#linearGradient3055)"
},
"id": "tspan1453",
"name": "tspan1453",
"stroke": {
"dasharray": "none",
"width": "0.116835"
},
"text": "P",
"type": "tspan",
"x": "0.99078566",
"y": "9.0214157"
}
],
"fill": {
"opacity": "1",
"url": "url(#linearGradient3055)"
},
"id": "text1455",
"name": "text1455",
"stroke": {
"dasharray": "none",
"linejoin": "round",
"paint": "#000000",
"width": "0.116835"
},
"style": {
"InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027",
"fontFamily": "\u0027Arial Narrow\u0027",
"fontSize": "9.7785px",
"paintOrder": "stroke fill markers"
},
"text": "P",
"transform": "scale(0.98457515,1.0156665)",
"type": "text",
"x": "0.99078566",
"y": "9.0214157"
},
{
"d": "M 7.1327097,2.9635882 9.9122555,5.8103519 6.9937326,8.2419488",
"fill": {
"opacity": "0.0131332",
"paint": "#020101"
},
"id": "path3213",
"name": "path3213",
"stroke": {
"dasharray": "none",
"linejoin": "round",
"paint": "#000000",
"width": "0.663625"
},
"style": {
"paintOrder": "stroke fill markers"
},
"type": "path"
}
],
"id": "layer1",
"name": "layer1",
"transform": "translate(0.22362278,0.22362278)",
"type": "group"
}
],
"preserveAspectRatio": "none",
"style": {},
"viewBox": "0 0 11.663437 11.663435"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onDoubleClick": {
"config": {
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
},
"enabled": false,
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/Diagnostic"
},
{
"input": 2,
"output": "Alarms-Styles/Low"
},
{
"input": 3,
"output": "Alarms-Styles/Medium"
},
{
"input": 4,
"output": "Alarms-Styles/High"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.style.color": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
"type": "expression"
}
],
"type": "property"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", 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\")"
},
"type": "expr"
}
},
"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": {
"mode": "percent",
"style": {
"cursor": "pointer"
}
},
"type": "ia.container.coord"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,334 @@
{
"custom": {
"disconnected": true,
"plc": "MCM",
"priority": 0,
"priority_string": "No Active Alarms",
"searchId": "PLC01",
"state": 0,
"state_string": "Normal"
},
"params": {
"forceFaultStatus": null,
"forceRunningStatus": null,
"has_state": false,
"tagProps": [
"MCM",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"propConfig": {
"custom.disconnected": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "!isGood({value})",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.plc": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"expression": "split({value}, \"/\")[0]",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": 0,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 2,
"output": 1
},
{
"input": 3,
"output": 1
},
{
"input": 4,
"output": 1
},
{
"input": 5,
"output": 1
},
{
"input": 6,
"output": 1
},
{
"input": 7,
"output": 1
},
{
"input": 8,
"output": 1
},
{
"input": 9,
"output": 0
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"custom.priority_string": {
"binding": {
"config": {
"expression": "case({view.custom.priority},\r\n1, \"High\",\r\n0, \"No Active Alarms\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"custom.searchId": {
"binding": {
"config": {
"path": "session.custom.searchId"
},
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
}
],
"type": "tag"
},
"persistent": true
},
"custom.state_string": {
"binding": {
"config": {
"expression": "case({view.custom.state},\r\n1, \"Motor Was Faulted\",\r\n2, \"Power Branch Was Faulted\",\r\n3, \"Low Air Pressure Fault Was Present\",\r\n4, \"Encoder Fault\",\r\n5, \"Jam Fault\",\r\n6, \"Communication Faulted\",\r\n7, \"Estop Was Actuated\",\r\n8, \"Estopped Locally\",\r\n9, \"System Started\",\r\n0, \"Normal\",\r\n\"Unknown\")"
},
"type": "expr"
},
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.forceRunningStatus": {
"paramDirection": "input",
"persistent": true
},
"params.has_state": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 46,
"width": 68
}
},
"root": {
"children": [
{
"meta": {
"name": "MCM"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"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, 7, 8, 9, \r\n \"#B3B3B3\", \"#FF0000\", \"#FF0000\", \"#FF0000\", \"#FF8C00\",\r\n \"#FF8C00\", \"#FF0000\", \"#FF0000\", \"#FF0000\", \"#00FF00\",\r\n \"#FFFF00\"\r\n )\r\n)\r\n"
},
"type": "expr"
},
"onChange": {
"enabled": false,
"script": ""
}
},
"props.elements[1].style.fill": {
"binding": {
"config": {
"path": "view.custom.disconnected"
},
"transforms": [
{
"fallback": "#000000",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "#FFFFFF"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"elements": [
{
"d": "M 1 0 H 60 V 40 H 1 Z",
"fill": {},
"name": "path",
"stroke": {
"paint": "#4c4c4c",
"width": 4
},
"type": "path"
},
{
"style": {
"classes": "",
"fontWeight": "bold"
},
"text": "MCM",
"type": "text",
"x": 11,
"y": 26
}
],
"preserveAspectRatio": "none",
"viewBox": "-0.5 -0.5 62 41"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East-MCM\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Alarms-Styles/High"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"meta.tooltip.text": {
"binding": {
"config": {
"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"
}
}
},
"props": {
"aspectRatio": "68:47",
"mode": "percent",
"style": {
"cursor": "pointer",
"overflow": "hidden"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,13 @@
{
"base": {
"animation": {
"duration": "1s",
"keyframes": {
"0%": {
"backgroundColor": "#FF8000B3"
},
"100%": {}
}
}
}
}

View File

@ -0,0 +1,11 @@
{
"base": {
"style": {
"borderColor": "#CCCCCC",
"borderStyle": "solid",
"borderWidth": "1px",
"borderRadius": "4px",
"padding": "4px"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,19 @@
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
concat(cast(COUNT(*) as char),' pph') AS Inducted,
concat(cast(SUM(alltable.ACTUAL_DEST <> 'S03999') as char),' pph') AS Sorted,
concat(cast(SUM(alltable.DivertStatus = 7) as char),' pph') AS DestinationInvalid,
concat(cast(SUM(alltable.DivertStatus = 16) as char),' pph') AS DestinationNone,
concat(cast(SUM(alltable.DivertStatus = 12) as char),' pph') AS DestinationDisabled,
concat(cast(SUM(alltable.DivertStatus = 5) as char),' pph') AS DestinationFull,
concat(cast(SUM(alltable.DivertStatus = 2) as char),' pph') AS Unexpected,
concat(cast(SUM(alltable.DivertStatus = 6) as char),' pph') AS DestinationFault,
concat(cast(SUM(alltable.DivertStatus = 14) as char),' pph') AS DivertFail,
concat(cast(SUM(alltable.DivertStatus = 4) as char),' pph') AS GapError,
concat(cast(SUM(alltable.DivertStatus = 17) as char),' pph') AS Lost,
concat(cast(SUM(alltable.DivertStatus = 3) as char),' pph') AS TrackingError,
concat(cast(SUM(alltable.DivertStatus = 1) as char),' pph') AS Unknown,
concat(cast(SUM(alltable.DivertStatus = 21) as char),' pph') AS Unsafe
FROM alltable
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
GROUP BY hour(alltable.t_stamp)

View File

@ -0,0 +1,13 @@
{
"base": {
"animation": {
"duration": "1s",
"keyframes": {
"0%": {
"backgroundColor": "#007DFA"
},
"100%": {}
}
}
}
}

View File

@ -0,0 +1,66 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 400
}
},
"root": {
"children": [
{
"custom": {
"params": {},
"path": "value"
},
"meta": {
"name": "EmbeddedView"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"props.params.params": {
"binding": {
"config": {
"path": "this.custom.params"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"path": "this.custom.path"
},
"type": "property"
}
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "select-side-view",
"pageScope": true,
"script": "\t# implement your handler here\n\tself.custom.path \u003d payload.get(\"path\")\n\tself.custom.params \u003d payload.get(\"params\")\n\tsystem.perspective.print(payload)\n\t",
"sessionScope": true,
"viewScope": false
}
]
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

View File

@ -0,0 +1,476 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "DPM"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"params": {
"con_lines": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"con_lines_visible": [
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"in": false,
"out": false
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_TO_HUB"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS2_1"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS1_5"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.1667
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS1_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.3333
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS1_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.6667
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS1_3"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.8333
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS2_6"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.2484
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS2_5"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.375
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS2_2"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.5
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS2_3"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.625
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS2_4"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.75
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS1_1"
},
"position": {
"height": 0.1667,
"width": 0.125,
"x": 0.0229,
"y": 0.5
},
"props": {
"path": "Windows/Tabs/Enternet Windows/Components/APF"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "PS1_4_DPM1"
},
"position": {
"height": 0.0694,
"width": 0.101,
"x": 0.457,
"y": 0.6319
},
"props": {
"text": "PS1_4_DPM1 11.200.1.10",
"textStyle": {
"fontSize": "2vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD1"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0094,
"y": 0.5394
},
"props": {
"text": "PS1_1_VFD1 11.200.1.169",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD2"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.7315
},
"props": {
"text": "PS1_2_VFD1 11.200.1.170",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD3"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.8981
},
"props": {
"text": "PS1_3_VFD1 11.200.1.171",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD4"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.3986
},
"props": {
"text": "PS1_4_VFD1 11.200.1.172",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD5"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.2324
},
"props": {
"text": "PS1_5_VFD1 11.200.1.173",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD6"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.0068,
"y": 0.0653
},
"props": {
"text": "PS2_1_VFD1 11.200.1.174",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD7"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.5187,
"y": 0.1667
},
"props": {
"text": "PS2_2_VFD1 11.200.1.175",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD8"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.6432,
"y": 0.1667
},
"props": {
"text": "PS2_3_VFD1 11.200.1.176",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD9"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.7437,
"y": 0.1667
},
"props": {
"text": "PS2_4_VFD1 11.200.1.177",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD10"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.4385,
"y": 0.1667
},
"props": {
"text": "PS2_5_VFD1 11.200.1.178",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "VFD11"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.3174,
"y": 0.1667
},
"props": {
"text": "PS2_6_VFD1 11.200.1.179",
"textStyle": {
"fontSize": "1vmin",
"key": "value"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,410 @@
{
"custom": {
"counts": {
"Critical": 0,
"Diagnostic": 0,
"High": 1,
"Low": 1,
"Medium": 0,
"Total": 2
},
"totalAlarms": {
"$": [
"ds",
192,
1752066852881
],
"$columns": [
{
"data": [
null,
"MCM01",
"MCM01"
],
"name": "Location",
"type": "String"
},
{
"data": [
"Low",
"High",
"Low"
],
"name": "Priority",
"type": "String"
},
{
"data": [
1,
1,
1
],
"name": "Count",
"type": "Long"
}
]
}
},
"params": {
"value": {
"tagProps": [
"MCM01",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
}
},
"propConfig": {
"custom.counts": {
"persistent": true
},
"custom.totalAlarms": {
"binding": {
"config": {
"polling": {
"enabled": true,
"rate": "3"
},
"queryPath": "GetActiveAlarmsByLocationAndPriority"
},
"type": "query"
},
"onChange": {
"enabled": null,
"script": "\tMCM \u003d self.params.value.tagProps[0]\n\tqueryData \u003d currentValue.value\n\t\n\t# Initialize counts\n\tcounts \u003d {\n\t \"Critical\": 0,\n\t \"High\": 0,\n\t \"Medium\": 0,\n\t \"Low\": 0,\n\t \"Diagnostic\": 0,\n\t \"Total\": 0\n\t}\n\t\n\t# Loop through dataset and aggregate\n\tfor row in range(queryData.rowCount):\n\t mcm_val \u003d queryData.getValueAt(row, 0)\n\t severity \u003d queryData.getValueAt(row, 1)\n\t count \u003d queryData.getValueAt(row, 2)\n\t\n\t if mcm_val \u003d\u003d MCM:\n\t key \u003d severity.capitalize()\n\t if key in counts:\n\t counts[key] +\u003d count\n\t counts[\"Total\"] +\u003d count\n\t \n\tself.custom.counts \u003d counts"
},
"persistent": true
},
"params.value": {
"paramDirection": "input",
"persistent": true
},
"params.value.tagProps": {
"onChange": {
"enabled": null,
"script": "\tsystem.perspective.print(currentValue.value[0])"
}
}
},
"props": {
"defaultSize": {
"height": 50,
"width": 300
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Label_0"
},
"position": {
"basis": "32px"
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
},
"text": "High"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_1"
},
"position": {
"basis": "32px"
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
},
"text": "Med"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_2"
},
"position": {
"basis": "32px"
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
},
"text": "Low"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_3"
},
"position": {
"basis": "32px"
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
},
"text": "Diag"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_4"
},
"position": {
"basis": "32px"
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
},
"text": "Total"
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "25px"
},
"props": {
"justify": "space-between"
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label_0"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.counts.High"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_1"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.counts.Medium"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_2"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.counts.Low"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_3"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.counts.Diagnostic"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_4"
},
"position": {
"basis": "32px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.counts.Total"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "Text-Styles/Ariel-Bold-12pt",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_1"
},
"position": {
"basis": "25px"
},
"props": {
"justify": "space-between"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"custom.has_role": {
"binding": {
"config": {
"expression": "{session.custom.fc}"
},
"transforms": [
{
"code": "\trme_role \u003d value +\"-rme-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles):\n\t\treturn True\n\telse:\n\t\treturn False",
"type": "script"
}
],
"type": "expr"
}
},
"custom.status": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
},
"transforms": [
{
"expression": "if(isNull({value}), 0, {value})",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": 1
},
{
"input": 3,
"output": 2
},
{
"input": 2,
"output": 3
},
{
"input": 1,
"output": 4
},
{
"input": 0,
"output": 5
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
}
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

View File

@ -0,0 +1,92 @@
{
"custom": {},
"params": {
"enabled": true,
"placeholder": "",
"target_message_handler": null,
"val": ""
},
"propConfig": {
"params.enabled": {
"paramDirection": "input",
"persistent": true
},
"params.placeholder": {
"paramDirection": "input",
"persistent": true
},
"params.target_message_handler": {
"paramDirection": "input",
"persistent": true
},
"params.val": {
"onChange": {
"enabled": null,
"script": "\tval \u003d currentValue.value\n\tif val:\n\t\tif self.params.target_message_handler:\n\t\t\tsystem.perspective.sendMessage(\n\t\t\t\tself.params.target_message_handler,\n\t\t\t\t{\u0027value\u0027: val},\n\t\t\t\tscope\u003d\u0027session\u0027\n\t\t\t)\n"
},
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 32,
"width": 200
}
},
"root": {
"children": [
{
"meta": {
"name": "Field Number"
},
"position": {
"basis": "172px",
"grow": 1,
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.enabled"
},
"type": "property"
}
},
"props.placeholder": {
"binding": {
"config": {
"path": "view.params.placeholder"
},
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.val"
},
"overlayOptOut": true,
"type": "property"
}
}
},
"props": {
"style": {
"margin": "2px",
"marginRight": "26px"
}
},
"type": "ia.input.text-field"
}
],
"meta": {
"name": "root"
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
}
}

Some files were not shown because too many files have changed in this diff Show More