Compare commits
9 Commits
3d267e2406
...
7f2131471d
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f2131471d | |||
|
|
6f8b306321 | ||
|
|
9d8c62fc9c | ||
|
|
e946eaee1c | ||
|
|
0608c94ed0 | ||
|
|
73d7f3fcaf | ||
|
|
00d04f632d | ||
|
|
fc4fd3bbe9 | ||
| fdafbbfe26 |
|
After Width: | Height: | Size: 6.0 KiB |
@ -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)
|
||||||
@ -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)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 6.8 KiB |
@ -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)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 5.8 KiB |
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"type": "AllOf",
|
||||||
|
"securityLevels": [
|
||||||
|
{
|
||||||
|
"name": "Authenticated",
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
SELECT DISTINCT destination_act AS lane
|
||||||
|
FROM package_history
|
||||||
|
WHERE destination_act IS NOT NULL
|
||||||
|
UNION
|
||||||
|
SELECT DISTINCT lane_id AS lane
|
||||||
|
FROM pe_history
|
||||||
|
WHERE lane_id LIKE "CH%" OR lane_id LIKE "RS%1CH"
|
||||||
|
ORDER BY lane ASC;
|
||||||
@ -0,0 +1,290 @@
|
|||||||
|
{
|
||||||
|
"custom": {},
|
||||||
|
"params": {
|
||||||
|
"meta": {
|
||||||
|
"name": "VFD"
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"config": {
|
||||||
|
"enableHighlight": true,
|
||||||
|
"isClickable": false
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"color": {
|
||||||
|
"left": "#B3B3B3",
|
||||||
|
"right": "#D3D3D3"
|
||||||
|
},
|
||||||
|
"showAlways": true,
|
||||||
|
"tagPath": "[default]MCP03/RO02/RO02_03/VFD",
|
||||||
|
"tooltip": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"params.meta": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.meta.name": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.props": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"defaultSize": {
|
||||||
|
"height": 105,
|
||||||
|
"width": 500
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "VFD"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 64,
|
||||||
|
"width": 64,
|
||||||
|
"x": 67.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Graphics"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "try(\r\n\tjsonSet({value}, \"showAlways\", true),\r\n\t{view.params.props.status}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"config": {
|
||||||
|
"enableHighlight": false,
|
||||||
|
"isClickable": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.vfd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Label_15"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 75,
|
||||||
|
"x": 195,
|
||||||
|
"y": 40
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"textAlign": "right"
|
||||||
|
},
|
||||||
|
"text": "Status:"
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "lbStatus"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": "calc(100% - 300px)",
|
||||||
|
"x": 280,
|
||||||
|
"y": 40
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Graphics"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"code": "\treturn utils.extractStatus(value)",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"fontSize": "14px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textOverview": "ellipsis",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Label_1"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 75,
|
||||||
|
"x": 195,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"textAlign": "right"
|
||||||
|
},
|
||||||
|
"text": "Name: "
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "lbName"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": "calc(100% - 300px)",
|
||||||
|
"x": 280,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Parameters.LabelFull"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({value}, \u0027\u0027)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"fontSize": "14px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textOverview": "ellipsis",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Label_12"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 75,
|
||||||
|
"x": 195,
|
||||||
|
"y": 75
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"textAlign": "right"
|
||||||
|
},
|
||||||
|
"text": "Panel:"
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "lbStatus_0"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": "calc(100% - 300px)",
|
||||||
|
"x": 280,
|
||||||
|
"y": 75
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Parameters.OPC_Server"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({value}, \"Unknown\")",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"fontSize": "14px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textOverview": "ellipsis",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"name": "root"
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"background-color": "#CFCFCF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.container.coord"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"animation": {
|
||||||
|
"duration": "1s",
|
||||||
|
"keyframes": {
|
||||||
|
"0%": {
|
||||||
|
"backgroundColor": "#00CC00"
|
||||||
|
},
|
||||||
|
"100%": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,38 @@
|
|||||||
|
WITH SORTERS AS (
|
||||||
|
SELECT
|
||||||
|
DATE_FORMAT(MIN(s04_timestamp), "%Y-%m-%d %H:%i:00") AS time,
|
||||||
|
COUNT(*) AS total,
|
||||||
|
SUM(sort_code="Success") AS success,
|
||||||
|
SUM(sort_code IN ("Dest Invalid", "Dest None", "Underutilized")) AS awcs,
|
||||||
|
SUM(sort_code IN ("Dest Disabled", "Dest Full", "Dim Error", "Unexpected", "Weight Err")) AS operational,
|
||||||
|
SUM(sort_code IN ("Dest Fault", "Div Fail", "Gap Err", "Lost", "Rate High", "Track Err", "Unknown", "Unsafe")) AS machine,
|
||||||
|
SUM(sort_code IN ("No Read", "No Code", "Multi Label")) AS scanner
|
||||||
|
FROM package_history
|
||||||
|
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||||
|
AND sorter = :sorter
|
||||||
|
GROUP BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:%i:00")
|
||||||
|
ORDER BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:%i:00")
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
time,
|
||||||
|
/* Counts: */
|
||||||
|
total AS total_count,
|
||||||
|
success AS success_count,
|
||||||
|
awcs AS awcs_issues_count,
|
||||||
|
operational AS operational_issues_count,
|
||||||
|
machine AS machine_issues_count,
|
||||||
|
scanner AS scanner_issues_count,
|
||||||
|
/* PPH: */
|
||||||
|
ROUND(total*60) AS total_pph,
|
||||||
|
ROUND(success*60) AS success_pph,
|
||||||
|
ROUND(awcs*60) AS awcs_issues_pph,
|
||||||
|
ROUND(operational*60) AS operational_issues_pph,
|
||||||
|
ROUND(machine*60) AS machine_issues_pph,
|
||||||
|
ROUND(scanner*60) AS scanner_issues_pph,
|
||||||
|
/* Percents: */
|
||||||
|
ROUND(success/total, 4) AS success_percent,
|
||||||
|
ROUND(awcs/total, 4) AS awcs_issues_percent,
|
||||||
|
ROUND(operational/total, 4) AS operational_issues_percent,
|
||||||
|
ROUND(machine/total, 4) AS machine_issues_percent,
|
||||||
|
ROUND(scanner/total, 4) AS scanner_issues_percent
|
||||||
|
FROM SORTERS;
|
||||||
|
After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"borderStyle": "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 7.0 KiB |
@ -0,0 +1,169 @@
|
|||||||
|
{
|
||||||
|
"custom": {
|
||||||
|
"alarmHighlight": "",
|
||||||
|
"areaHover": [],
|
||||||
|
"currentGraphic": "Windows/Graphics/Overview",
|
||||||
|
"demoHighlight": "",
|
||||||
|
"dexmanager": {
|
||||||
|
"config": {
|
||||||
|
"font": "bold 12px Arial",
|
||||||
|
"highlight": "#ff0"
|
||||||
|
},
|
||||||
|
"highlight": [],
|
||||||
|
"show": {
|
||||||
|
"Beacons": false,
|
||||||
|
"ConveyorLabels": true,
|
||||||
|
"ConveyorPatterns": true,
|
||||||
|
"Conveyors": true,
|
||||||
|
"DivertPaddles": true,
|
||||||
|
"EIPs": false,
|
||||||
|
"Encoders": false,
|
||||||
|
"Estops": false,
|
||||||
|
"Gaylords": true,
|
||||||
|
"LimitSwitches": false,
|
||||||
|
"MCPs": false,
|
||||||
|
"PhotoEyes": false,
|
||||||
|
"PushButtons": false,
|
||||||
|
"Scanners": false,
|
||||||
|
"VFDs": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"heatmapSettings": {
|
||||||
|
"alarms": [],
|
||||||
|
"alarmsText": "",
|
||||||
|
"data": {
|
||||||
|
"$": [
|
||||||
|
"ds",
|
||||||
|
192,
|
||||||
|
1602856991637
|
||||||
|
],
|
||||||
|
"$columns": [
|
||||||
|
{
|
||||||
|
"data": [],
|
||||||
|
"name": "firsttime",
|
||||||
|
"type": "Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": [],
|
||||||
|
"name": "lasttime",
|
||||||
|
"type": "Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": [],
|
||||||
|
"name": "duration",
|
||||||
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": [],
|
||||||
|
"name": "count",
|
||||||
|
"type": "Long"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": [],
|
||||||
|
"name": "device",
|
||||||
|
"type": "String"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": [],
|
||||||
|
"name": "description",
|
||||||
|
"type": "String"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"devices": [],
|
||||||
|
"devicesText": "",
|
||||||
|
"enabled": false,
|
||||||
|
"shifts": [],
|
||||||
|
"shiftsText": "",
|
||||||
|
"time": {
|
||||||
|
"end": "2020-07-30 00:00:00",
|
||||||
|
"start": "2020-07-29 00:00:00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isMobile": false,
|
||||||
|
"timewidget": {
|
||||||
|
"endDate": {
|
||||||
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1646422591477
|
||||||
|
],
|
||||||
|
"$ts": 1646438400000
|
||||||
|
},
|
||||||
|
"mode": "currentDay",
|
||||||
|
"startDate": {
|
||||||
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1646422591477
|
||||||
|
],
|
||||||
|
"$ts": 1646352000000
|
||||||
|
},
|
||||||
|
"update": {
|
||||||
|
"$": [
|
||||||
|
"ts",
|
||||||
|
192,
|
||||||
|
1646422591477
|
||||||
|
],
|
||||||
|
"$ts": 1646422591465
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.auth": {
|
||||||
|
"access": "PRIVATE",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.device.accelerometer": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.device.identifier": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.device.timezone": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.device.type": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.device.userAgent": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.gateway": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.geolocation.data": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.geolocation.permissionGranted": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.host": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.id": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
"props.lastActivity": {
|
||||||
|
"access": "SYSTEM",
|
||||||
|
"persistent": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"address": "127.0.0.1",
|
||||||
|
"device": {},
|
||||||
|
"geolocation": {},
|
||||||
|
"locale": "en-US",
|
||||||
|
"timeZoneId": "Asia/Tbilisi"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
SELECT DISTINCT destination_act AS lane
|
||||||
|
FROM package_history
|
||||||
|
WHERE destination_act IS NOT NULL
|
||||||
|
ORDER BY lane ASC;
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"margin": "1px"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 58 KiB |
@ -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)
|
||||||
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 140 KiB |
@ -0,0 +1,63 @@
|
|||||||
|
################################################################
|
||||||
|
################################################################
|
||||||
|
## Version: 1.0 / Author: Dillon Uzar
|
||||||
|
##
|
||||||
|
## DESC: For use in WCS Sorting Lane Lookup & Recording
|
||||||
|
## WARN: Modifying code may cause system to function incorrectly
|
||||||
|
################################################################
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Constants
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
# Logger:
|
||||||
|
LOG = system.util.logger("GL BreakCount Handler")
|
||||||
|
|
||||||
|
# For inserting data into database:
|
||||||
|
CONFIRM_INSERT_QUERY = "INSERT IGNORE INTO gl_history (gaylord_id,count) VALUES (?,?)"
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Parsing Utils
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
def logTime(title, trackID, seconds):
|
||||||
|
millisec = round(seconds * 1000, 1)
|
||||||
|
if millisec > 4:
|
||||||
|
LOG.info("%s[ID=%s] took longer than expected (%sms to process)" % (title, trackID, millisec))
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### PLC Event Handling
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
def processBreak(gaylordID, count):
|
||||||
|
# This function handles confirm events, and logs the event in SQL
|
||||||
|
# Ensure ID is valid
|
||||||
|
if count > 0:
|
||||||
|
start_time = time.time()
|
||||||
|
# Log confirm event in SQL:
|
||||||
|
# Insert into Package History:
|
||||||
|
system.db.runPrepUpdate(CONFIRM_INSERT_QUERY, [gaylordID, count])
|
||||||
|
logTime("GL_BREAK[DB_INSERT]", gaylordID, time.time() - start_time)
|
||||||
|
|
||||||
|
def processBreakAsync(gaylordID, count):
|
||||||
|
# This function handles confirm events, and logs the event in SQL
|
||||||
|
# Ensure ID is valid
|
||||||
|
if count > 0:
|
||||||
|
def processConfirmInner():
|
||||||
|
start_time = time.time()
|
||||||
|
# Log confirm event in SQL:
|
||||||
|
# Insert into Package History:
|
||||||
|
system.db.runPrepUpdate(CONFIRM_INSERT_QUERY, [gaylordID, count])
|
||||||
|
logTime("GL_BREAK[DB_INSERT]", gaylordID, time.time() - start_time)
|
||||||
|
|
||||||
|
system.util.invokeAsynchronous(processConfirmInner)
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
@ -0,0 +1,26 @@
|
|||||||
|
WITH SORTERS AS (
|
||||||
|
SELECT
|
||||||
|
MIN(timestamp) AS start_timestamp,
|
||||||
|
MAX(timestamp) AS end_timestamp,
|
||||||
|
3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate) AS pph_multiplier,
|
||||||
|
"SYSTEM" AS sorter,
|
||||||
|
SUM(IF(lane_id LIKE "UL%", count, 0)) AS inducted,
|
||||||
|
SUM(IF(lane_id LIKE "CH%", count, 0)) AS sorted
|
||||||
|
FROM pe_history
|
||||||
|
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||||
|
GROUP BY "SYSTEM" /* Makes it so no row is returned if no rows are processed */
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
start_timestamp,
|
||||||
|
end_timestamp,
|
||||||
|
sorter,
|
||||||
|
/* Counts: */
|
||||||
|
inducted AS inducted_count,
|
||||||
|
sorted AS sorted_count,
|
||||||
|
/* PPH: */
|
||||||
|
ROUND(inducted*pph_multiplier) AS inducted_pph,
|
||||||
|
ROUND(sorted*pph_multiplier) AS sorted_pph,
|
||||||
|
/* Percents: */
|
||||||
|
ROUND(inducted/inducted, 4) AS inducted_percent,
|
||||||
|
ROUND(sorted/sorted, 4) AS sorted_percent
|
||||||
|
FROM SORTERS;
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"color": "#808080"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.4 KiB |
@ -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)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,275 @@
|
|||||||
|
{
|
||||||
|
"custom": {
|
||||||
|
"plc": "value",
|
||||||
|
"searchId": "value",
|
||||||
|
"state": 0,
|
||||||
|
"string": "Idle"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"tagProps": [
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value",
|
||||||
|
"value"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"custom.plc": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.params.tagProps[0]"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "split({value}, \"/\")[0]",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
},
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"custom.searchId": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "session.custom.searchId"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
},
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"custom.state": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 1,
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fallback": 0,
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 2,
|
||||||
|
"output": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 3,
|
||||||
|
"output": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 4,
|
||||||
|
"output": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 5,
|
||||||
|
"output": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 6,
|
||||||
|
"output": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 7,
|
||||||
|
"output": 7
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
},
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"custom.string": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "Unknown",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 0,
|
||||||
|
"output": "Idle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": "Actuated"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
},
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.tagProps": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"defaultSize": {
|
||||||
|
"height": 30,
|
||||||
|
"width": 30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "EPC"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 1,
|
||||||
|
"width": 1
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"meta.visible": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "session.custom.alarm_filter.show_epc"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.elements[2].fill.paint": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.custom.state"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": "#00FF00",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": 1,
|
||||||
|
"output": "#FF0000"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "color",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"fill": {
|
||||||
|
"paint": "#FFFF00"
|
||||||
|
},
|
||||||
|
"height": "20",
|
||||||
|
"name": "rect",
|
||||||
|
"type": "rect",
|
||||||
|
"width": "20",
|
||||||
|
"x": "0",
|
||||||
|
"y": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"d": "M 0,0 H 20 V 20 H 0 Z",
|
||||||
|
"fill": {
|
||||||
|
"paint": "transparent"
|
||||||
|
},
|
||||||
|
"name": "path",
|
||||||
|
"stroke": {
|
||||||
|
"paint": "#000000",
|
||||||
|
"width": "1.5"
|
||||||
|
},
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z",
|
||||||
|
"fill": {},
|
||||||
|
"name": "path",
|
||||||
|
"stroke": {
|
||||||
|
"paint": "#000000",
|
||||||
|
"width": "1"
|
||||||
|
},
|
||||||
|
"type": "path"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"viewBox": "0 0 20 20"
|
||||||
|
},
|
||||||
|
"type": "ia.shapes.svg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": {
|
||||||
|
"dom": {
|
||||||
|
"onClick": {
|
||||||
|
"config": {
|
||||||
|
"script": "\tsystem.perspective.openDock(\u0027Docked-East-EPC\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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"meta.tooltip.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"expression": "\"Source Id: \" + {view.params.tagProps[0]} + \", Status: \" + {view.custom.string}\n"
|
||||||
|
},
|
||||||
|
"type": "expr"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta.visible": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "session.custom.alarm_filter.show_epc"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"mode": "percent",
|
||||||
|
"style": {
|
||||||
|
"cursor": "pointer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.container.coord"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,393 @@
|
|||||||
|
{
|
||||||
|
"custom": {},
|
||||||
|
"params": {
|
||||||
|
"enableTooltip": true,
|
||||||
|
"label": null,
|
||||||
|
"tagPath": "",
|
||||||
|
"tagPathControl": "",
|
||||||
|
"view": ""
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"params.enableTooltip": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.label": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.tagPath": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.tagPathControl": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.view": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"defaultSize": {
|
||||||
|
"height": 40,
|
||||||
|
"width": 135
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"events": {
|
||||||
|
"dom": {
|
||||||
|
"onClick": {
|
||||||
|
"config": {
|
||||||
|
"script": "\tself.parent.openWindow()"
|
||||||
|
},
|
||||||
|
"scope": "G",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"name": "Status"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": "100%",
|
||||||
|
"width": "100%"
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.style.backgroundColor": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}.jsonValues"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "try(\r\n\tif(jsonGet({value}, \"Estop_Active\") \u0026\u0026 {[default]Gateway/ToggleTag},\r\n\t\t\"#F00\",\t\t// Estop\r\n\t\tif(jsonGet({value}, \"bStarted\"),\r\n\t\t\t\"#0F0\",\t// Running\r\n\t\t\t\"#AAA\"\t// Stopped\r\n\t\t)\r\n\t),\r\n\t\"#808080\" // Unknown\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"borderWidth": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"events": {
|
||||||
|
"dom": {
|
||||||
|
"onClick": {
|
||||||
|
"config": {
|
||||||
|
"script": "\tself.parent.openWindow()"
|
||||||
|
},
|
||||||
|
"scope": "G",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"name": "Text"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": "calc(100% - 10px)",
|
||||||
|
"width": "calc(100% - 10px)",
|
||||||
|
"x": 5,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Parameters.LabelFull"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({view.params.label}, {value}, \"Unknown\")",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"backgroundColor": "#FFF",
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"borderWidth": 1,
|
||||||
|
"fontSize": "12px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"paddingLeft": "5px",
|
||||||
|
"textOverflow": "ellipsis",
|
||||||
|
"textTransform": "uppercase",
|
||||||
|
"user-select": "none",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"events": {
|
||||||
|
"dom": {
|
||||||
|
"onClick": {
|
||||||
|
"config": {
|
||||||
|
"script": "\tself.parent.openWindow()"
|
||||||
|
},
|
||||||
|
"scope": "G",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"name": "TooltipOverlay"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": "100%",
|
||||||
|
"width": "100%"
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"meta.visible": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.params.enableTooltip"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.status.tooltip": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Graphics"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if(isGood({value}),\r\n\tjsonGet({value}, \"tooltip\"),\r\n\t\"Tooltip not configured\"\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"status": {}
|
||||||
|
},
|
||||||
|
"type": "dex.display.tooltipoverlay"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"events": {
|
||||||
|
"component": {
|
||||||
|
"onActionPerformed": {
|
||||||
|
"config": {
|
||||||
|
"script": "\ttagPath \u003d self.view.params.tagPathControl\n\tif tagPath \u003c\u003e \"\":\n\t\ttags \u003d [tagPath + \"/SetStart\"]\n\t\tvalues \u003d [1]\n\t\tsystem.tag.writeAsync(tags, values)"
|
||||||
|
},
|
||||||
|
"scope": "G",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"name": "Start"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 25,
|
||||||
|
"x": "calc(100% - 60px)",
|
||||||
|
"y": "calc(50% - 12.5px)"
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.enabled": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPathControl": "{view.params.tagPathControl}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPathControl}/SetStart"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "isGood({value})",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.textStyle.color": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPathControl": "{view.params.tagPathControl}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPathControl}/Alarms/bStarted"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({value}, false)",
|
||||||
|
"type": "expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fallback": "#888888",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": true,
|
||||||
|
"output": "#32CD32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "color",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"classes": "Buttons/Grey"
|
||||||
|
},
|
||||||
|
"text": "►",
|
||||||
|
"textStyle": {
|
||||||
|
"fontFamily": "Arial",
|
||||||
|
"fontSize": "14px"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.input.button"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"events": {
|
||||||
|
"component": {
|
||||||
|
"onActionPerformed": {
|
||||||
|
"config": {
|
||||||
|
"script": "\ttagPath \u003d self.view.params.tagPathControl\n\tif tagPath \u003c\u003e \"\":\n\t\ttags \u003d [tagPath + \"/SetStop\"]\n\t\tvalues \u003d [1]\n\t\tsystem.tag.writeAsync(tags, values)"
|
||||||
|
},
|
||||||
|
"scope": "G",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"name": "Stop"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 25,
|
||||||
|
"x": "calc(100% - 32.5px)",
|
||||||
|
"y": "calc(50% - 12.5px)"
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.enabled": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPathControl": "{view.params.tagPathControl}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPathControl}/SetStop"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "isGood({value})",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.textStyle.color": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPathControl": "{view.params.tagPathControl}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPathControl}/Alarms/bStarted"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({value}, true)",
|
||||||
|
"type": "expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fallback": "#888888",
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": false,
|
||||||
|
"output": "#FF0000"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "color",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"classes": "Buttons/Grey"
|
||||||
|
},
|
||||||
|
"text": "■",
|
||||||
|
"textStyle": {
|
||||||
|
"fontFamily": "monospace",
|
||||||
|
"fontSize": "14px"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.input.button"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"name": "root"
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"cursor": "pointer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"customMethods": [
|
||||||
|
{
|
||||||
|
"name": "openWindow",
|
||||||
|
"params": [],
|
||||||
|
"script": "\tview \u003d self.view.params.view\n\tif view in [\"\", None]:\n\t\tview \u003d \"Windows/Graphics/\"+self.getChild(\"Text\").props.text.replace(\" \", \"_\")\n\t# Open window:\n\twindow \u003d \"Windows/GraphicsWrapper\"\n\tparams \u003d {\"view\": view}\n\tsystem.perspective.navigate(\"/\")\n\tsystem.perspective.navigate(view\u003dwindow, params\u003dparams)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"messageHandlers": []
|
||||||
|
},
|
||||||
|
"type": "ia.container.coord"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,156 @@
|
|||||||
|
################################################################
|
||||||
|
################################################################
|
||||||
|
## Version: 1.0 / Author: Dillon Uzar
|
||||||
|
##
|
||||||
|
## DESC: For use in FMS in recording Flow Management data
|
||||||
|
## WARN: Modifying code may cause system to function incorrectly
|
||||||
|
################################################################
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
import json
|
||||||
|
import system
|
||||||
|
import time
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Constants
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
# Logger:
|
||||||
|
LOG = system.util.logger("FMS Handler")
|
||||||
|
|
||||||
|
# For inserting data into database:
|
||||||
|
INSERT_QUERY = "INSERT INTO fms_history (conveyor, segment, data) VALUES (?,?,?)"
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Parsing Utils
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
def extractNibble(val, nibble):
|
||||||
|
if val is not None:
|
||||||
|
return (val >> (nibble*4)) & 0x0F
|
||||||
|
|
||||||
|
def logTime(title, conv, seg, data, start_time):
|
||||||
|
millisec = round((time.time() - start_time) * 1000, 1)
|
||||||
|
LOG.info("%s[CONV=%s][SEG=%s][DATA=%s] took %sms to process" % (title, conv, seg, data, millisec))
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Tag Event Handling
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
def logSegment(conveyor, segment, data):
|
||||||
|
# Log event in SQL:
|
||||||
|
# Insert into FMS History:
|
||||||
|
start_time = time.time()
|
||||||
|
INSERT_QUERY = "INSERT INTO fms_history (conveyor, segment, data) VALUES (?,?,?)"
|
||||||
|
system.db.runPrepUpdate(INSERT_QUERY, [conveyor, segment, data])
|
||||||
|
#logTime("FMS[DB_INSERT]", conveyor, segment, data, start_time)
|
||||||
|
|
||||||
|
def dintOnChange(tag, tagPath, previousValue, currentValue, initialChange, missedEvents):
|
||||||
|
# Don't execute on startup, or if new value is bad quality:
|
||||||
|
if currentValue.quality.isGood():
|
||||||
|
# Only consider it a change if the value is different:
|
||||||
|
if currentValue.value <> previousValue.value:
|
||||||
|
id = int(tagPath.split("/")[-1].replace("DINT", ""))
|
||||||
|
conveyor = tag['parameters']['LabelFull']
|
||||||
|
# ID=0 is unique where the first nibble is the average of all segments, the 7 other segments are normal segments:
|
||||||
|
if id == 0:
|
||||||
|
# Ignore first nibble, which is the average of all segments:
|
||||||
|
for i in range(1, 8):
|
||||||
|
# Check if segment changed:
|
||||||
|
curVal = extractNibble(currentValue.value, i)
|
||||||
|
prevVal = extractNibble(previousValue.value, i)
|
||||||
|
if curVal <> prevVal:
|
||||||
|
segment = i - 1
|
||||||
|
logSegment(conveyor, segment, curVal)
|
||||||
|
else:
|
||||||
|
for i in range(0, 8):
|
||||||
|
# Check if segment changed:
|
||||||
|
curVal = extractNibble(currentValue.value, i)
|
||||||
|
prevVal = extractNibble(previousValue.value, i)
|
||||||
|
if curVal <> prevVal:
|
||||||
|
segment = i + (id-1)*8 + 7
|
||||||
|
logSegment(conveyor, segment, curVal)
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Graphics Tag Scripts
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
"""
|
||||||
|
radial-gradient(circle at 30%,
|
||||||
|
#f5bff5 calc((var(--conv-width) - 4px)/2*0.25),
|
||||||
|
#000 calc((var(--conv-width) - 4px)/2*0.25),
|
||||||
|
#000 calc((var(--conv-width) - 4px)/2*0.25 + 1px),
|
||||||
|
transparent calc((var(--conv-width) - 4px)/2*0.25 + 1px)),
|
||||||
|
radial-gradient(circle at 50%, #d900d9 calc((var(--conv-width) - 4px)/2*1), #000 calc((var(--conv-width) - 4px)/2*1), #000 calc((var(--conv-width) - 4px)/2*1 + 1px), transparent calc((var(--conv-width) - 4px)/2*0.25 + 1px)), radial-gradient(circle at 70%, #ec7fec 7px, #000 7px, #000 8px, transparent 8px), radial-gradient(circle at 90%, #e23fe2 10px, #000 10px, #000 11px, transparent 11px), #00D900
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def genSegmentsTable(obj):
|
||||||
|
segments = []
|
||||||
|
if obj is not None and obj["Count"] is not None:
|
||||||
|
for i in range(1, obj["Count"]+1):
|
||||||
|
dint = "DINT"+str(int(i/8))
|
||||||
|
if obj[dint] is not None:
|
||||||
|
percent = extractNibble(obj[dint], i % 8) / 15.0
|
||||||
|
segments.append([i, percent])
|
||||||
|
return system.dataset.toDataSet(["segment", "fill"], segments)
|
||||||
|
|
||||||
|
def genSegmentColor(data):
|
||||||
|
perc = (data/15.0)
|
||||||
|
c1 = 255 - (255 - 217)*perc
|
||||||
|
c2 = 255 - (255 - 0)*perc
|
||||||
|
return "rgb(%s, %s, %s)" % (c1, c2, c1)
|
||||||
|
|
||||||
|
def genSegmentsPattern(obj):
|
||||||
|
if obj["Count"] is not None and obj["Count"] > 0:
|
||||||
|
percUnit = 100 / float(obj["Count"])
|
||||||
|
gradients = []
|
||||||
|
for i in range(1, obj["Count"]+1):
|
||||||
|
dint = "DINT"+str(int(i/8))
|
||||||
|
if obj[dint] is not None:
|
||||||
|
data = extractNibble(obj[dint], i % 8)
|
||||||
|
color = genSegmentColor(data)
|
||||||
|
circlePos = ((obj["Count"]-i))*percUnit + percUnit/2.0
|
||||||
|
perc = (data/15.0*0.5+0.5) if data > 0 else 0.0 # Make circle size between 50%-100%
|
||||||
|
if perc > 0.0:
|
||||||
|
output = "radial-gradient(circle at %s%%" % (circlePos)
|
||||||
|
output += ", %s calc((var(--conv-width) - 8px)/2*%s)" % (color, perc)
|
||||||
|
output += ", #000 calc((var(--conv-width) - 8px)/2*%s)" % (perc)
|
||||||
|
output += ", #000 calc((var(--conv-width) - 8px)/2*%s + 1px)" % (perc)
|
||||||
|
output += ", transparent calc((var(--conv-width) - 8px)/2*%s + 1px)" % (perc)
|
||||||
|
output += ")"
|
||||||
|
gradients.append(output)
|
||||||
|
if len(gradients) > 0:
|
||||||
|
return ", ".join(gradients)+","
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def genSegmentsTooltip(obj):
|
||||||
|
if obj["Count"] is not None and obj["Count"] > 0:
|
||||||
|
data = extractNibble(obj["DINT0"], 0)
|
||||||
|
output = "<br><br>SegmentAVG: %s%%" % (int(round(100 * data / 15.0)))
|
||||||
|
for i in range(1, obj["Count"]+1):
|
||||||
|
dint = "DINT"+str(int(i/8))
|
||||||
|
if obj[dint] is not None:
|
||||||
|
data = extractNibble(obj[dint], i % 8)
|
||||||
|
output += "<br>Segment%s: %s%%" % (i, int(round(100 * data / 15.0)))
|
||||||
|
return output
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def genSegmentHeatmap(obj):
|
||||||
|
segments = []
|
||||||
|
if obj["Count"] is not None and obj["Count"] > 0:
|
||||||
|
for i in range(1, obj["Count"]+1):
|
||||||
|
dint = "DINT"+str(int(i/8))
|
||||||
|
if obj[dint] is not None:
|
||||||
|
data = extractNibble(obj[dint], i % 8)
|
||||||
|
color = 255 * data / 15
|
||||||
|
segments.append("rgb(255, %s, %s)" % (color, color))
|
||||||
|
return json.dumps(segments)
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"backgroundImage": "linear-gradient(180deg, rgba(245,245,245,1) 0%, rgba(235,235,235,1) 70%, rgba(208,208,208,1) 100%);",
|
||||||
|
"borderColor": "#555",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"borderWidth": "2px",
|
||||||
|
"color": "#000",
|
||||||
|
"textTransform": "uppercase"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variants": [
|
||||||
|
{
|
||||||
|
"pseudo": "hover",
|
||||||
|
"style": {
|
||||||
|
"backgroundImage": "linear-gradient(0deg, rgba(245,245,245,1) 0%, rgba(235,235,235,1) 70%, rgba(208,208,208,1) 100%);",
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"borderWidth": "2px",
|
||||||
|
"color": "#000",
|
||||||
|
"cursor": "pointer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pseudo": "disabled",
|
||||||
|
"style": {
|
||||||
|
"backgroundImage": "linear-gradient(180deg, rgba(208,208,208,1) 0%, rgba(208,208,208,1) 100%);",
|
||||||
|
"borderColor": "#555",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"borderWidth": "2px",
|
||||||
|
"color": "#555555",
|
||||||
|
"cursor": "not-allowed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 102 KiB |
@ -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
|
||||||
|
After Width: | Height: | Size: 494 B |
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
@ -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)
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"backgroundColor": "#EEEEEE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,290 @@
|
|||||||
|
{
|
||||||
|
"custom": {},
|
||||||
|
"params": {
|
||||||
|
"meta": {
|
||||||
|
"name": "VFD"
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"config": {
|
||||||
|
"enableHighlight": true,
|
||||||
|
"isClickable": false
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"color": {
|
||||||
|
"left": "#B3B3B3",
|
||||||
|
"right": "#D3D3D3"
|
||||||
|
},
|
||||||
|
"showAlways": true,
|
||||||
|
"tagPath": "[default]MCP03/RO02/RO02_03/VFD",
|
||||||
|
"tooltip": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"params.meta": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.meta.name": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.props": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"defaultSize": {
|
||||||
|
"height": 105,
|
||||||
|
"width": 500
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "VFD"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 64,
|
||||||
|
"width": 64,
|
||||||
|
"x": 67.5,
|
||||||
|
"y": 17.5
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Graphics"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "try(\r\n\tjsonSet({value}, \"showAlways\", true),\r\n\t{view.params.props.status}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"config": {
|
||||||
|
"enableHighlight": false,
|
||||||
|
"isClickable": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.vfd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Label_15"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 75,
|
||||||
|
"x": 195,
|
||||||
|
"y": 40
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"textAlign": "right"
|
||||||
|
},
|
||||||
|
"text": "Status:"
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "lbStatus"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": "calc(100% - 300px)",
|
||||||
|
"x": 280,
|
||||||
|
"y": 40
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Graphics"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"code": "\treturn utils.extractStatus(value)",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"fontSize": "14px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textOverview": "ellipsis",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Label_1"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 75,
|
||||||
|
"x": 195,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"textAlign": "right"
|
||||||
|
},
|
||||||
|
"text": "Name: "
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "lbName"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": "calc(100% - 300px)",
|
||||||
|
"x": 280,
|
||||||
|
"y": 5
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Parameters.LabelFull"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({value}, \u0027\u0027)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"fontSize": "14px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textOverview": "ellipsis",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Label_12"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": 75,
|
||||||
|
"x": 195,
|
||||||
|
"y": 75
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"fontSize": "20px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"textAlign": "right"
|
||||||
|
},
|
||||||
|
"text": "Panel:"
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "lbStatus_0"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 25,
|
||||||
|
"width": "calc(100% - 300px)",
|
||||||
|
"x": 280,
|
||||||
|
"y": 75
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.text": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.props.status.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Parameters.OPC_Server"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "coalesce({value}, \"Unknown\")",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"borderColor": "#000",
|
||||||
|
"borderStyle": "solid",
|
||||||
|
"fontSize": "14px",
|
||||||
|
"fontWeight": "bold",
|
||||||
|
"overflow": "hidden",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textOverview": "ellipsis",
|
||||||
|
"whiteSpace": "nowrap"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.display.label"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"name": "root"
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"background-color": "#CFCFCF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "ia.container.coord"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,44 @@
|
|||||||
|
WITH SCANNERS AS (
|
||||||
|
SELECT
|
||||||
|
DATE_FORMAT(MIN(s04_timestamp), "%Y-%m-%d %H:00") AS start_timestamp,
|
||||||
|
CONCAT("H",
|
||||||
|
CAST(
|
||||||
|
TIMESTAMPDIFF(
|
||||||
|
HOUR,
|
||||||
|
DATE_FORMAT(MIN(s04_timestamp), "%Y-%m-%d %H:00:00"),
|
||||||
|
DATE_FORMAT(LEAST(CURRENT_TIMESTAMP(), :endDate), "%Y-%m-%d %H:00:00")
|
||||||
|
) AS CHAR
|
||||||
|
)
|
||||||
|
) AS hour,
|
||||||
|
COUNT(*) AS total,
|
||||||
|
SUM(scanner_status NOT IN ("No Read", "No Code", "Multi Label")) AS good_read,
|
||||||
|
SUM(scanner_status = "No Read") AS no_read,
|
||||||
|
SUM(scanner_status = "No Code") AS no_code,
|
||||||
|
SUM(scanner_status = "Multi Label") AS multi_label
|
||||||
|
FROM package_history
|
||||||
|
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||||
|
AND scanner=:scanner
|
||||||
|
GROUP BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:00")
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
start_timestamp,
|
||||||
|
hour,
|
||||||
|
/* Counts: */
|
||||||
|
total AS total_count,
|
||||||
|
good_read AS good_read_count,
|
||||||
|
no_read AS no_read_count,
|
||||||
|
no_code AS no_code_count,
|
||||||
|
multi_label AS multi_label_count,
|
||||||
|
/* PPH: */
|
||||||
|
total AS total_pph,
|
||||||
|
good_read AS good_read_pph,
|
||||||
|
no_read AS no_read_pph,
|
||||||
|
no_code AS no_code_pph,
|
||||||
|
multi_label AS multi_label_pph,
|
||||||
|
/* Percents: */
|
||||||
|
ROUND(total/total, 4) AS total_percent,
|
||||||
|
ROUND(good_read/total, 4) AS good_read_percent,
|
||||||
|
ROUND(no_read/total, 4) AS no_read_percent,
|
||||||
|
ROUND(no_code/total, 4) AS no_code_percent,
|
||||||
|
ROUND(multi_label/total, 4) AS multi_label_percent
|
||||||
|
FROM SCANNERS;
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
WITH GAYLORDS AS (
|
||||||
|
SELECT
|
||||||
|
MIN(timestamp) AS start_timestamp,
|
||||||
|
MAX(timestamp) AS end_timestamp,
|
||||||
|
3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate) AS pph_multiplier,
|
||||||
|
gaylord_id AS gaylord,
|
||||||
|
SUM(count) AS total
|
||||||
|
FROM gl_history
|
||||||
|
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||||
|
GROUP BY gaylord_id
|
||||||
|
ORDER BY gaylord_id
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
start_timestamp,
|
||||||
|
end_timestamp,
|
||||||
|
gaylord,
|
||||||
|
/* Counts: */
|
||||||
|
total AS total_count,
|
||||||
|
/* PPH: */
|
||||||
|
ROUND(total*pph_multiplier) AS total_pph,
|
||||||
|
/* Percents: */
|
||||||
|
ROUND(total/total, 4) AS total_percent
|
||||||
|
FROM GAYLORDS;
|
||||||
@ -0,0 +1,415 @@
|
|||||||
|
{
|
||||||
|
"custom": {},
|
||||||
|
"params": {
|
||||||
|
"alwaysShowAll": false,
|
||||||
|
"chuteNum": "",
|
||||||
|
"isClickable": true,
|
||||||
|
"mirror": false,
|
||||||
|
"tagPath": "MCP05/PS01/PS01_28CH"
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"params.alwaysShowAll": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.chuteNum": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.isClickable": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.mirror": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"params.tagPath": {
|
||||||
|
"paramDirection": "input",
|
||||||
|
"persistent": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"defaultSize": {
|
||||||
|
"height": 92,
|
||||||
|
"width": 94
|
||||||
|
},
|
||||||
|
"loading": {
|
||||||
|
"mode": "blocking"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"events": {
|
||||||
|
"dom": {
|
||||||
|
"onClick": {
|
||||||
|
"config": {
|
||||||
|
"script": "\tself.parent.openPopup()"
|
||||||
|
},
|
||||||
|
"scope": "G",
|
||||||
|
"type": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"name": "Conveyor"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 48,
|
||||||
|
"rotate": {
|
||||||
|
"anchor": "0 0",
|
||||||
|
"angle": 90
|
||||||
|
},
|
||||||
|
"width": 89,
|
||||||
|
"x": 69,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.config.isClickable": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"expression": "!{view.params.isClickable}"
|
||||||
|
},
|
||||||
|
"type": "expr"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.config.showLabel": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Conv/Parameters.LabelFull"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Conv/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.style.transform": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.params.mirror"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": null,
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": true,
|
||||||
|
"output": "scale(1, -1) translateY(-100%)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"config": {
|
||||||
|
"type": "chute"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.conveyor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "BCN1_BLU"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 16,
|
||||||
|
"width": 16,
|
||||||
|
"y": 3
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/BCN1/BLU/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.style.transform": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "parent.props.style.transform"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.beacon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "BCN1_AMB"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 16,
|
||||||
|
"width": 16,
|
||||||
|
"y": 18
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/BCN1/AMB/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.style.transform": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "parent.props.style.transform"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.beacon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "BCN1_GRN"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 16,
|
||||||
|
"width": 16,
|
||||||
|
"y": 33
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/BCN1/GRN/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props.style.transform": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "parent.props.style.transform"
|
||||||
|
},
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.beacon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Half_PE"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 10,
|
||||||
|
"rotate": {
|
||||||
|
"angle": 180
|
||||||
|
},
|
||||||
|
"width": 62,
|
||||||
|
"x": 17,
|
||||||
|
"y": 74
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Half_PE/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.photoeye"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Jam_PE"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 10,
|
||||||
|
"rotate": {
|
||||||
|
"angle": 180
|
||||||
|
},
|
||||||
|
"width": 62,
|
||||||
|
"x": 17,
|
||||||
|
"y": 6
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Jam_PE/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.photoeye"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "Full_PE"
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"height": 10,
|
||||||
|
"rotate": {
|
||||||
|
"angle": 180
|
||||||
|
},
|
||||||
|
"width": 62,
|
||||||
|
"x": 17,
|
||||||
|
"y": 36
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.status": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"fallbackDelay": 2.5,
|
||||||
|
"mode": "indirect",
|
||||||
|
"references": {
|
||||||
|
"tagPath": "{view.params.tagPath}"
|
||||||
|
},
|
||||||
|
"tagPath": "{tagPath}/Full_PE/Graphics"
|
||||||
|
},
|
||||||
|
"overlayOptOut": true,
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||||
|
"type": "expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "dex.display.photoeye"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"name": "root"
|
||||||
|
},
|
||||||
|
"propConfig": {
|
||||||
|
"props.style.transform": {
|
||||||
|
"binding": {
|
||||||
|
"config": {
|
||||||
|
"path": "view.params.mirror"
|
||||||
|
},
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"fallback": null,
|
||||||
|
"inputType": "scalar",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"input": true,
|
||||||
|
"output": "scale(-1, 1)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputType": "scalar",
|
||||||
|
"type": "map"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"props": {
|
||||||
|
"style": {
|
||||||
|
"overflow": "hidden"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"customMethods": [
|
||||||
|
{
|
||||||
|
"name": "openPopup",
|
||||||
|
"params": [],
|
||||||
|
"script": "\tif self.view.params.isClickable:\n\t\tid \u003d \"DivChute|\" + self.view.params.tagPath\n\t\ttitle \u003d utils.prettyName(self.view.params.tagPath.split(\"/\")[-1])\n\t\tparams \u003d { \n\t\t\t\"deviceType\": \"divchute\",\n\t\t\t\"props\": { \n\t\t\t\t\"config\": {\n\t\t\t\t\t\"alwaysShowAll\": self.view.params.alwaysShowAll,\n\t\t\t\t\t\"isClickable\": self.view.params.isClickable,\n\t\t\t\t\t#\"rotate\": self.view.params.rotate,\n\t\t\t\t\t\"mirror\": self.view.params.mirror\n\t\t\t\t},\n\t\t\t\t\"status\": {\n\t\t\t\t\t\"tagPath\": self.view.params.tagPath\n\t\t\t\t}\n\t\t \t},\n\t\t \t\"tabs\": [\"Controls\", \"Alarm History\", \"Devices\"]\t\t\n\t\t}\n\t\tsystem.perspective.openPopup(id, \"Popups/DeviceWrapper\", params, title, resizable \u003d True)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"extensionFunctions": null,
|
||||||
|
"messageHandlers": []
|
||||||
|
},
|
||||||
|
"type": "ia.container.coord"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
WITH SORTERS AS (
|
||||||
|
SELECT
|
||||||
|
DATE_FORMAT(MIN(s04_timestamp), "%Y-%m-%d %H:%i:00") AS time,
|
||||||
|
COUNT(*) AS total,
|
||||||
|
/* PPH Data */
|
||||||
|
SUM(sort_code="Success") AS success,
|
||||||
|
SUM(sort_code IN ("Dest Invalid", "Dest None", "Underutilized")) AS awcs,
|
||||||
|
SUM(sort_code IN ("Dest Disabled", "Dest Full", "Dim Error", "Unexpected", "Weight Err")) AS operational,
|
||||||
|
SUM(sort_code IN ("Dest Fault", "Div Fail", "Gap Err", "Lost", "Rate High", "Track Err", "Unknown", "Unsafe")) AS machine,
|
||||||
|
SUM(sort_code IN ("No Read", "No Code", "Multi Label")) AS scanner,
|
||||||
|
/* Problem Solve Data */
|
||||||
|
SUM(sort_code="No Read") AS no_read,
|
||||||
|
SUM(sort_code="No Code") AS no_code,
|
||||||
|
SUM(sort_code="Multi Label") AS multi_label,
|
||||||
|
/* Sorter Error Data */
|
||||||
|
SUM(sort_code="Gap Err") AS gap_err,
|
||||||
|
SUM(sort_code="Div Fail") AS div_fail,
|
||||||
|
SUM(sort_code="Dest None") AS dest_none,
|
||||||
|
SUM(sort_code="Lost") AS lost
|
||||||
|
FROM package_history
|
||||||
|
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||||
|
AND sorter = :sorter
|
||||||
|
GROUP BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:%i:00")
|
||||||
|
ORDER BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:%i:00")
|
||||||
|
), DATA AS (
|
||||||
|
SELECT
|
||||||
|
total,
|
||||||
|
/* PPH: */
|
||||||
|
ROUND((SUM((total - machine - scanner)*60) OVER w)/(:movAvgMin+1)) AS total_pph,
|
||||||
|
/* Problem Solve Percents: */
|
||||||
|
no_read+no_code+multi_label AS scanner,
|
||||||
|
/* Sorter Error Percents: */
|
||||||
|
gap_err+div_fail+dest_none+lost AS sorter
|
||||||
|
FROM SORTERS
|
||||||
|
WINDOW w AS (ORDER BY STR_TO_DATE(time, "%Y-%m-%d %H:%i:00") RANGE BETWEEN INTERVAL :movAvgMin MINUTE PRECEDING AND CURRENT ROW)
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
MAX(total_pph) AS total_pph,
|
||||||
|
/* Problem Solve Percents: */
|
||||||
|
ROUND(SUM(scanner)/SUM(total), 4) AS scanner,
|
||||||
|
/* Sorter Error Percents: */
|
||||||
|
ROUND(SUM(sorter)/SUM(total), 4) AS sorter
|
||||||
|
FROM DATA;
|
||||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 139 KiB |
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 129 B |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 761 B |
|
After Width: | Height: | Size: 1.7 KiB |
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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)
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"color": "#000000",
|
||||||
|
"fontFamily": "Arial"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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])
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"style": {
|
||||||
|
"backgroundColor": "#00CC00",
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"fontFamily": "Arial",
|
||||||
|
"fontWeight": "bold"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 124 KiB |
@ -0,0 +1,130 @@
|
|||||||
|
################################################################
|
||||||
|
################################################################
|
||||||
|
## Version: 1.0 / Author: Dillon Uzar
|
||||||
|
##
|
||||||
|
## DESC: For use in WCS Sorting Lane Lookup & Recording
|
||||||
|
## WARN: Modifying code may cause system to function incorrectly
|
||||||
|
################################################################
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
from __future__ import with_statement
|
||||||
|
import csv
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
import re
|
||||||
|
import string
|
||||||
|
import system
|
||||||
|
import time
|
||||||
|
from os import path
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Constants
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
# Logger:
|
||||||
|
LOG = system.util.logger("WCS Sorting Handler")
|
||||||
|
|
||||||
|
# Defaults for function arguments:
|
||||||
|
PROGRAM_PATH = ""
|
||||||
|
CARTON_PATH = "WCS_Package"
|
||||||
|
DEFAULT_DEVICE = "MCP20"
|
||||||
|
DEFAULT_OPC_SERVER = "Ignition OPC UA Server"
|
||||||
|
|
||||||
|
# Configuration variables:
|
||||||
|
MAX_CARTONS = 100 # Max possible carton IDs
|
||||||
|
MAX_BARCODE_SIZE = 82 # Max possible size of full barcode
|
||||||
|
|
||||||
|
# For extracting PLC info:
|
||||||
|
PACKAGE_DATA = [
|
||||||
|
#["Induct_ID", "induct"], # The induct the package was inducted from
|
||||||
|
#["Scanner_ID", "scanner"], # The scanner the package was scanned from
|
||||||
|
#["Sorter_ID", "sorter"], # The sorter the package was sorted from
|
||||||
|
["BCR_Img_ID", "bcr_imgid"], # Barcode reader, sequence ID
|
||||||
|
["BCR_Seq_ID", "bcr_seqid"], # Barcode reader, image ID
|
||||||
|
["Length", "pkg_length"], # Package length in units of 1/10". Only populated if available, use 0 if not
|
||||||
|
["Width", "pkg_width"], # Package width in units of 1/10". Only populated if available, use 0 if not
|
||||||
|
["Height", "pkg_height"], # Package height in units of 1/10". Only populated if available, use 0 if not
|
||||||
|
["Carriers", "carriers"], # Num of carriers (trays/shoes) on sorter that the package is occupying. Only populated if available, use 0 if not
|
||||||
|
["Gap_Leading", "gap_leading"], # Leading edge gap distance in units of 1/10". Only populated if available, use 0 if not. If value exceeds INT size, cap it to the max INT value
|
||||||
|
["Gap_Trailing", "gap_trailing"], # Trailing edge gap distance in units of 1/10". Only populated if available, use 0 if not. If value exceeds INT size, cap it to the max INT value
|
||||||
|
["S01_Barcode", "s01_barcode"], # The barcode sent in the S01 message
|
||||||
|
["S02_Req_Dest_ID", "s02_req_dest"], # The requested destination ID sent in the S02 message
|
||||||
|
["S02_Alt_Dest_ID", "s02_alt_dest"], # The alternate destination ID sent in the S02 message
|
||||||
|
["S04_PLC_ID", "s04_plc_id"], # Internal PLC number used to track packages and cross reference to the Host ID
|
||||||
|
["S04_Host_ID", "s04_host_id"], # The PLC record number sent in the S04 message, (1 - 9999)
|
||||||
|
["S04_Req_Dest_ID", "s04_req_dest"], # The requested destination ID sent in the S04 message
|
||||||
|
["S04_Act_Dest_ID", "s04_act_dest"], # The actual destination ID sent in the S04 message
|
||||||
|
["S04_Sort_Code", "s04_sort_code"], # The reason code sent in the S04 message
|
||||||
|
["Req_Dest_Reason", "req_dest_reason"], # See Destination Reason Bit-Map sheet
|
||||||
|
["Alt_Dest_Reason", "alt_dest_reason"] # See Destination Reason Bit-Map sheet
|
||||||
|
]
|
||||||
|
TIMESTAMP_DATA = [
|
||||||
|
["S01_Timestamp_H", "s01_timestamp"], # The timestamp sent in the S01 message, Upper 32-bits, UTS in microseconds
|
||||||
|
["S01_Timestamp_L", "s01_timestamp"], # The timestamp sent in the S01 message, Lower 32-bits, UTS in microseconds
|
||||||
|
["S02_Timestamp_H", "s02_timestamp"], # The timestamp sent in the S02 message, Upper 32-bits, UTS in microseconds
|
||||||
|
["S02_Timestamp_L", "s02_timestamp"], # The timestamp sent in the S02 message, Lower 32-bits, UTS in microseconds
|
||||||
|
["S04_Timestamp_H", "s04_timestamp"], # The timestamp sent in the S04 message, Upper 32-bits, UTS in microseconds
|
||||||
|
["S04_Timestamp_L", "s04_timestamp"] # The timestamp sent in the S04 message, Lower 32-bits, UTS in microseconds
|
||||||
|
]
|
||||||
|
# Generate array of paths to read:
|
||||||
|
PACKAGE_PATHS = [v[0] for v in PACKAGE_DATA]
|
||||||
|
TIMESTAMP_PATHS = [v[0] for v in TIMESTAMP_DATA]
|
||||||
|
DATA_PATHS = PACKAGE_PATHS + TIMESTAMP_PATHS
|
||||||
|
|
||||||
|
# For inserting data into database:
|
||||||
|
PACKAGE_COLS = [v[1] for v in PACKAGE_DATA]
|
||||||
|
PACKAGE_VALS = ["?"]*len(PACKAGE_COLS)
|
||||||
|
TIMESTAMP_COLS = [TIMESTAMP_DATA[i][1] for i in range(len(TIMESTAMP_DATA)) if TIMESTAMP_DATA[i][1] in (v[1] for v in TIMESTAMP_DATA[:i])]
|
||||||
|
TIMESTAMP_VALS = ["FROM_UNIXTIME(((?&(POWER(2, 32)-1))*POWER(2, 32)+(?&(POWER(2, 32)-1)))/1000000)"]*len(TIMESTAMP_COLS)
|
||||||
|
UNIQUE_COLS = ["trackid", "induct", "scanner", "sorter"] + PACKAGE_COLS + TIMESTAMP_COLS
|
||||||
|
UNIQUE_VALS = ["?"]*4 + PACKAGE_VALS + TIMESTAMP_VALS
|
||||||
|
CONFIRM_INSERT_QUERY = "INSERT IGNORE INTO package_history (" + ",".join(UNIQUE_COLS) + ") VALUES (" + ",".join(UNIQUE_VALS) + ")"
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### Parsing Utils
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
def isNoRead(field):
|
||||||
|
return field.replace("?","") == ""
|
||||||
|
|
||||||
|
def isMultiRead(field):
|
||||||
|
return field.replace("#","") == ""
|
||||||
|
|
||||||
|
def isBadRead(field):
|
||||||
|
return (field == None or isNoRead(field) or isMultiRead(field))
|
||||||
|
|
||||||
|
def logTime(title, trackID, seconds):
|
||||||
|
millisec = round(seconds * 1000, 1)
|
||||||
|
LOG.info("%s[ID=%s] took %sms to process" % (title, trackID, millisec))
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#######################################################
|
||||||
|
#### PLC Event Handling
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
def processConfirmAsync(trackID, induct, scanner, sorter, program=PROGRAM_PATH, carton=CARTON_PATH, device=DEFAULT_DEVICE, opcServer=DEFAULT_OPC_SERVER):
|
||||||
|
# This function handles confirm events, and logs the event in SQL
|
||||||
|
# Ensure ID is valid
|
||||||
|
if trackID > 0 and trackID < MAX_CARTONS:
|
||||||
|
def processConfirmInner():
|
||||||
|
start_time = time.time()
|
||||||
|
# Setup carton location:
|
||||||
|
devicePrefix = "[" + device + "]" + program
|
||||||
|
cartonPrefix = devicePrefix + carton + "[" + str(trackID) + "]"
|
||||||
|
# Read all carton data directly:
|
||||||
|
tags = [cartonPrefix + "." + path for path in DATA_PATHS]
|
||||||
|
values = [trackID, induct, scanner, sorter] + [value.value for value in system.opc.readValues(opcServer, tags)]
|
||||||
|
logTime("Confirm[PLC_READ]", trackID, time.time() - start_time)
|
||||||
|
start_time = time.time()
|
||||||
|
# Log confirm event in SQL:
|
||||||
|
# Insert into Package History:
|
||||||
|
system.db.runPrepUpdate(CONFIRM_INSERT_QUERY, values)
|
||||||
|
logTime("Confirm[DB_INSERT]", trackID, time.time() - start_time)
|
||||||
|
|
||||||
|
system.util.invokeAsynchronous(processConfirmInner)
|
||||||
|
|
||||||
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |