adjustments in the header view
This commit is contained in:
parent
0d0c63caf4
commit
7a1c6fa62b
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,289 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": true,
|
||||
"plc": "",
|
||||
"searchId": "value",
|
||||
"state": 1,
|
||||
"string": "Running"
|
||||
},
|
||||
"params": {
|
||||
"name": "amber",
|
||||
"tagProps": [
|
||||
"/system/mcm01/test",
|
||||
"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.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"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Starting",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Running"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "EStop or Faulted"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Gridlock Prevention"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Full"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Jammed"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 20
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "substring({view.params.name}, 0, 1)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"textStyle": {
|
||||
"fontSize": "20px",
|
||||
"textAlign": "center",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-JR\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_beacons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#808080",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#FF00FF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#0000D9"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#FF8C00"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"borderStyle": "solid",
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
SELECT DISTINCT sorter
|
||||
FROM package_history
|
||||
ORDER BY sorter ASC;
|
||||
@ -0,0 +1,46 @@
|
||||
WITH SORTERS 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(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:00")
|
||||
)
|
||||
SELECT
|
||||
start_timestamp AS time,
|
||||
hour,
|
||||
/* Counts: */
|
||||
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: */
|
||||
success AS success_pph,
|
||||
awcs AS awcs_issues_pph,
|
||||
operational AS operational_issues_pph,
|
||||
machine AS machine_issues_pph,
|
||||
scanner 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
|
||||
ORDER BY start_timestamp;
|
||||
@ -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,327 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"meta": {
|
||||
"name": "S1-CH1"
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"alwaysShowAll": true,
|
||||
"isClickable": false,
|
||||
"isRightOfSorter": false,
|
||||
"mirror": false
|
||||
},
|
||||
"status": {
|
||||
"tagPath": "[default]MCP03/S01/S01_CH01"
|
||||
}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"params.meta": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.meta.name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.alwaysShowAll": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.isRightOfSorter": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 349,
|
||||
"width": 500
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ChuteLabel"
|
||||
},
|
||||
"position": {
|
||||
"height": 30,
|
||||
"width": 100,
|
||||
"x": 198,
|
||||
"y": 298.8
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.props.status.tagPath"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn utils.prettyName(value.split(\"/\")[-1])",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontSize": "20px",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Chute"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 60,
|
||||
"x": 220,
|
||||
"y": 195
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"alwaysShowAll": true,
|
||||
"isClickable": false,
|
||||
"isRightOfSorter": "{view.params.props.config.isRightOfSorter}",
|
||||
"mirror": "{view.params.props.config.mirror}",
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Templates/Areas/FlexChute",
|
||||
"style": {
|
||||
"transform": "scale(3) rotate(90deg)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttagPath \u003d self.view.params.props.status.tagPath\n\ttags \u003d [tagPath + \"/CH/SetEnable\"]\n\tvalues \u003d [1]\n\tsystem.tag.writeAsync(tags, values)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Enable"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 120,
|
||||
"y": 20.3
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/SetEnable"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/SetEnable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Buttons/Grey",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Buttons/Green"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"expression": "if(isGood({value}),\r\n\t{value},\r\n\t\"Buttons/Grey\"\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {},
|
||||
"text": "Enable"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttagPath \u003d self.view.params.props.status.tagPath\n\ttags \u003d [tagPath + \"/CH/SetEnable\"]\n\tvalues \u003d [0]\n\tsystem.tag.writeAsync(tags, values)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Disable"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 260,
|
||||
"y": 20.3
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/SetEnable"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/SetEnable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Buttons/Grey",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": false,
|
||||
"output": "Buttons/Red"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"expression": "if(isGood({value}),\r\n\t{value},\r\n\t\"Buttons/Grey\"\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {},
|
||||
"text": "Disable"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ChuteLabel_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 35,
|
||||
"width": 260,
|
||||
"x": 120,
|
||||
"y": 63
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/StatusText"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"background-color": "#CFCFCF"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
@ -0,0 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"color": "#FF0000"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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("PE BreakCount Handler")
|
||||
|
||||
# For inserting data into database:
|
||||
CONFIRM_INSERT_QUERY = "INSERT IGNORE INTO pe_history (lane_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(laneID, 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, [laneID, count])
|
||||
logTime("PE_BREAK[DB_INSERT]", laneID, time.time() - start_time)
|
||||
|
||||
def processBreakAsync(laneID, 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, [laneID, count])
|
||||
logTime("PE_BREAK[DB_INSERT]", laneID, time.time() - start_time)
|
||||
|
||||
system.util.invokeAsynchronous(processConfirmInner)
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,907 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"alwaysShowAll": false,
|
||||
"isClickable": true,
|
||||
"isRightOfSorter": false,
|
||||
"mirror": false,
|
||||
"tagPath": "[default]MCP20/SO01/So01_CH01"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.alwaysShowAll": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.isClickable": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.isRightOfSorter": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 60
|
||||
},
|
||||
"loading": {
|
||||
"mode": "blocking"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.parent.openPopup()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Conveyor"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 38,
|
||||
"x": 22
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/IsChuteMode"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value}, true)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"enableHighlight": false,
|
||||
"isClickable": false,
|
||||
"showLabel": false,
|
||||
"type": "bar"
|
||||
},
|
||||
"status": {
|
||||
"color": "#FFF"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.conveyor"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.parent.openPopup()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Gaylord"
|
||||
},
|
||||
"position": {
|
||||
"height": 16,
|
||||
"width": 16,
|
||||
"x": 22,
|
||||
"y": 2
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try( tag({view.params.tagPath}+\"/CH/IsCartMode\")\r\n\t||tag({view.params.tagPath}+\"/CH/IsGLLMode\"),\r\n\ttrue\r\n)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"enableHighlight": false,
|
||||
"isClickable": false
|
||||
}
|
||||
},
|
||||
"type": "dex.display.gaylord"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.parent.openPopup()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Chute"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"rotate": {
|
||||
"anchor": "0 0"
|
||||
},
|
||||
"width": 23
|
||||
},
|
||||
"propConfig": {
|
||||
"props.config.isClickable": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{view.params.isClickable}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/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": {
|
||||
"config": {
|
||||
"showLabel": false
|
||||
}
|
||||
},
|
||||
"type": "dex.display.conveyor"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "LS1"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"width": 6,
|
||||
"x": 19,
|
||||
"y": 14
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/LS1/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonSet({value}, \"tooltip\", replace(jsonGet({value}, \"tooltip\"), \"\u003cbr\u003e\", \" (GR Presence)\u003cbr\u003e\"))",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"showLabel": false
|
||||
}
|
||||
},
|
||||
"type": "dex.display.limitswitch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN1_GRN"
|
||||
},
|
||||
"position": {
|
||||
"height": 5,
|
||||
"rotate": {
|
||||
"angle": "-90deg"
|
||||
},
|
||||
"width": 5,
|
||||
"x": 10,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"position.x": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({../BCN1_AMB.meta.visible}, 10, 5)"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"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": "view.params.mirror"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scale(-1, 1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "dex.display.beacon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN1_AMB"
|
||||
},
|
||||
"position": {
|
||||
"height": 5,
|
||||
"rotate": {
|
||||
"angle": "-90deg"
|
||||
},
|
||||
"width": 5,
|
||||
"x": 5,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/BCN1/AMB/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"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": "view.params.mirror"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scale(-1, 1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "dex.display.beacon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN1_BLU"
|
||||
},
|
||||
"position": {
|
||||
"height": 5,
|
||||
"rotate": {
|
||||
"angle": "-90deg"
|
||||
},
|
||||
"width": 5,
|
||||
"y": 15
|
||||
},
|
||||
"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": "view.params.mirror"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scale(-1, 1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "dex.display.beacon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "GS1_ENABLE"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"width": 6,
|
||||
"x": 38,
|
||||
"y": 14
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GS1/Enable/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.pushbutton"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PE3"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"rotate": {
|
||||
"anchor": "0 50%"
|
||||
},
|
||||
"width": 8,
|
||||
"x": 3,
|
||||
"y": 2
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/PE3/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonSet({value}, \"tooltip\", replace(jsonGet({value}, \"tooltip\"), \"\u003cbr\u003e\", \" (GL 100% Full)\u003cbr\u003e\"))",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PE4"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"rotate": {
|
||||
"anchor": "0 50%",
|
||||
"angle": "-45deg"
|
||||
},
|
||||
"width": 8,
|
||||
"x": 5,
|
||||
"y": 10
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/PE4/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonSet({value}, \"tooltip\", replace(jsonGet({value}, \"tooltip\"), \"\u003cbr\u003e\", \" (GL Presence)\u003cbr\u003e\"))",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PE2"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"width": 28,
|
||||
"x": 13,
|
||||
"y": 7
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/PE2/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonSet({value}, \"tooltip\", replace(jsonGet({value}, \"tooltip\"), \"\u003cbr\u003e\", \" (GR 50% Full)\u003cbr\u003e\"))",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PE1B"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"rotate": {
|
||||
"anchor": "0 50%"
|
||||
},
|
||||
"width": 20,
|
||||
"x": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.isRightOfSorter"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "-45deg",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "45deg"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"position.y": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.isRightOfSorter"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 14,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/PE1B/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonSet({value}, \"tooltip\", replace(jsonGet({value}, \"tooltip\"), \"\u003cbr\u003e\", \" (GR 100% Full)\u003cbr\u003e\"))",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PE1A"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"rotate": {
|
||||
"anchor": "0 50%"
|
||||
},
|
||||
"width": 20,
|
||||
"x": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.isRightOfSorter"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "45deg",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "-45deg"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"position.y": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.isRightOfSorter"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": 14
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/PE1A/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonSet({value}, \"tooltip\", replace(jsonGet({value}, \"tooltip\"), \"\u003cbr\u003e\", \" (GR 100% Full)\u003cbr\u003e\"))",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.params.alwaysShowAll},\r\n\tjsonSet({value}, \"showAlways\", {view.params.alwaysShowAll}),\r\n\t{value}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RS1_RESTART"
|
||||
},
|
||||
"position": {
|
||||
"height": 6,
|
||||
"width": 6,
|
||||
"x": 44,
|
||||
"y": 14
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/RS1/Restart/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.pushbutton"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FIO1"
|
||||
},
|
||||
"position": {
|
||||
"height": 5,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/FIO1/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.eip"
|
||||
}
|
||||
],
|
||||
"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 \"FlexChute|\" + 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\": \"chutedestination\",\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\"isRightOfSorter\": self.view.params.isRightOfSorter,\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,160 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 400,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": "100%"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(\r\n\tproperty(\"../TabContainer.props.tabs[\"+{../TabContainer.props.currentTabIndex}+\"]\"),\r\n\t\"No Configs\"\r\n)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#1A4A5E",
|
||||
"borderBottomColor": "#000000",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "2px",
|
||||
"color": "#fff",
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": 20,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.sendMessage(\"export-data\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 30,
|
||||
"width": 100,
|
||||
"x": "calc(100% - 105px)",
|
||||
"y": 5
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Buttons/Grey"
|
||||
},
|
||||
"text": "Export"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TabContainer"
|
||||
},
|
||||
"position": {
|
||||
"height": "calc(100% - 40px)",
|
||||
"width": "100%",
|
||||
"y": 40
|
||||
},
|
||||
"propConfig": {
|
||||
"props.tabs": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"auth": "{session.props.auth.user.roles}",
|
||||
"tabs": "{[default]Gateway/ConfigTabs}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\troles \u003d [\"Administrator\", \"Developer\", \"Supervisor\"]\n\tauth \u003d value.auth\n\ttabs \u003d value.tabs\n\tisNotAuth \u003d (auth \u003d\u003d None or len(auth) \u003d\u003d 0 or len([i for i in auth if i in roles]) \u003d\u003d 0)\n\treturn [v[\"title\"] for v in utils.datasetToJSON(tabs) if v[\"isVisible\"] and not (v[\"isSupervisor\"] and isNotAuth)]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"menuStyle": {
|
||||
"backgroundColor": "#225E77"
|
||||
},
|
||||
"tabSize": {
|
||||
"width": 140
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"backgroundColor": "#2D7D9F",
|
||||
"color": "#FFF",
|
||||
"fontWeight": "bold"
|
||||
},
|
||||
"inactive": {
|
||||
"backgroundColor": "#389CC7",
|
||||
"color": "#FFF"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"height": "calc(100% - 75px)",
|
||||
"width": "100%",
|
||||
"y": 75
|
||||
},
|
||||
"propConfig": {
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": " \"Windows/Configs/\"\r\n+replace(\r\n\tproperty(\"../TabContainer.props.tabs[\"+{../TabContainer.props.currentTabIndex}+\"]\"),\r\n\t\" \",\r\n\t\"\"\r\n)"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Configs/Shifts"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"min-width": "1000px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 820
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "OXD_Inbound"
|
||||
},
|
||||
"position": {
|
||||
"height": 800,
|
||||
"width": 636,
|
||||
"x": 10,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/OXD_Inbound",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 128,
|
||||
"x": 630,
|
||||
"y": 79
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDSingulatorStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(1.5)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
WITH INDUCTS AS (
|
||||
SELECT
|
||||
DATE_FORMAT(MIN(timestamp), "%Y-%m-%d %H:%i:00") AS time,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
AND lane_id = :induct
|
||||
GROUP BY DATE_FORMAT(timestamp, "%Y-%m-%d %H:%i:00")
|
||||
ORDER BY DATE_FORMAT(timestamp, "%Y-%m-%d %H:%i:00")
|
||||
)
|
||||
SELECT
|
||||
time,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
ROUND(total*60) AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM INDUCTS;
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,706 @@
|
||||
{
|
||||
"custom": {
|
||||
"class": 2
|
||||
},
|
||||
"params": {
|
||||
"classDropdownValue": [
|
||||
"Error"
|
||||
],
|
||||
"titleExtra": "0 rows"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.class": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.classDropdownValue"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tvalue \u003d list(value)\n\tif \"Message\" in value:\n\t\treturn 0\n\telif \"Warning\" in value:\n\t\treturn 1\n\telif \"Error\" in value:\n\t\treturn 2\n\telse:\n\t\treturn 0",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.classDropdownValue": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.classDropdownValue[0]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.titleExtra": {
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 324,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onRowDoubleClick": {
|
||||
"config": {
|
||||
"script": "\tscreen \u003d alarms.resolveScreenBySource(event.value.source)\n\tif screen \u003c\u003e \"\":\n\t\twindow \u003d \"Windows/GraphicsWrapper\"\n\t\tparams \u003d {\"view\": screen}\n\t\tsystem.perspective.navigate(\"/\")\n\t\tsystem.perspective.navigate(view\u003dwindow, params\u003dparams)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Table"
|
||||
},
|
||||
"position": {
|
||||
"height": "100%",
|
||||
"width": "100%"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"parameters": {
|
||||
"class": "{view.custom.class}",
|
||||
"endDate": "{session.custom.timewidget.endDate}",
|
||||
"priority": "if({view.custom.class} \u003e 0, 1, 0)",
|
||||
"startDate": "{session.custom.timewidget.startDate}"
|
||||
},
|
||||
"queryPath": "Alarms/History"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tcou \u003d utils.getRowCount(value)\n\tast \u003d \"*\" if cou \u003e\u003d 2000 else \"\"\n\tself.view.params.titleExtra \u003d \"{:n}{} rows\".format(cou, ast)\n\t# Return data\n\treturn value",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput_json \u003d []\n\t# Transform dataset into json:\n\tfor row in range(value.getRowCount()):\n\t\trow_object \u003d {\"value\": {}}\n\t\t# Populate row values:\n\t\tfor col in range(value.getColumnCount()):\n\t\t\trow_object[\"value\"][value.getColumnName(col)] \u003d value.getValueAt(row, col)\n\t\t\t# Check if endtime isn\u0027t reached:\n\t\t\tif value.getColumnName(col) \u003d\u003d \u0027endtime\u0027 and value.getValueAt(row, col) in [None, \"\"]:\n\t\t\t\trow_object[\u0027style\u0027] \u003d {\"background\": \"#F4B084\"}\n\t\t# Append to json output:\n\t\toutput_json.append(row_object)\n\t# Return as json:\n\treturn output_json",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "query"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"cells": {
|
||||
"style": {
|
||||
"borderBottomColor": "#D5D5D5",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "1px",
|
||||
"borderRightColor": "#D5D5D5",
|
||||
"borderRightStyle": "solid",
|
||||
"borderRightWidth": "1px",
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "16px"
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "id",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Number (ID)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 125
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "starttime",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Start Timestamp"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 175
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "endtime",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "End Timestamp"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 175
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "duration",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Duration"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 125
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "class",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Class"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 125
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "device",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Location"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "description",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Description"
|
||||
},
|
||||
"justify": "auto",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "plctag",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Tag"
|
||||
},
|
||||
"justify": "auto",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "source",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"justify": "auto",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"track": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"enabled": true,
|
||||
"format": "0,0.##",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": false,
|
||||
"width": ""
|
||||
}
|
||||
],
|
||||
"filter": {
|
||||
"enabled": true
|
||||
},
|
||||
"pager": {
|
||||
"bottom": false
|
||||
},
|
||||
"rows": {
|
||||
"highlight": {
|
||||
"enabled": false
|
||||
},
|
||||
"striped": {
|
||||
"enabled": false
|
||||
},
|
||||
"style": {
|
||||
"classes": "table/highlight"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "16px",
|
||||
"fontWeight": "bold",
|
||||
"zoom": 1
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "export-data",
|
||||
"pageScope": true,
|
||||
"script": "\tutils.downloadCSV(self, \"Alarm History\")",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
@ -0,0 +1,291 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"meta": {
|
||||
"name": "S1-CH1"
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"alwaysShowAll": true,
|
||||
"isClickable": false,
|
||||
"mirror": false,
|
||||
"rotate": false
|
||||
},
|
||||
"status": {
|
||||
"tagPath": "[default]MCP06/PS04/PS04_17CH"
|
||||
}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"params.meta": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.meta.name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.alwaysShowAll": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.rotate": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 349,
|
||||
"width": 500
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ChuteLabel"
|
||||
},
|
||||
"position": {
|
||||
"height": 35,
|
||||
"width": 260,
|
||||
"x": 120,
|
||||
"y": 63
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Conv/StatusText"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttagPath \u003d self.view.params.props.status.tagPath\n\ttags \u003d [tagPath + \"/Conv/SetEnable\"]\n\tvalues \u003d [1]\n\tsystem.tag.writeAsync(tags, values)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Enable"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 120,
|
||||
"y": 20.3
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Conv/SetEnable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Conv/SetEnable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Buttons/Grey",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Buttons/Green"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"expression": "if(isGood({value}),\r\n\t{value},\r\n\t\"Buttons/Grey\"\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {},
|
||||
"text": "Enable"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttagPath \u003d self.view.params.props.status.tagPath\n\ttags \u003d [tagPath + \"/Conv/SetEnable\"]\n\tvalues \u003d [0]\n\tsystem.tag.writeAsync(tags, values)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Disable"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 260,
|
||||
"y": 20.3
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Conv/SetEnable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Conv/SetEnable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Buttons/Grey",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": false,
|
||||
"output": "Buttons/Red"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"expression": "if(isGood({value}),\r\n\t{value},\r\n\t\"Buttons/Grey\"\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {},
|
||||
"text": "Disable"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "SpiralChute"
|
||||
},
|
||||
"position": {
|
||||
"height": 92,
|
||||
"width": 94,
|
||||
"x": 203.775,
|
||||
"y": 154.5
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"alwaysShowAll": true,
|
||||
"isClickable": false,
|
||||
"mirror": "{view.params.props.config.mirror}",
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Templates/Areas/RRChute",
|
||||
"style": {
|
||||
"transform": "scale(2)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"background-color": "#CFCFCF"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,297 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"meta": {
|
||||
"name": "PE1"
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"enableHighlight": true,
|
||||
"isClickable": false,
|
||||
"type": "reflector"
|
||||
},
|
||||
"status": {
|
||||
"color": "#aaa",
|
||||
"showAlways": true,
|
||||
"tagPath": "",
|
||||
"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": "PhotoEye"
|
||||
},
|
||||
"position": {
|
||||
"height": 30,
|
||||
"width": 102,
|
||||
"x": 48.5,
|
||||
"y": 20
|
||||
},
|
||||
"propConfig": {
|
||||
"props.config.type": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.props.config.type"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"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.photoeye"
|
||||
},
|
||||
{
|
||||
"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": "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_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": "Label_11"
|
||||
},
|
||||
"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": "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,193 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"parentFolder": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.parentFolder": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 300,
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Markdown"
|
||||
},
|
||||
"position": {
|
||||
"height": "calc(100% - 150px)",
|
||||
"width": "calc(100% - 50px)",
|
||||
"x": 25,
|
||||
"y": 60
|
||||
},
|
||||
"propConfig": {
|
||||
"props.source": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"folderName": "{../TextField.props.text}",
|
||||
"parentFolder": "{view.params.parentFolder}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\timport os\n\t\n\ttext \u003d \"Are you sure you would like to create the following folder:\\n\"\n\ttext +\u003d \"\\n* \"+os.path.join(value.parentFolder, value.folderName)\n\treturn text",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "ia.display.markdown"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\timport os\n\t\n\tparentFolder \u003d self.view.params.parentFolder\n\tfolderName \u003d self.getSibling(\"TextField\").props.text\n\tdocuments.createFolder(os.path.join(parentFolder, folderName))\n\tsystem.perspective.sendMessage(\"custom-documents-refreshlist\", {})\n\tsystem.perspective.closePopup(\"\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button_Yes"
|
||||
},
|
||||
"position": {
|
||||
"height": 55,
|
||||
"width": 100,
|
||||
"x": 25,
|
||||
"y": 235
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../TextField.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tif value \u003d\u003d \"\":\n\t\treturn False\n\t# Only support alphanumeric folder names:\n\treturn \"\".join([c for c in value if c.isalpha() or c.isdigit() or c\u003d\u003d\u0027 \u0027]).strip() \u003d\u003d value",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Buttons/Grey"
|
||||
},
|
||||
"text": "Yes"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closePopup(\"\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button_No"
|
||||
},
|
||||
"position": {
|
||||
"height": 55,
|
||||
"width": 100,
|
||||
"x": "calc(100% - 125px)",
|
||||
"y": 235
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Buttons/Grey"
|
||||
},
|
||||
"text": "No"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TextField"
|
||||
},
|
||||
"position": {
|
||||
"height": 32,
|
||||
"width": "calc(100% - 125px)",
|
||||
"x": 115,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"deferUpdates": false
|
||||
},
|
||||
"type": "ia.input.text-field"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 32,
|
||||
"width": 110,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"textAlign": "right"
|
||||
},
|
||||
"text": "Folder Name:"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_BadFolderName"
|
||||
},
|
||||
"position": {
|
||||
"height": 12,
|
||||
"width": 250,
|
||||
"x": 120,
|
||||
"y": 42
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{../Button_Yes.props.enabled}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "red",
|
||||
"fontSize": "12px"
|
||||
},
|
||||
"text": "* Empty or contains invalid characters"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1993,
|
||||
"width": 4243
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "HSS_Sorter"
|
||||
},
|
||||
"position": {
|
||||
"height": 1973,
|
||||
"width": 4223,
|
||||
"x": 10,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/HSS_Sorter",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_HSS_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 125,
|
||||
"x": 170,
|
||||
"y": 720
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]HSSSingulatorStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(3)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_Runout"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 74,
|
||||
"x": 3760,
|
||||
"y": 1840
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]RunoutStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(3)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,578 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"alwaysShowAll": false,
|
||||
"chuteNum": "",
|
||||
"isClickable": true,
|
||||
"mirror": false,
|
||||
"tagPath": ""
|
||||
},
|
||||
"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": 115,
|
||||
"width": 95
|
||||
},
|
||||
"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": 79,
|
||||
"x": 21,
|
||||
"y": 115
|
||||
},
|
||||
"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": 67
|
||||
},
|
||||
"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": 82
|
||||
},
|
||||
"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": 97
|
||||
},
|
||||
"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": "GS1_ENABLE"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 20,
|
||||
"x": 21,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GS1/Enable/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.pushbutton"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "GS1_RESTART"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 20,
|
||||
"x": 40,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/RS1/Restart/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.pushbutton"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Full_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {
|
||||
"angle": 180
|
||||
},
|
||||
"width": 62,
|
||||
"x": 17,
|
||||
"y": 69
|
||||
},
|
||||
"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": "Jam_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {
|
||||
"angle": 180
|
||||
},
|
||||
"width": 62,
|
||||
"x": 17,
|
||||
"y": 99
|
||||
},
|
||||
"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": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 15,
|
||||
"width": "100%"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.transform": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "parent.props.style.transform"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.chuteNum"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": "15px",
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Half_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {
|
||||
"angle": 180
|
||||
},
|
||||
"width": 62,
|
||||
"x": 17,
|
||||
"y": 39
|
||||
},
|
||||
"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": "FIO1"
|
||||
},
|
||||
"position": {
|
||||
"height": 15,
|
||||
"rotate": {
|
||||
"angle": "-90deg"
|
||||
},
|
||||
"width": 30,
|
||||
"x": -7,
|
||||
"y": 43
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/FIO1/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": "view.params.mirror"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scale(1, -1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "dex.display.eip"
|
||||
}
|
||||
],
|
||||
"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,267 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": 0,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "value",
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"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\n0, \"No active alarms\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Communication Faulted\",\r\n0, \"Normal\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 30,
|
||||
"width": 41
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"props": {
|
||||
"text": "MCM",
|
||||
"textStyle": {
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\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/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.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": "session.custom.alarm_filter.show_dpm_mcm"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \u0027#808080\u0027,\r\n if(\r\n {view.custom.state} \u003d 1,\r\n \u0027#FF0000\u0027,\r\n if(\r\n {view.custom.state} \u003d 0,\r\n \u0027#00D900\u0027,\r\n \u0027#fff700\u0027\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"borderStyle": "solid",
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(255,0,0,1) 0%, rgba(245,0,0,1) 70%, rgba(208,0,0,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(0deg, rgba(255,0,0,1) 0%, rgba(245,0,0,1) 70%, rgba(208,0,0,1) 100%);",
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pseudo": "disabled",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(208,0,0,1) 0%, rgba(208,0,0,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#555555",
|
||||
"cursor": "not-allowed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "1s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"backgroundColor": "#007EFCB3"
|
||||
},
|
||||
"100%": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,62 @@
|
||||
WITH range_alarm_events AS (
|
||||
SELECT *,
|
||||
/* Get the last time this event was active within the given time range*/
|
||||
(
|
||||
/* Search for the clear event (if exists) for the outer query's active event */
|
||||
SELECT MIN(eventtime)
|
||||
FROM alarm_events e2
|
||||
WHERE e2.eventid = e.eventid /* eventid is unique per alarm instance */
|
||||
AND e2.eventtime >= e.eventtime
|
||||
AND e2.eventtype = 1 /* Look only for the clear event */
|
||||
ORDER BY eventtime ASC
|
||||
LIMIT 1
|
||||
) AS endtime
|
||||
FROM alarm_events e
|
||||
/* The range for both start/end allows for index optimizations */
|
||||
WHERE eventtime BETWEEN :startDate AND :endDate
|
||||
/* Filter out system events */
|
||||
AND eventflags & 1 != 1
|
||||
/* Filter priority */
|
||||
AND priority >= :priority
|
||||
/* Filter for Active events */
|
||||
AND eventtype = 0
|
||||
ORDER BY eventtime DESC
|
||||
LIMIT 2000
|
||||
), range_alarm_events2 AS (
|
||||
SELECT *,
|
||||
LEAST(COALESCE(endtime, NOW()), :endDate) AS endtime_est, /* Clamp to end of time range if clear event is after end time */
|
||||
TIMESTAMPDIFF(SECOND, eventtime, LEAST(COALESCE(endtime, NOW()), :endDate)) AS duration
|
||||
FROM range_alarm_events
|
||||
)
|
||||
SELECT e.id,
|
||||
e.eventtime AS starttime, e.endtime,
|
||||
/* Translate duration to a string */
|
||||
CAST(SEC_TO_TIME(FLOOR(e.duration)) AS CHAR) AS duration,
|
||||
/* Retrieve data */
|
||||
ddevice.strvalue AS device,
|
||||
displaypath AS description,
|
||||
e.source,
|
||||
/* Translate priority to string */
|
||||
dclass.strvalue AS class,
|
||||
CASE
|
||||
WHEN e.priority=4 THEN "Critical"
|
||||
WHEN e.priority=3 THEN "High"
|
||||
WHEN e.priority=2 THEN "Medium"
|
||||
WHEN e.priority=1 THEN "Low"
|
||||
WHEN e.priority=0 THEN "Diagnostic"
|
||||
ELSE "N/A"
|
||||
END AS priority,
|
||||
/* Retrieve PLCTag */
|
||||
dtag.strvalue AS plctag
|
||||
FROM range_alarm_events2 e
|
||||
/* Lookup PLCTag */
|
||||
JOIN alarm_event_data dtag ON e.id = dtag.id AND dtag.propname = "PLCTag"
|
||||
/* Lookup Device */
|
||||
JOIN alarm_event_data ddevice ON e.id = ddevice.id AND ddevice.propname = "Device"
|
||||
/* Lookup Class */
|
||||
JOIN alarm_event_data dclass ON e.id = dclass.id AND dclass.propname = "Class"
|
||||
WHERE CASE
|
||||
WHEN dclass.strvalue = "Error" THEN 2
|
||||
WHEN dclass.strvalue = "Warning" THEN 1
|
||||
WHEN dclass.strvalue = "Message" THEN 0
|
||||
END >= :class;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"color": "#808080"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 306,
|
||||
"width": 948
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "OXD_Problem_Solve"
|
||||
},
|
||||
"position": {
|
||||
"height": 286,
|
||||
"width": 928,
|
||||
"x": 10,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/OXD_Problem_Solve",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 128,
|
||||
"x": 50,
|
||||
"y": 247
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDSingulatorStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(1.5)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Sorter"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 97,
|
||||
"x": 760,
|
||||
"y": 247
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDSorterStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(1.5)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
WITH LANES AS (
|
||||
SELECT
|
||||
MIN(timestamp) AS start_timestamp,
|
||||
MAX(timestamp) AS end_timestamp,
|
||||
3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate) AS pph_multiplier,
|
||||
lane_id AS lane,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
AND lane_id LIKE "CH%"
|
||||
GROUP BY lane_id
|
||||
ORDER BY lane_id
|
||||
)
|
||||
SELECT
|
||||
start_timestamp,
|
||||
end_timestamp,
|
||||
lane,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
ROUND(total*pph_multiplier) AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM LANES;
|
||||
@ -0,0 +1,328 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"meta": {
|
||||
"name": "Conveyor"
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"enableHighlight": true,
|
||||
"isClickable": false,
|
||||
"showLabel": true,
|
||||
"type": "belt"
|
||||
},
|
||||
"status": {
|
||||
"color": "#aaa",
|
||||
"isManual": false,
|
||||
"showAlways": true,
|
||||
"tagPath": "",
|
||||
"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": "Conveyor"
|
||||
},
|
||||
"position": {
|
||||
"height": 30,
|
||||
"width": 150,
|
||||
"x": 20,
|
||||
"y": 20
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.name": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Label"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value}, \u0027Conveyor\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"props.config.showLabel": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.props.config.showLabel"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.config.type": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.props.config.type"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"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.conveyor"
|
||||
},
|
||||
{
|
||||
"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_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": "Label_11"
|
||||
},
|
||||
"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_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,38 @@
|
||||
WITH INDUCTS AS (
|
||||
SELECT
|
||||
DATE_FORMAT(MIN(s04_timestamp), "%Y-%m-%d %H:00") AS start_timestamp,
|
||||
sorter,
|
||||
induct,
|
||||
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
|
||||
FROM package_history
|
||||
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||
GROUP BY sorter, induct, DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:00")
|
||||
), SORTERS AS (
|
||||
SELECT
|
||||
start_timestamp,
|
||||
sorter,
|
||||
SUM(total) AS total
|
||||
FROM INDUCTS
|
||||
GROUP BY sorter, start_timestamp
|
||||
)
|
||||
SELECT
|
||||
I.start_timestamp AS time,
|
||||
hour,
|
||||
/* Counts: */
|
||||
I.total AS total_count,
|
||||
/* PPH: */
|
||||
I.total AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(I.total/S.total, 4) AS 'total/sorter_percent'
|
||||
FROM INDUCTS I, SORTERS S
|
||||
WHERE induct=:induct AND I.sorter=S.sorter AND I.start_timestamp=S.start_timestamp
|
||||
ORDER BY I.start_timestamp ASC;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFDC00"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,332 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"titleExtra": "5 rows",
|
||||
"usesTimewidget": false
|
||||
},
|
||||
"propConfig": {
|
||||
"params.titleExtra": {
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
},
|
||||
"params.usesTimewidget": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "false"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 324,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "SpiralStatus"
|
||||
},
|
||||
"position": {
|
||||
"height": "100%",
|
||||
"width": "50%"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "[default]SpiralStatus"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"cells": {
|
||||
"style": {
|
||||
"borderBottomColor": "#D5D5D5",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "1px",
|
||||
"borderRightColor": "#D5D5D5",
|
||||
"borderRightStyle": "solid",
|
||||
"borderRightWidth": "1px",
|
||||
"color": "#000",
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "14px"
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "status",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Status"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 160
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "count",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Count (#)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": "value"
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 160
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "percent",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Percentage (%)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0.##%",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 160
|
||||
}
|
||||
],
|
||||
"filter": {
|
||||
"enabled": true
|
||||
},
|
||||
"pager": {
|
||||
"bottom": false
|
||||
},
|
||||
"rows": {
|
||||
"highlight": {
|
||||
"enabled": false
|
||||
},
|
||||
"striped": {
|
||||
"enabled": false
|
||||
},
|
||||
"style": {
|
||||
"classes": "table/highlight"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "export-data",
|
||||
"pageScope": true,
|
||||
"script": "\tutils.downloadCSV(self, \"Spiral Status\")",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PieChart"
|
||||
},
|
||||
"position": {
|
||||
"height": "100%",
|
||||
"width": "50%",
|
||||
"x": "50%"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "[default]SpiralStatus"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"colors": [
|
||||
"limegreen",
|
||||
"#FF0",
|
||||
"#00F",
|
||||
"#AAA",
|
||||
"#FF8C00",
|
||||
"#F00",
|
||||
"#808080"
|
||||
],
|
||||
"style": {
|
||||
"borderLeftColor": "#000",
|
||||
"borderLeftStyle": "solid",
|
||||
"borderLeftWidth": 2
|
||||
},
|
||||
"threeDimensional": true,
|
||||
"title": "Spiral Status"
|
||||
},
|
||||
"type": "ia.chart.pie"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,773 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"alwaysShowAll": false,
|
||||
"isClickable": true,
|
||||
"mirror": false,
|
||||
"rotation": 0,
|
||||
"tagPath": "[default]MCP03/CH_20105/CH_20105"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.alwaysShowAll": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.isClickable": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.rotation": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 60,
|
||||
"width": 85
|
||||
},
|
||||
"loading": {
|
||||
"mode": "blocking"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.parent.openPopup()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Gaylord_16"
|
||||
},
|
||||
"position": {
|
||||
"height": 31,
|
||||
"width": 31,
|
||||
"x": 54,
|
||||
"y": 29
|
||||
},
|
||||
"propConfig": {
|
||||
"props.config.isClickable": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{view.params.isClickable}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GLL/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {}
|
||||
},
|
||||
"type": "dex.display.gaylord"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.parent.openPopup()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "SpiralChute_241"
|
||||
},
|
||||
"position": {
|
||||
"height": 60,
|
||||
"width": 60
|
||||
},
|
||||
"propConfig": {
|
||||
"props.config.isClickable": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{view.params.isClickable}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {}
|
||||
},
|
||||
"type": "dex.display.spiralchute"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "GS1"
|
||||
},
|
||||
"position": {
|
||||
"height": 13,
|
||||
"width": 13,
|
||||
"x": 72,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GS1/Enable/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.pushbutton"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN1_GRN",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {},
|
||||
"width": 10,
|
||||
"x": 61
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.rotation"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"position.y": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.rotation} \u003d 180, 0, 18)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/BCN1/GRN/Graphics"
|
||||
},
|
||||
"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.beacon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN1_AMB"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {},
|
||||
"width": 10,
|
||||
"x": 61,
|
||||
"y": 9
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.rotation"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "dex.display.beacon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Ch_Full_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 7,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": "315deg"
|
||||
},
|
||||
"width": 30,
|
||||
"x": 1,
|
||||
"y": 53
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Ch_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": "RS1"
|
||||
},
|
||||
"position": {
|
||||
"height": 13,
|
||||
"width": 13,
|
||||
"x": 72
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/RS1/Restart/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.pushbutton"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "GLL_Open_PX"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {},
|
||||
"width": 10,
|
||||
"x": 72,
|
||||
"y": 49
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.rotation"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GLL_Open_PX/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": {
|
||||
"config": {
|
||||
"showLabel": "PX"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.limitswitch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "GLL_Closed_PX"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {},
|
||||
"width": 10,
|
||||
"x": 61,
|
||||
"y": 49
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.rotation"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GLL_Closed_PX/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": {
|
||||
"config": {
|
||||
"showLabel": "PX"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.limitswitch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN1_BLU"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {},
|
||||
"width": 10,
|
||||
"x": 61
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.rotation"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"position.y": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.rotation} \u003d 180, 18, 0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "dex.display.beacon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Ch_Half_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 7,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": 135
|
||||
},
|
||||
"width": 30,
|
||||
"x": 58,
|
||||
"y": 6
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Ch_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": "GLL_Cart_Full_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 7,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": "180deg"
|
||||
},
|
||||
"width": 16,
|
||||
"x": 81,
|
||||
"y": 47
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GLL_Cart_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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "GLL_Present_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 7,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": "90deg"
|
||||
},
|
||||
"width": 16,
|
||||
"x": 68,
|
||||
"y": 33
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/GLL_Present_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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.photoeye"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Ch_Jam_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 7,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": 225
|
||||
},
|
||||
"width": 30,
|
||||
"x": 53,
|
||||
"y": 58
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH_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": "FIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {
|
||||
"angle": 270
|
||||
},
|
||||
"width": 20,
|
||||
"x": -5,
|
||||
"y": 5
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/FIO1/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.eip"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Cart_Present_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 7,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": "90deg"
|
||||
},
|
||||
"width": 16,
|
||||
"x": 75,
|
||||
"y": 33
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Cart_Present_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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"type": "diffuse"
|
||||
}
|
||||
},
|
||||
"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 \"SpiralChute|\" + 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\": \"spiralchute\",\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\"rotation\": self.view.params.rotation\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,4 @@
|
||||
SELECT DISTINCT lane_id
|
||||
FROM pe_history
|
||||
WHERE lane_id LIKE "CH%"
|
||||
ORDER BY lane_id;
|
||||
@ -0,0 +1,549 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"meta": {
|
||||
"name": "MCP"
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"enableHighlight": true,
|
||||
"isClickable": false
|
||||
},
|
||||
"status": {
|
||||
"color": "#aaa",
|
||||
"showAlways": true,
|
||||
"tagPath": "",
|
||||
"tooltip": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"params.meta": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.meta.name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 180,
|
||||
"width": 500
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "MCP"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 100,
|
||||
"x": 50,
|
||||
"y": 15
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.name": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Label"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value}, \u0027MCP\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"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.mcp"
|
||||
},
|
||||
{
|
||||
"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": "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_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": "Label_11"
|
||||
},
|
||||
"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": "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": "CPU_Switch"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"rotate": {
|
||||
"angle": "135deg"
|
||||
},
|
||||
"width": 40,
|
||||
"x": 80,
|
||||
"y": 100
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/aoCPU.jsonValues"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttry:\n\t\tif value.Key_Run:\n\t\t\treturn \"0deg\"\n\t\telif value.Key_Rem:\n\t\t\treturn \"45deg\"\n\t\telif value.Key_Pgm:\n\t\t\treturn \"90deg\"\n\t\telse:\n\t\t\treturn \"135deg\"\n\texcept:\n\t\treturn \"135deg\"",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"props.elements[0].d": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.position.rotate.angle}\u003d\"135deg\",\r\n\t\"M40,40L0,0\",\r\n\t\"M40,40L0,0H20M0,0V20\"\r\n)"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M40,40L0,0",
|
||||
"fill": {
|
||||
"paint": "none"
|
||||
},
|
||||
"stroke": {
|
||||
"linecap": "square",
|
||||
"paint": "#000",
|
||||
"width": 5
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 41 41"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 40,
|
||||
"x": 40,
|
||||
"y": 70
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.borderWidth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/aoCPU/Key_Run"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "forceQuality({value}, 192)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": 2
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 0,
|
||||
"fontSize": 11,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center",
|
||||
"user-select": "none"
|
||||
},
|
||||
"text": "RUN"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 40,
|
||||
"x": 80,
|
||||
"y": 70
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.borderWidth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/aoCPU/Key_Rem"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "forceQuality({value}, 192)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": 2
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 0,
|
||||
"fontSize": 11,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center",
|
||||
"user-select": "none"
|
||||
},
|
||||
"text": "REM"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_2"
|
||||
},
|
||||
"position": {
|
||||
"height": 20,
|
||||
"width": 40,
|
||||
"x": 120,
|
||||
"y": 70
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.borderWidth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/aoCPU/Key_Pgm"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "forceQuality({value}, 192)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": 2
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 0,
|
||||
"fontSize": 11,
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center",
|
||||
"user-select": "none"
|
||||
},
|
||||
"text": "PGM"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"background-color": "#CFCFCF"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,238 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "",
|
||||
"view": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.enableTooltip": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.label": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.view": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 40,
|
||||
"width": 80
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"expression": "{view.params.enableTooltip} \u0026\u0026 {view.params.tagPath} !\u003d \"\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"dom": {
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.areaHover \u003d nav.getAreas(self.view.params.view)"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseLeave": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.areaHover \u003d []"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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,10 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#00CC00",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
WITH LANES AS (
|
||||
SELECT
|
||||
DATE_FORMAT(MIN(timestamp), "%Y-%m-%d %H:00") AS start_timestamp,
|
||||
CONCAT("H",
|
||||
CAST(
|
||||
TIMESTAMPDIFF(
|
||||
HOUR,
|
||||
DATE_FORMAT(MIN(timestamp), "%Y-%m-%d %H:00:00"),
|
||||
DATE_FORMAT(LEAST(CURRENT_TIMESTAMP(), :endDate), "%Y-%m-%d %H:00:00")
|
||||
) AS CHAR
|
||||
)
|
||||
) AS hour,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
AND lane_id=:lane
|
||||
GROUP BY DATE_FORMAT(timestamp, "%Y-%m-%d %H:00")
|
||||
)
|
||||
SELECT
|
||||
start_timestamp,
|
||||
hour,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
total AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM LANES;
|
||||
@ -0,0 +1,19 @@
|
||||
WITH INDUCTS AS (
|
||||
SELECT
|
||||
DATE_FORMAT(MIN(timestamp), "%Y-%m-%d %H:%i:00") AS time,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
AND lane_id = :chute
|
||||
GROUP BY DATE_FORMAT(timestamp, "%Y-%m-%d %H:%i:00")
|
||||
ORDER BY DATE_FORMAT(timestamp, "%Y-%m-%d %H:%i:00")
|
||||
)
|
||||
SELECT
|
||||
time,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
ROUND(total*60) AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM INDUCTS;
|
||||
@ -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,112 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"filenames": []
|
||||
},
|
||||
"propConfig": {
|
||||
"params.filenames": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 300,
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Markdown"
|
||||
},
|
||||
"position": {
|
||||
"height": "calc(100% - 100px)",
|
||||
"width": "calc(100% - 50px)",
|
||||
"x": 25,
|
||||
"y": 25
|
||||
},
|
||||
"propConfig": {
|
||||
"props.source": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.filenames"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttext \u003d \"Are you sure you would like to delete the following config files:\\n\"\n\tfor val in value:\n\t\ttext +\u003d \"\\n* \"+val.value\n\treturn text",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "ia.display.markdown"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tfilenames \u003d [filename.value for filename in self.view.params.filenames]\n\terr \u003d reports.deleteConfigs(filenames)\n\tsystem.perspective.sendMessage(\"custom-reports-refreshlist\", {})\n\tsystem.perspective.closePopup(\"\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button_Yes"
|
||||
},
|
||||
"position": {
|
||||
"height": 55,
|
||||
"width": 100,
|
||||
"x": 25,
|
||||
"y": 235
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Buttons/Grey"
|
||||
},
|
||||
"text": "Yes"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closePopup(\"\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button_No"
|
||||
},
|
||||
"position": {
|
||||
"height": 55,
|
||||
"width": 100,
|
||||
"x": "calc(100% - 125px)",
|
||||
"y": 235
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Buttons/Grey"
|
||||
},
|
||||
"text": "No"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
SELECT
|
||||
sorter,
|
||||
scanner,
|
||||
COUNT(*) AS count,
|
||||
ROUND(COUNT(*)*3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate)) AS rate,
|
||||
ROUND(AVG(gap_leading/10), 1) AS avg_gap_leading,
|
||||
ROUND(AVG(gap_trailing/10), 1) AS avg_gap_trailing,
|
||||
ROUND(AVG(pkg_length/10), 1) AS avg_pkg_length
|
||||
FROM package_history
|
||||
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||
GROUP BY sorter, scanner;
|
||||
@ -0,0 +1,34 @@
|
||||
WITH SCANNERS AS (
|
||||
SELECT
|
||||
DATE_FORMAT(MIN(s04_timestamp), "%Y-%m-%d %H:%i:00") AS time,
|
||||
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:%i:00")
|
||||
ORDER BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:%i:00")
|
||||
)
|
||||
SELECT
|
||||
time,
|
||||
/* 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: */
|
||||
ROUND(total*60) AS total_pph,
|
||||
ROUND(good_read*60) AS good_read_pph,
|
||||
ROUND(no_read*60) AS no_read_pph,
|
||||
ROUND(no_code*60) AS no_code_pph,
|
||||
ROUND(multi_label*60) AS multi_label_pph,
|
||||
/* Percents: */
|
||||
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,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"color": "#CCCCFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,318 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"maxZoom": 8
|
||||
},
|
||||
"propConfig": {
|
||||
"params.maxZoom": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "8"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 3200,
|
||||
"width": 8300
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Smalls"
|
||||
},
|
||||
"position": {
|
||||
"height": 195,
|
||||
"width": 755,
|
||||
"x": 1213,
|
||||
"y": 859
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
},
|
||||
"path": "Windows/Graphics/Templates/Smalls",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Unloads"
|
||||
},
|
||||
"position": {
|
||||
"height": 1727,
|
||||
"width": 1707,
|
||||
"x": 180,
|
||||
"y": 55
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
},
|
||||
"path": "Windows/Graphics/Templates/Unloads",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EastSpirals"
|
||||
},
|
||||
"position": {
|
||||
"height": 1500,
|
||||
"width": 2281,
|
||||
"x": 1800,
|
||||
"y": 1576
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
},
|
||||
"path": "Windows/Graphics/Templates/EastSpirals",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "WestSpirals"
|
||||
},
|
||||
"position": {
|
||||
"height": 1479,
|
||||
"width": 1937,
|
||||
"x": 133,
|
||||
"y": 1576
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
},
|
||||
"path": "Windows/Graphics/Templates/WestSpirals",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EastLoops"
|
||||
},
|
||||
"position": {
|
||||
"height": 1698,
|
||||
"width": 1942,
|
||||
"x": 6209,
|
||||
"y": 1398
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
},
|
||||
"path": "Windows/Graphics/Templates/EastLoops",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "WestLoops"
|
||||
},
|
||||
"position": {
|
||||
"height": 1787,
|
||||
"width": 2072,
|
||||
"x": 4272,
|
||||
"y": 1309
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
},
|
||||
"path": "Windows/Graphics/Templates/WestLoops",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "WestLoopsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 5274,
|
||||
"y": 2101
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "West Loops",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/West_Loops"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UpperLoopsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 6088,
|
||||
"y": 2101
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Upper Loops",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/Upper_Loops"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "WestSpiralsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 105,
|
||||
"x": 262,
|
||||
"y": 2540
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "West Spirals",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/West_Spirals"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EastSpiralsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 105,
|
||||
"x": 3257,
|
||||
"y": 1380
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "East Spirals",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/East_Spirals"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "SmallsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 80,
|
||||
"x": 2200,
|
||||
"y": 936
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Smalls",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/Smalls"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UnloadsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 80,
|
||||
"x": 843,
|
||||
"y": 929
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Unloads",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/Unloads"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EastLoopsNavButton"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 120,
|
||||
"x": 7215,
|
||||
"y": 2101
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "East Loops",
|
||||
"tagPath": "",
|
||||
"view": "Windows/Graphics/East_Loops"
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -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,32 @@
|
||||
import os
|
||||
|
||||
LOG = system.util.logger("HMI Setup")
|
||||
|
||||
def upload():
|
||||
system.gui.messageBox("Please provide the file location of the Description of Operations...")
|
||||
path = system.file.openFile('pdf')
|
||||
if path == None:
|
||||
system.gui.messageBox("No path given!")
|
||||
else:
|
||||
# Load file contents as csv:
|
||||
tags = {}
|
||||
try:
|
||||
project = system.util.getProjectName()
|
||||
print "Opening file..."
|
||||
with open(path, 'rb') as pdf:
|
||||
payload = { "data": pdf.read() }
|
||||
print "Uploading file..."
|
||||
system.util.sendMessage(project, "setup-doo", payload, "G")
|
||||
print "Done!"
|
||||
except:
|
||||
# In case the csv file is corrupt or in a bad format, ignore it:
|
||||
system.gui.messageBox("Failed to open file!")
|
||||
|
||||
def store(data):
|
||||
path = os.path.join(os.getcwd(), "webserver", "webapps", "main", "pdfs")
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
path = os.path.join(path, "Description of Operations.pdf")
|
||||
with open(path, 'wb') as pdf:
|
||||
pdf.write(data)
|
||||
LOG.info("Uploaded new Description of Operations: /pdfs/Description of Operations.pdf")
|
||||
@ -0,0 +1,359 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"titleExtra": "4 rows",
|
||||
"usesTimewidget": true
|
||||
},
|
||||
"propConfig": {
|
||||
"params.titleExtra": {
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
},
|
||||
"params.usesTimewidget": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "true"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 324,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "GaylordStatus"
|
||||
},
|
||||
"position": {
|
||||
"height": "100%",
|
||||
"width": "100%"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"parameters": {
|
||||
"endDate": "{session.custom.timewidget.endDate}",
|
||||
"startDate": "{session.custom.timewidget.startDate}"
|
||||
},
|
||||
"queryPath": "Status/GaylordStatus"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tcou \u003d utils.getRowCount(value)\n\tast \u003d \"*\" if cou \u003e\u003d 2000 else \"\"\n\tself.view.params.titleExtra \u003d \"{:n}{} rows\".format(cou, ast)\n\t# Return data\n\treturn value",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "query"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"cells": {
|
||||
"style": {
|
||||
"borderBottomColor": "#D5D5D5",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "1px",
|
||||
"borderRightColor": "#D5D5D5",
|
||||
"borderRightStyle": "solid",
|
||||
"borderRightWidth": "1px",
|
||||
"color": "#000",
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "14px"
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "start_timestamp",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Start Timestamp"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 160
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "end_timestamp",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "End Timestamp"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": "value"
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 160
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "gaylord",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Gaylord"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 110
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "count",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Cycles (#)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 130
|
||||
}
|
||||
],
|
||||
"filter": {
|
||||
"enabled": true
|
||||
},
|
||||
"pager": {
|
||||
"bottom": false
|
||||
},
|
||||
"rows": {
|
||||
"highlight": {
|
||||
"enabled": false
|
||||
},
|
||||
"striped": {
|
||||
"enabled": false
|
||||
},
|
||||
"style": {
|
||||
"classes": "table/highlight"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "export-data",
|
||||
"pageScope": true,
|
||||
"script": "\tutils.downloadCSV(self, \"Gaylord Status\")",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
WITH LANES AS (
|
||||
SELECT
|
||||
MIN(timestamp) AS start_timestamp,
|
||||
MAX(timestamp) AS end_timestamp,
|
||||
3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate) AS pph_multiplier,
|
||||
lane_id AS chute,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
AND lane_id LIKE "RS%4CH"
|
||||
GROUP BY lane_id
|
||||
ORDER BY lane_id
|
||||
)
|
||||
SELECT
|
||||
start_timestamp,
|
||||
end_timestamp,
|
||||
chute,
|
||||
/*CASE chute
|
||||
WHEN "RE5-1CH" THEN "RB49/40"
|
||||
WHEN "RE5-2CH" THEN "RB47/48"
|
||||
WHEN "RE5-3CH" THEN "RB45/46"
|
||||
WHEN "RE5-4CH" THEN "RB43/44"
|
||||
WHEN "RE5-5CH" THEN "RB41/42"
|
||||
WHEN "RE5-6CH" THEN "RB22/21"
|
||||
WHEN "RE5-7CH" THEN "RB24/23"
|
||||
WHEN "RE5-8CH" THEN "RB26/25"
|
||||
WHEN "RE5-9CH" THEN "RB28/27"
|
||||
WHEN "RE5-10CH" THEN "RB20/29"
|
||||
ELSE "Unknown"
|
||||
END AS robins,*/
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
ROUND(total*pph_multiplier) AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM LANES;
|
||||
@ -0,0 +1,307 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"meta": {
|
||||
"name": "FIO"
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"enableHighlight": true,
|
||||
"isClickable": false
|
||||
},
|
||||
"status": {
|
||||
"color": "#aaa",
|
||||
"showAlways": true,
|
||||
"tagPath": "",
|
||||
"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": "EIP"
|
||||
},
|
||||
"position": {
|
||||
"height": 45,
|
||||
"width": 90,
|
||||
"x": 54.5,
|
||||
"y": 12.5
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.name": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.props.status.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/Label"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value}, \u0027EIP\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"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.eip"
|
||||
},
|
||||
{
|
||||
"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": "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_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": "Label_11"
|
||||
},
|
||||
"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": "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,195 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"alwaysShowAll": false,
|
||||
"mirror": false,
|
||||
"tagPath": "[default]MCP02/CH_20130/CH_20130"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.alwaysShowAll": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 81,
|
||||
"width": 50
|
||||
},
|
||||
"loading": {
|
||||
"mode": "blocking"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "CH"
|
||||
},
|
||||
"position": {
|
||||
"height": 30,
|
||||
"rotate": {
|
||||
"angle": "180deg"
|
||||
},
|
||||
"width": "100%",
|
||||
"y": 4
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH/Graphics"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"showLabel": false,
|
||||
"type": "chute"
|
||||
}
|
||||
},
|
||||
"type": "dex.display.conveyor"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "CH_Jam_PE"
|
||||
},
|
||||
"position": {
|
||||
"height": 10,
|
||||
"rotate": {
|
||||
"anchor": "0 0",
|
||||
"angle": "270deg"
|
||||
},
|
||||
"width": 43,
|
||||
"x": 2,
|
||||
"y": 43
|
||||
},
|
||||
"propConfig": {
|
||||
"props.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{tagPath}/CH_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": "BCN1_AMB"
|
||||
},
|
||||
"position": {
|
||||
"height": 16,
|
||||
"width": 16,
|
||||
"x": 18,
|
||||
"y": 65
|
||||
},
|
||||
"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": "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 \"SpiralChute|\" + 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\": \"spiralchute\",\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\"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,251 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": true,
|
||||
"plc": "",
|
||||
"searchId": "value",
|
||||
"state": 0,
|
||||
"string": "Unknown"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"/system/mcm01/test",
|
||||
"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.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"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "OK"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Faulted"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 40
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"props": {
|
||||
"text": "FIO",
|
||||
"textStyle": {
|
||||
"fontSize": "20px",
|
||||
"textAlign": "center",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-JR\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_fio_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#808080",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"borderStyle": "solid",
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,236 @@
|
||||
{
|
||||
"custom": {
|
||||
"state_string": "OK",
|
||||
"string": "OK"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"custom.string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "OK"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Fault"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 20
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "EncoderIcon"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#47FF47",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"cx": 12,
|
||||
"cy": "12",
|
||||
"fill": {},
|
||||
"name": "statusCircle",
|
||||
"rx": "10",
|
||||
"ry": "10",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "ellipse"
|
||||
},
|
||||
{
|
||||
"d": "M 4.6516854,13.685393 H 9.8292135",
|
||||
"fill": {},
|
||||
"name": "segLeft",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 9.6000004,13.469662 V 8.2112357",
|
||||
"fill": {},
|
||||
"name": "segUpLeft",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 19.829214,13.685393 H 14.651685",
|
||||
"fill": {},
|
||||
"name": "segRight",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 14.880899,13.469662 V 8.211236",
|
||||
"fill": {},
|
||||
"name": "segUpRight",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 9.8154019,8.4404597 4.8815551,0.013462",
|
||||
"fill": {},
|
||||
"name": "segTop",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 24 24"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Encoder",
|
||||
"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_encoders"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#FF0000",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 100
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
WITH range_alarm_events AS (
|
||||
SELECT e.*,
|
||||
/* Get the last time this event was active within the given time range*/
|
||||
(
|
||||
/* Search for the clear event (if exists) for the outer query's active event */
|
||||
SELECT MIN(eventtime)
|
||||
FROM alarm_events e2
|
||||
WHERE e2.eventid = e.eventid /* eventid is unique per alarm instance */
|
||||
AND e2.eventtime >= e.eventtime
|
||||
AND e2.eventtype = 1 /* Look only for the clear event */
|
||||
ORDER BY eventtime ASC
|
||||
LIMIT 1
|
||||
) AS endtime
|
||||
FROM alarm_events e
|
||||
/* The range for both start/end allows for index optimizations */
|
||||
WHERE
|
||||
/* Filter for Active events */
|
||||
eventtype = 0
|
||||
/* Filter priority */
|
||||
AND priority >= :priority
|
||||
/* Filter by tag */
|
||||
AND source LIKE CONCAT("prov:default:/tag:", REGEXP_REPLACE(:tagPath, "\\[.*\\]|\\/Graphics", ""), "%")
|
||||
ORDER BY eventtime DESC
|
||||
LIMIT 50
|
||||
), range_alarm_events2 AS (
|
||||
SELECT *,
|
||||
COALESCE(endtime, NOW()) AS endtime_est, /* Clamp to end of time range if clear event is after end time */
|
||||
TIMESTAMPDIFF(SECOND, eventtime, COALESCE(endtime, NOW())) AS duration
|
||||
FROM range_alarm_events
|
||||
)
|
||||
SELECT e.id,
|
||||
e.eventtime AS starttime, e.endtime,
|
||||
/* Translate duration to a string */
|
||||
CAST(SEC_TO_TIME(FLOOR(e.duration)) AS CHAR) AS duration,
|
||||
/* Retrieve data */
|
||||
ddevice.strvalue AS device,
|
||||
displaypath AS description,
|
||||
e.source,
|
||||
/* Translate priority to string */
|
||||
dclass.strvalue AS class,
|
||||
CASE
|
||||
WHEN e.priority=4 THEN "Critical"
|
||||
WHEN e.priority=3 THEN "High"
|
||||
WHEN e.priority=2 THEN "Medium"
|
||||
WHEN e.priority=1 THEN "Low"
|
||||
WHEN e.priority=0 THEN "Diagnostic"
|
||||
ELSE "N/A"
|
||||
END AS priority,
|
||||
/* Retrieve PLCTag */
|
||||
dtag.strvalue AS plctag
|
||||
FROM range_alarm_events2 e
|
||||
/* Lookup PLCTag */
|
||||
JOIN alarm_event_data dtag ON e.id = dtag.id AND dtag.propname = "PLCTag"
|
||||
/* Lookup Device */
|
||||
JOIN alarm_event_data ddevice ON e.id = ddevice.id AND ddevice.propname = "Device"
|
||||
/* Lookup Class */
|
||||
JOIN alarm_event_data dclass ON e.id = dclass.id AND dclass.propname = "Class";
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
WITH INDUCTS AS (
|
||||
(
|
||||
SELECT
|
||||
DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:%i:00") AS time,
|
||||
sorter,
|
||||
induct,
|
||||
COUNT(*) AS total
|
||||
FROM package_history
|
||||
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||
GROUP BY sorter, induct, time
|
||||
) UNION ALL (
|
||||
SELECT
|
||||
DATE_FORMAT(timestamp, "%Y-%m-%d %H:%i:00") AS time,
|
||||
"AR" AS sorter,
|
||||
lane_id AS induct,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
GROUP BY sorter, induct, time
|
||||
)
|
||||
)
|
||||
SELECT
|
||||
time,
|
||||
/* Counts: */
|
||||
SUM(total) AS total_count,
|
||||
/* PPH: */
|
||||
ROUND(SUM(total)*60) AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(SUM(total)/(SUM(total) OVER(PARTITION BY sorter, time)), 4) AS 'total/sorter_percent'
|
||||
FROM INDUCTS
|
||||
WHERE induct = :induct
|
||||
GROUP BY induct, time;
|
||||
@ -0,0 +1,14 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#2D7D9F",
|
||||
"borderBottomColor": "#D5D5D5",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "1px",
|
||||
"borderRightColor": "#D5D5D5",
|
||||
"borderRightStyle": "solid",
|
||||
"borderRightWidth": "1px",
|
||||
"color": "#FFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,274 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": true,
|
||||
"plc": "value",
|
||||
"searchId": "value",
|
||||
"state": 0,
|
||||
"string": "Unknown"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"value",
|
||||
"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.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.string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Start"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Start Pressed"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Start Illuminated"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Start Pressed / Illuminated"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Stop"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Stop Pressed"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "Stop Illuminated"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "Stop Pressed / Illuminated"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "Restart"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "Restart Pressed"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "Restart Illuminated"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "Restart Pressed / Illuminated"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 25,
|
||||
"width": 25
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "JR_Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.state} \u003d 0, \"#a9a9a9\", // disconnected gray (DarkGray)\r\n if(\r\n {view.custom.state} % 2 \u003d 1, \"#ffffff\", // white\r\n \"#000000\" // black\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.state} \u003d 0, \"#a9a9a9\", // disconnected gray\r\n if({view.custom.state} \u003d 1 || {view.custom.state} \u003d 2, \"#90ee90\", // light green\r\n if({view.custom.state} \u003d 3 || {view.custom.state} \u003d 4, \"#228B22\", // softer dark green\r\n if({view.custom.state} \u003d 5 || {view.custom.state} \u003d 6, \"#ffc0cb\", // pink\r\n if({view.custom.state} \u003d 7 || {view.custom.state} \u003d 8, \"#ff0000\", // red\r\n if({view.custom.state} \u003d 9 || {view.custom.state} \u003d 10, \"#808080\", // normal gray\r\n if({view.custom.state} \u003d 11 || {view.custom.state} \u003d 12, \"#ffffff\", \"\") // white\r\n )\r\n )\r\n )\r\n )\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,0 H 20 V 20 H 0 Z",
|
||||
"fill": {},
|
||||
"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-JR\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_buttons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(0,164,255,1) 0%, rgba(0,157,245,1) 70%, rgba(0,134,208,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(0deg, rgba(0,164,255,1) 0%, rgba(0,157,245,1) 70%, rgba(0,134,208,1) 100%);",
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pseudo": "disabled",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(0,134,208,1) 0%, rgba(0,134,208,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#555555",
|
||||
"cursor": "not-allowed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "1s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"backgroundColor": "#FF0000"
|
||||
},
|
||||
"100%": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
SELECT s01_timestamp AS induct_timestamp,
|
||||
s04_timestamp AS confirm_timestamp,
|
||||
sorter, trackid, scanner,
|
||||
bcr_imgid AS imgid, s01_barcode AS barcode, scanner_status,
|
||||
pkg_length/10 AS pkg_length, /* In inches */
|
||||
gap_leading/10 AS gap_leading, /* In inches */
|
||||
gap_trailing/10 AS gap_trailing, /* In inches */
|
||||
carriers AS trays,
|
||||
assignments, divert_status,
|
||||
destination_req AS requested_dest,
|
||||
destination_act AS diverted_dest,
|
||||
sort_code
|
||||
FROM package_history
|
||||
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||
ORDER BY s04_timestamp DESC
|
||||
{limit};
|
||||
@ -0,0 +1,109 @@
|
||||
WITH SORTERS 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(sort_code="Success") AS success,
|
||||
SUM(sort_code="Unknown") AS unknown,
|
||||
SUM(sort_code="Unexpected") AS unexpected,
|
||||
SUM(sort_code="Track Err") AS track_err,
|
||||
SUM(sort_code="Gap Err") AS gap_err,
|
||||
SUM(sort_code="Dest Full") AS dest_full,
|
||||
SUM(sort_code="Dest Fault") AS dest_fault,
|
||||
SUM(sort_code="Dest Invalid") AS dest_invalid,
|
||||
SUM(sort_code="No Read") AS no_read,
|
||||
SUM(sort_code="No Code") AS no_code,
|
||||
SUM(sort_code="Multi Label") AS multi_label,
|
||||
SUM(sort_code="Dest Disabled") AS dest_disabled,
|
||||
SUM(sort_code="Rate High") AS rate_high,
|
||||
SUM(sort_code="Div Fail") AS div_fail,
|
||||
SUM(sort_code="Dest None") AS dest_none,
|
||||
SUM(sort_code="Lost") AS lost,
|
||||
SUM(sort_code="Dim Err") AS dim_err,
|
||||
SUM(sort_code="Weight Err") AS weight_err,
|
||||
SUM(sort_code="Underutilized") AS underutilized,
|
||||
SUM(sort_code="Unsafe") AS unsafe
|
||||
FROM package_history
|
||||
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||
AND sorter=:sorter
|
||||
GROUP BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:00")
|
||||
)
|
||||
SELECT
|
||||
start_timestamp,
|
||||
hour,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
success AS success_count,
|
||||
unknown AS unknown_count,
|
||||
unexpected AS unexpected_count,
|
||||
track_err AS track_err_count,
|
||||
gap_err AS gap_err_count,
|
||||
dest_full AS dest_full_count,
|
||||
dest_fault AS dest_fault_count,
|
||||
dest_invalid AS dest_invalid_count,
|
||||
no_read AS no_read_count,
|
||||
no_code AS no_code_count,
|
||||
multi_label AS multi_label_count,
|
||||
dest_disabled AS dest_disabled_count,
|
||||
rate_high AS rate_high_count,
|
||||
div_fail AS div_fail_count,
|
||||
dest_none AS dest_none_count,
|
||||
lost AS lost_count,
|
||||
dim_err AS dim_err_count,
|
||||
weight_err AS weight_err_count,
|
||||
underutilized AS underutilized_count,
|
||||
unsafe AS unsafe_count,
|
||||
/* PPH: */
|
||||
total AS total_pph,
|
||||
success AS success_pph,
|
||||
unknown AS unknown_pph,
|
||||
unexpected AS unexpected_pph,
|
||||
track_err AS track_err_pph,
|
||||
gap_err AS gap_err_pph,
|
||||
dest_full AS dest_full_pph,
|
||||
dest_fault AS dest_fault_pph,
|
||||
dest_invalid AS dest_invalid_pph,
|
||||
no_read AS no_read_pph,
|
||||
no_code AS no_code_pph,
|
||||
multi_label AS multi_label_pph,
|
||||
dest_disabled AS dest_disabled_pph,
|
||||
rate_high AS rate_high_pph,
|
||||
div_fail AS div_fail_pph,
|
||||
dest_none AS dest_none_pph,
|
||||
lost AS lost_pph,
|
||||
dim_err AS dim_err_pph,
|
||||
weight_err AS weight_err_pph,
|
||||
underutilized AS underutilized_pph,
|
||||
unsafe AS unsafe_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent,
|
||||
ROUND(success/total, 4) AS success_percent,
|
||||
ROUND(unknown/total, 4) AS unknown_percent,
|
||||
ROUND(unexpected/total, 4) AS unexpected_percent,
|
||||
ROUND(track_err/total, 4) AS track_err_percent,
|
||||
ROUND(gap_err/total, 4) AS gap_err_percent,
|
||||
ROUND(dest_full/total, 4) AS dest_full_percent,
|
||||
ROUND(dest_fault/total, 4) AS dest_fault_percent,
|
||||
ROUND(dest_invalid/total, 4) AS dest_invalid_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,
|
||||
ROUND(dest_disabled/total, 4) AS dest_disabled_percent,
|
||||
ROUND(rate_high/total, 4) AS rate_high_percent,
|
||||
ROUND(div_fail/total, 4) AS div_fail_percent,
|
||||
ROUND(dest_none/total, 4) AS dest_none_percent,
|
||||
ROUND(lost/total, 4) AS lost_percent,
|
||||
ROUND(dim_err/total, 4) AS dim_err_percent,
|
||||
ROUND(weight_err/total, 4) AS weight_err_percent,
|
||||
ROUND(underutilized/total, 4) AS underutilized_percent,
|
||||
ROUND(unsafe/total, 4) AS unsafe_percent
|
||||
FROM SORTERS
|
||||
ORDER BY start_timestamp;
|
||||
@ -0,0 +1,322 @@
|
||||
{
|
||||
"custom": {
|
||||
"plc": "value",
|
||||
"searchId": "value",
|
||||
"state": 0,
|
||||
"string": "Clear"
|
||||
},
|
||||
"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": "Clear",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Clear"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Blocked"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Disabled"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Jammed"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 40,
|
||||
"width": 200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Photoeye"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#00FF00",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#800080"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#00FF00",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#800080"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "m 28.763932,20 -20,10 V 10 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2"
|
||||
},
|
||||
"stroke-dasharray": "4,4",
|
||||
"type": "line",
|
||||
"x1": "30",
|
||||
"x2": "95%",
|
||||
"y1": "20",
|
||||
"y2": "20"
|
||||
},
|
||||
{
|
||||
"fill": {},
|
||||
"height": "20",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "rect",
|
||||
"width": "6",
|
||||
"x": "95%",
|
||||
"y": "10"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 300 40"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-Photoeye\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\n\talarm \u003d []\n\tmessage \u003d None\n\n\tsleep(0.5)\n\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_photoeyes"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,556 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"titleExtra": "1 rows",
|
||||
"usesTimewidget": true
|
||||
},
|
||||
"propConfig": {
|
||||
"params.titleExtra": {
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
},
|
||||
"params.usesTimewidget": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "true"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"paramDirection": "output",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 324,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ScannerSummary"
|
||||
},
|
||||
"position": {
|
||||
"height": "100%",
|
||||
"width": "100%"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.timewidget": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.timewidget"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tself.forceRefresh()"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"cells": {
|
||||
"style": {
|
||||
"borderBottomColor": "#D5D5D5",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "1px",
|
||||
"borderRightColor": "#D5D5D5",
|
||||
"borderRightStyle": "solid",
|
||||
"borderRightWidth": "1px",
|
||||
"color": "#000",
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "14px"
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"editable": false,
|
||||
"field": "sorter",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Sorter"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 80
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "scanner",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Scanner"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 90
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "count",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Total"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": false,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "rate",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Rate (PPH)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": true,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 160
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "avg_gap_trailing",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Avg Gap Trailing (Avg)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 120
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "avg_gap_leading",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Avg Gap Leading (in)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 120
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "avg_pkg_length",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": "table/column-header"
|
||||
},
|
||||
"title": "Avg Package Length (in)"
|
||||
},
|
||||
"justify": "center",
|
||||
"number": "value",
|
||||
"numberFormat": "none",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "#62A3F6",
|
||||
"linecap": "round",
|
||||
"width": 5
|
||||
},
|
||||
"max": 100,
|
||||
"track": {
|
||||
"color": "#DADADA",
|
||||
"linecap": "round",
|
||||
"width": 2
|
||||
},
|
||||
"value": {
|
||||
"color": "#7D7D7D",
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "#2196F3",
|
||||
"unselected": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 150
|
||||
}
|
||||
],
|
||||
"data": [
|
||||
{
|
||||
"avg_gap_leading": 35.6,
|
||||
"avg_gap_trailing": 29,
|
||||
"avg_pkg_length": 12.4,
|
||||
"count": 73765,
|
||||
"rate": 3074,
|
||||
"scanner": "S01aa",
|
||||
"sorter": "S01"
|
||||
}
|
||||
],
|
||||
"filter": {
|
||||
"enabled": true
|
||||
},
|
||||
"pager": {
|
||||
"bottom": false
|
||||
},
|
||||
"rows": {
|
||||
"highlight": {
|
||||
"enabled": false
|
||||
},
|
||||
"striped": {
|
||||
"enabled": false
|
||||
},
|
||||
"style": {
|
||||
"classes": "table/highlight"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"fontFamily": "Helvetica",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [
|
||||
{
|
||||
"name": "forceRefresh",
|
||||
"params": [],
|
||||
"script": "\tRED \u003d lambda x: { \"value\": x, \"style\": { \"background\": \"#FEA3AA\" } }\n\tYELLOW \u003d lambda x: { \"value\": x, \"style\": { \"background\": \"#FAF884\" } }\n\t\n\t# Run query:\n\tdata \u003d system.db.runNamedQuery(\"Status/PackageSummary\", {\n\t\t\"startDate\": self.session.custom.timewidget.startDate,\n\t\t\"endDate\": self.session.custom.timewidget.endDate,\n\t})\n\t# Convert to JSON:\n\tfilteredData \u003d utils.datasetToJSON(data)\n\t# Set title extra:\n\tcou \u003d utils.getRowCount(filteredData)\n\tast \u003d \"*\" if cou \u003e\u003d 4000 else \"\"\n\tself.view.params.titleExtra \u003d \"{:n}{} rows\".format(cou, ast)\n\t# Set data\n\tself.props.data \u003d filteredData"
|
||||
}
|
||||
],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "export-data",
|
||||
"pageScope": true,
|
||||
"script": "\tutils.downloadCSV(self, \"Scanner Summary\")",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,214 @@
|
||||
{
|
||||
"dataTypes": {
|
||||
"Int1": [
|
||||
"ia.display.cylindrical-tank",
|
||||
"ia.chart.gauge",
|
||||
"ia.display.label",
|
||||
"ia.display.led-display",
|
||||
"ia.display.progress",
|
||||
"ia.chart.simple-gauge",
|
||||
"ia.input.slider",
|
||||
"ia.display.thermometer",
|
||||
"ia.input.oneshotbutton"
|
||||
],
|
||||
"Int2": [
|
||||
"ia.display.cylindrical-tank",
|
||||
"ia.chart.gauge",
|
||||
"ia.display.label",
|
||||
"ia.display.led-display",
|
||||
"ia.display.progress",
|
||||
"ia.chart.simple-gauge",
|
||||
"ia.input.slider",
|
||||
"ia.display.thermometer",
|
||||
"ia.input.oneshotbutton"
|
||||
],
|
||||
"Int4": [
|
||||
"ia.display.cylindrical-tank",
|
||||
"ia.chart.gauge",
|
||||
"ia.display.label",
|
||||
"ia.display.led-display",
|
||||
"ia.display.progress",
|
||||
"ia.chart.simple-gauge",
|
||||
"ia.input.slider",
|
||||
"ia.display.thermometer",
|
||||
"ia.input.oneshotbutton"
|
||||
],
|
||||
"Int8": [
|
||||
"ia.display.cylindrical-tank",
|
||||
"ia.chart.gauge",
|
||||
"ia.display.label",
|
||||
"ia.display.led-display",
|
||||
"ia.display.progress",
|
||||
"ia.chart.simple-gauge",
|
||||
"ia.input.slider",
|
||||
"ia.display.thermometer",
|
||||
"ia.input.oneshotbutton"
|
||||
],
|
||||
"Float4": [
|
||||
"ia.display.cylindrical-tank",
|
||||
"ia.chart.gauge",
|
||||
"ia.display.label",
|
||||
"ia.display.led-display",
|
||||
"ia.display.progress",
|
||||
"ia.chart.simple-gauge",
|
||||
"ia.input.slider",
|
||||
"ia.display.thermometer"
|
||||
],
|
||||
"Float8": [
|
||||
"ia.display.cylindrical-tank",
|
||||
"ia.chart.gauge",
|
||||
"ia.display.label",
|
||||
"ia.display.led-display",
|
||||
"ia.display.progress",
|
||||
"ia.chart.simple-gauge",
|
||||
"ia.input.slider",
|
||||
"ia.display.thermometer"
|
||||
],
|
||||
"Boolean": [
|
||||
"ia.input.checkbox",
|
||||
"ia.input.toggle-switch"
|
||||
],
|
||||
"String": [
|
||||
"ia.display.label",
|
||||
"ia.display.markdown"
|
||||
],
|
||||
"DataSet": [
|
||||
"ia.display.table"
|
||||
]
|
||||
},
|
||||
"bindings": {
|
||||
"ia.input.oneshotbutton": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.display.table": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.data",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.display.markdown": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.source",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.chart.simple-gauge": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.display.progress": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.input.numeric-entry-field": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.input.password-field": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.text",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.input.toggle-switch": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.selected",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.display.label": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.text",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"rad.display.messenger": [
|
||||
{
|
||||
"tagProperty": "jsonValues",
|
||||
"propertyPath": "messageConfig",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.input.checkbox": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.selected",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.display.cylindrical-tank": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.input.text-area": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.text",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.display.led-display": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.input.barcodescannerinput": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.data",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.chart.gauge": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.display.thermometer": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": false
|
||||
}
|
||||
],
|
||||
"ia.input.slider": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.value",
|
||||
"bidirectional": true
|
||||
}
|
||||
],
|
||||
"ia.input.text-field": [
|
||||
{
|
||||
"tagProperty": "value",
|
||||
"propertyPath": "props.text",
|
||||
"bidirectional": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,222 @@
|
||||
{
|
||||
"custom": {
|
||||
"state": 1,
|
||||
"state_string": "Device Disconnected",
|
||||
"string": "Device Disconnected"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "OK"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Device Disconnected"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Faulted"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 26,
|
||||
"width": 26
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "VFD"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#C2C2C2",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "url(#splitGreenGrey)"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#C2C2C2"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "url(#splitRedGrey)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"offset": "0%",
|
||||
"stop-color": "#C2C2C2",
|
||||
"type": "stop"
|
||||
},
|
||||
{
|
||||
"offset": "49.5%",
|
||||
"stop-color": "#C2C2C2",
|
||||
"type": "stop"
|
||||
},
|
||||
{
|
||||
"offset": "50.5%",
|
||||
"stop-color": "#00FF00",
|
||||
"type": "stop"
|
||||
},
|
||||
{
|
||||
"offset": "100%",
|
||||
"stop-color": "#00FF00",
|
||||
"type": "stop"
|
||||
}
|
||||
],
|
||||
"gradientUnits": "userSpaceOnUse",
|
||||
"id": "splitGreenGrey",
|
||||
"type": "linearGradient",
|
||||
"x1": "0",
|
||||
"x2": "24",
|
||||
"y1": "0",
|
||||
"y2": "24"
|
||||
},
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"offset": "0%",
|
||||
"stop-color": "#C2C2C2",
|
||||
"type": "stop"
|
||||
},
|
||||
{
|
||||
"offset": "49.5%",
|
||||
"stop-color": "#C2C2C2",
|
||||
"type": "stop"
|
||||
},
|
||||
{
|
||||
"offset": "50.5%",
|
||||
"stop-color": "#FF0000",
|
||||
"type": "stop"
|
||||
},
|
||||
{
|
||||
"offset": "100%",
|
||||
"stop-color": "#FF0000",
|
||||
"type": "stop"
|
||||
}
|
||||
],
|
||||
"gradientUnits": "userSpaceOnUse",
|
||||
"id": "splitRedGrey",
|
||||
"type": "linearGradient",
|
||||
"x1": "0",
|
||||
"x2": "24",
|
||||
"y1": "0",
|
||||
"y2": "24"
|
||||
}
|
||||
],
|
||||
"type": "defs"
|
||||
},
|
||||
{
|
||||
"cx": "12",
|
||||
"cy": "12",
|
||||
"fill": {},
|
||||
"rx": "10",
|
||||
"ry": "10",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "ellipse"
|
||||
},
|
||||
{
|
||||
"d": "M 6,18 L 18,6",
|
||||
"fill": {},
|
||||
"stroke": {
|
||||
"linecap": "round",
|
||||
"paint": "#000000",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 24 24"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "VFD",
|
||||
"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_VFD"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#FF6000B3",
|
||||
"color": "#000000",
|
||||
"fontFamily": "Arial",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
WITH ALARM_TIMELAPSES AS (
|
||||
/* Group related active & clear events into a single row */
|
||||
SELECT
|
||||
id, /* Unique to each row in alarm_events, used to look up metadata in alarm_event_data */
|
||||
source, /* Unique alarm path in Ignition */
|
||||
eventtime AS starttime,
|
||||
displaypath, /* Get description */
|
||||
/* Get the last time this event was active within the given time range*/
|
||||
CAST(LEAST(COALESCE((
|
||||
/* Search for the clear event (if exists) for the outer query's active event */
|
||||
SELECT MIN(eventtime)
|
||||
FROM alarm_events e2
|
||||
WHERE e2.eventid = e.eventid /* eventid is unique per alarm instance */
|
||||
AND e2.eventtime >= e.eventtime
|
||||
AND e2.eventtype = 1 /* Look only for the clear event */
|
||||
ORDER BY eventtime ASC
|
||||
), NOW()), :endDate) AS DATETIME) AS endtime, /* Clamp to end of time range if clear event is after end time */
|
||||
priority
|
||||
FROM alarm_events e
|
||||
/* The range for both start/end allows for index optimizations */
|
||||
WHERE eventtime BETWEEN :startDate AND :endDate
|
||||
/* Filter priority */
|
||||
AND priority >= :priority
|
||||
/* Filter out system events and active events only */
|
||||
AND eventflags & 1 != 1 AND eventtype = 0
|
||||
), HITLIST AS (
|
||||
/* Group the same type of alarms together to get hit counts and total durations */
|
||||
SELECT
|
||||
MAX(id) AS id, /* Use latest id to get the latest metadata */
|
||||
MIN(starttime) AS firsttime, /* Get the earliest it's been active in the given time range */
|
||||
MAX(endtime) AS lasttime, /* Get the latest it's been active in the given time range */
|
||||
MIN(displaypath) AS displaypath, /* Get one of the displaypaths associated with source */
|
||||
source,
|
||||
MAX(priority) AS priority,
|
||||
COUNT(*) AS count,
|
||||
SUM(TIME_TO_SEC(TIMEDIFF(endtime, starttime))) AS duration
|
||||
FROM ALARM_TIMELAPSES
|
||||
GROUP BY source
|
||||
ORDER BY count DESC
|
||||
LIMIT 2000
|
||||
)
|
||||
/* Finally, merge metadata into hitlist */
|
||||
SELECT e.id,
|
||||
e.firsttime, e.lasttime,
|
||||
/* Translate duration to a string */
|
||||
CAST(SEC_TO_TIME(FLOOR(e.duration)) AS CHAR) AS duration,
|
||||
/* Retrieve instance count and total duration */
|
||||
e.count,
|
||||
ddevice.strvalue AS device,
|
||||
displaypath AS description,
|
||||
e.source,
|
||||
/* Translate priority to string */
|
||||
dclass.strvalue AS class,
|
||||
CASE
|
||||
WHEN e.priority=4 THEN "Critical"
|
||||
WHEN e.priority=3 THEN "High"
|
||||
WHEN e.priority=2 THEN "Medium"
|
||||
WHEN e.priority=1 THEN "Low"
|
||||
WHEN e.priority=0 THEN "Diagnostic"
|
||||
ELSE "N/A"
|
||||
END AS priority,
|
||||
/* Retrieve PLCTag */
|
||||
dtag.strvalue AS plctag
|
||||
FROM HITLIST e
|
||||
/* Lookup PLCTag */
|
||||
JOIN alarm_event_data dtag ON e.id = dtag.id AND dtag.propname = "PLCTag"
|
||||
/* Lookup Device */
|
||||
JOIN alarm_event_data ddevice ON e.id = ddevice.id AND ddevice.propname = "Device"
|
||||
/* Lookup Class */
|
||||
JOIN alarm_event_data dclass ON e.id = dclass.id AND dclass.propname = "Class"
|
||||
WHERE CASE
|
||||
WHEN dclass.strvalue = "Error" THEN 2
|
||||
WHEN dclass.strvalue = "Warning" THEN 1
|
||||
WHEN dclass.strvalue = "Message" THEN 0
|
||||
END >= :class;
|
||||
@ -0,0 +1,246 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"deviceType": "beacon",
|
||||
"meta": {
|
||||
"name": ""
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"alwaysShowAll": true,
|
||||
"enableHighlight": true,
|
||||
"isClickable": false,
|
||||
"isRightOfSorter": false,
|
||||
"mirror": false,
|
||||
"originSide": "left",
|
||||
"paddleThickness": 10,
|
||||
"showLabel": true,
|
||||
"type": "belt"
|
||||
},
|
||||
"status": {
|
||||
"color": "#aaa",
|
||||
"isExtended": true,
|
||||
"isManual": false,
|
||||
"isRetracted": false,
|
||||
"showAlways": true,
|
||||
"showLabel": "B",
|
||||
"tagPath": "",
|
||||
"tooltip": ""
|
||||
}
|
||||
},
|
||||
"tabs": [
|
||||
"Status",
|
||||
"Alarm History",
|
||||
"Devices",
|
||||
"Controls"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"params.deviceType": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.meta": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.meta.name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.alwaysShowAll": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.isRightOfSorter": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.mirror": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.originSide": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.paddleThickness": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.showLabel": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.config.type": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.background": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.isExtended": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.isFaulted": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.isManual": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.isRetracted": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.showLabel": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.props.status.tooltip": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tabs": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tabs[0]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tabs[1]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tabs[2]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tabs[3]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 569,
|
||||
"width": 900
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 35,
|
||||
"width": "100%"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#1A4A5E",
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "1px",
|
||||
"color": "#FFF",
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 5
|
||||
},
|
||||
"text": "Oiler"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TabContainer"
|
||||
},
|
||||
"position": {
|
||||
"height": "calc(100% - 35px)",
|
||||
"width": "100%",
|
||||
"y": 35
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.key": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.props.auth.user.roles"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\troles \u003d [\"Administrator\", \"Developer\"]\n\treturn value !\u003d None and len(value) \u003e 0 and len([i for i in value if i in roles]) \u003e 0",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"menuStyle": {
|
||||
"backgroundColor": "#225E77"
|
||||
},
|
||||
"tabSize": {
|
||||
"height": 35,
|
||||
"width": 150
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"backgroundColor": "#2D7D9F",
|
||||
"color": "#FFF",
|
||||
"fontWeight": "bold"
|
||||
},
|
||||
"inactive": {
|
||||
"backgroundColor": "#389CC7",
|
||||
"color": "#FFF"
|
||||
}
|
||||
},
|
||||
"tabs": [
|
||||
"Controls"
|
||||
]
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"height": "calc(100% - 69px)",
|
||||
"width": "100%",
|
||||
"y": 69
|
||||
},
|
||||
"props": {
|
||||
"path": "Popups/Device/Controls/oiler"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "window"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
WITH LANES AS (
|
||||
SELECT
|
||||
MIN(timestamp) AS start_timestamp,
|
||||
MAX(timestamp) AS end_timestamp,
|
||||
3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate) AS pph_multiplier,
|
||||
lane_id AS induct,
|
||||
SUM(count) AS total
|
||||
FROM pe_history
|
||||
WHERE timestamp BETWEEN :startDate AND :endDate
|
||||
AND lane_id LIKE "UL%"
|
||||
GROUP BY lane_id
|
||||
ORDER BY lane_id
|
||||
)
|
||||
SELECT
|
||||
start_timestamp,
|
||||
end_timestamp,
|
||||
induct,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
ROUND(total*pph_multiplier) AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM LANES;
|
||||
@ -0,0 +1,60 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 671,
|
||||
"width": 1707
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "HSS_Inbound"
|
||||
},
|
||||
"position": {
|
||||
"height": 651,
|
||||
"width": 1687,
|
||||
"x": 10,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/HSS_Inbound",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_HSS_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 125,
|
||||
"x": 100,
|
||||
"y": 150
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]HSSSingulatorStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(2)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -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)
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#CCCCFF",
|
||||
"color": "#000000",
|
||||
"fontFamily": "Arial",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(0,255,0,1) 0%, rgba(0,245,0,1) 70%, rgba(0,208,0,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(0deg, rgba(0,255,0,1) 0%, rgba(0,245,0,1) 70%, rgba(0,208,0,1) 100%);",
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pseudo": "disabled",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(0,208,0,1) 0%, rgba(0,208,0,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#555555",
|
||||
"cursor": "not-allowed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,98 @@
|
||||
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="Unknown") AS unknown,
|
||||
SUM(sort_code="Unexpected") AS unexpected,
|
||||
SUM(sort_code="Track Err") AS track_err,
|
||||
SUM(sort_code="Gap Err") AS gap_err,
|
||||
SUM(sort_code="Dest Full") AS dest_full,
|
||||
SUM(sort_code="Dest Fault") AS dest_fault,
|
||||
SUM(sort_code="Dest Invalid") AS dest_invalid,
|
||||
SUM(sort_code="No Read") AS no_read,
|
||||
SUM(sort_code="No Code") AS no_code,
|
||||
SUM(sort_code="Multi Label") AS multi_label,
|
||||
SUM(sort_code="Dest Disabled") AS dest_disabled,
|
||||
SUM(sort_code="Rate High") AS rate_high,
|
||||
SUM(sort_code="Div Fail") AS div_fail,
|
||||
SUM(sort_code="Dest None") AS dest_none,
|
||||
SUM(sort_code="Lost") AS lost,
|
||||
SUM(sort_code="Dim Err") AS dim_err,
|
||||
SUM(sort_code="Weight Err") AS weight_err,
|
||||
SUM(sort_code="Underutilized") AS underutilized,
|
||||
SUM(sort_code="Unsafe") AS unsafe
|
||||
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,
|
||||
unknown AS unknown_count,
|
||||
unexpected AS unexpected_count,
|
||||
track_err AS track_err_count,
|
||||
gap_err AS gap_err_count,
|
||||
dest_full AS dest_full_count,
|
||||
dest_fault AS dest_fault_count,
|
||||
dest_invalid AS dest_invalid_count,
|
||||
no_read AS no_read_count,
|
||||
no_code AS no_code_count,
|
||||
multi_label AS multi_label_count,
|
||||
dest_disabled AS dest_disabled_count,
|
||||
rate_high AS rate_high_count,
|
||||
div_fail AS div_fail_count,
|
||||
dest_none AS dest_none_count,
|
||||
lost AS lost_count,
|
||||
dim_err AS dim_err_count,
|
||||
weight_err AS weight_err_count,
|
||||
underutilized AS underutilized_count,
|
||||
unsafe AS unsafe_count,
|
||||
/* PPH: */
|
||||
ROUND(total*60) AS total_pph,
|
||||
ROUND(success*60) AS success_pph,
|
||||
ROUND(unknown*60) AS unknown_pph,
|
||||
ROUND(unexpected*60) AS unexpected_pph,
|
||||
ROUND(track_err*60) AS track_err_pph,
|
||||
ROUND(gap_err*60) AS gap_err_pph,
|
||||
ROUND(dest_full*60) AS dest_full_pph,
|
||||
ROUND(dest_fault*60) AS dest_fault_pph,
|
||||
ROUND(dest_invalid*60) AS dest_invalid_pph,
|
||||
ROUND(no_read*60) AS no_read_pph,
|
||||
ROUND(no_code*60) AS no_code_pph,
|
||||
ROUND(multi_label*60) AS multi_label_pph,
|
||||
ROUND(dest_disabled*60) AS dest_disabled_pph,
|
||||
ROUND(rate_high*60) AS rate_high_pph,
|
||||
ROUND(div_fail*60) AS div_fail_pph,
|
||||
ROUND(dest_none*60) AS dest_none_pph,
|
||||
ROUND(lost*60) AS lost_pph,
|
||||
ROUND(dim_err*60) AS dim_err_pph,
|
||||
ROUND(weight_err*60) AS weight_err_pph,
|
||||
ROUND(underutilized*60) AS underutilized_pph,
|
||||
ROUND(unsafe*60) AS unsafe_pph,
|
||||
/* Percents: */
|
||||
ROUND(success/total, 4) AS success_percent,
|
||||
ROUND(unknown/total, 4) AS unknown_percent,
|
||||
ROUND(unexpected/total, 4) AS unexpected_percent,
|
||||
ROUND(track_err/total, 4) AS track_err_percent,
|
||||
ROUND(gap_err/total, 4) AS gap_err_percent,
|
||||
ROUND(dest_full/total, 4) AS dest_full_percent,
|
||||
ROUND(dest_fault/total, 4) AS dest_fault_percent,
|
||||
ROUND(dest_invalid/total, 4) AS dest_invalid_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,
|
||||
ROUND(dest_disabled/total, 4) AS dest_disabled_percent,
|
||||
ROUND(rate_high/total, 4) AS rate_high_percent,
|
||||
ROUND(div_fail/total, 4) AS div_fail_percent,
|
||||
ROUND(dest_none/total, 4) AS dest_none_percent,
|
||||
ROUND(lost/total, 4) AS lost_percent,
|
||||
ROUND(dim_err/total, 4) AS dim_err_percent,
|
||||
ROUND(weight_err/total, 4) AS weight_err_percent,
|
||||
ROUND(underutilized/total, 4) AS underutilized_percent,
|
||||
ROUND(unsafe/total, 4) AS unsafe_percent
|
||||
FROM SORTERS;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
WITH SCANNERS AS (
|
||||
SELECT
|
||||
MIN(s04_timestamp) AS start_timestamp,
|
||||
MAX(s04_timestamp) AS end_timestamp,
|
||||
3600/TIMESTAMPDIFF(SECOND, :startDate, :endDate) AS pph_multiplier,
|
||||
sorter,
|
||||
scanner,
|
||||
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
|
||||
GROUP BY sorter, scanner
|
||||
ORDER BY sorter, scanner
|
||||
)
|
||||
SELECT
|
||||
start_timestamp,
|
||||
end_timestamp,
|
||||
sorter AS sorter,
|
||||
scanner AS scanner,
|
||||
/* 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: */
|
||||
ROUND(total*pph_multiplier) AS total_pph,
|
||||
ROUND(good_read*pph_multiplier) AS good_read_pph,
|
||||
ROUND(no_read*pph_multiplier) AS no_read_pph,
|
||||
ROUND(no_code*pph_multiplier) AS no_code_pph,
|
||||
ROUND(multi_label*pph_multiplier) 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;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"style": {
|
||||
"backgroundColor": "#C7DCED"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#D5D5D5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
WITH UNIQUE_ALARMS AS (
|
||||
SELECT
|
||||
MAX(id) AS id,
|
||||
source
|
||||
FROM alarm_events
|
||||
GROUP BY source
|
||||
)
|
||||
SELECT dalarm.displaypath AS description
|
||||
FROM UNIQUE_ALARMS u
|
||||
/* Lookup Alarm */
|
||||
JOIN alarm_events dalarm ON u.id = dalarm.id
|
||||
/* Lookup Class */
|
||||
JOIN alarm_event_data dclass ON u.id = dclass.id AND dclass.propname = "Class"
|
||||
/* Lookup Device */
|
||||
JOIN alarm_event_data ddevice ON u.id = ddevice.id AND ddevice.propname = "Device"
|
||||
WHERE dclass.strvalue IN ("Error", "Warning")
|
||||
AND ddevice.strvalue NOT IN ("SorterA", "SorterB", "SorterC", "Ignition")
|
||||
GROUP BY description;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@
|
||||
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")
|
||||
)
|
||||
SELECT
|
||||
time,
|
||||
/* PPH: */
|
||||
ROUND((SUM((total - machine - scanner)*60) OVER w)/(:movAvgMin+1)) AS total_pph,
|
||||
/* Problem Solve Percents: */
|
||||
ROUND((SUM(no_read/total) OVER w)/(:movAvgMin+1), 4) AS no_read_percent,
|
||||
ROUND((SUM(no_code/total) OVER w)/(:movAvgMin+1), 4) AS no_code_percent,
|
||||
ROUND((SUM(multi_label/total) OVER w)/(:movAvgMin+1), 4) AS multi_label_percent,
|
||||
/* Sorter Error Percents: */
|
||||
ROUND((SUM(gap_err/total) OVER w)/(:movAvgMin+1), 4) AS gap_err_percent,
|
||||
ROUND((SUM(div_fail/total) OVER w)/(:movAvgMin+1), 4) AS div_fail_percent,
|
||||
ROUND((SUM(dest_none/total) OVER w)/(:movAvgMin+1), 4) AS dest_none_percent,
|
||||
ROUND((SUM(lost/total) OVER w)/(:movAvgMin+1), 4) AS lost_percent
|
||||
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);
|
||||
@ -0,0 +1,104 @@
|
||||
import os
|
||||
import shutil
|
||||
from com.inductiveautomation.ignition.common.model import ApplicationScope
|
||||
|
||||
os_symlink = getattr(os, "symlink", None)
|
||||
if callable(os_symlink):
|
||||
pass
|
||||
else:
|
||||
def symlink_ms(source, link_name):
|
||||
import ctypes
|
||||
csl = ctypes.windll.kernel32.CreateSymbolicLinkW
|
||||
csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32)
|
||||
csl.restype = ctypes.c_ubyte
|
||||
flags = 1 if os.path.isdir(source) else 0
|
||||
if csl(link_name, source, flags) == 0:
|
||||
raise ctypes.WinError()
|
||||
os.symlink = symlink_ms
|
||||
|
||||
#############
|
||||
### Constants
|
||||
#############
|
||||
WP = os.path.join(os.getcwd(), "webserver", "webapps", "main", "documents")
|
||||
DP = WP#"D:\\Ignition\\Documents"
|
||||
#if not os.path.exists("D:\\"):
|
||||
# Not on actual production server, so store locally:
|
||||
#DP = "Ignition\\Documents"
|
||||
if ApplicationScope.isGateway(ApplicationScope.getGlobalScope()) and not os.path.exists(DP):
|
||||
os.makedirs(DP)
|
||||
#os.symlink(DP, WP)
|
||||
# The above symlink doesn't work on windows due to process permissions. Need to manually set up:
|
||||
# mklink /J "C:\\Program Files\\Inductive Automation\\Ignition\\webserver\\webapps\\main\\documents" D:\\Ignition\\Documents
|
||||
|
||||
PDF_ICON = {
|
||||
"path": "material/picture_as_pdf",
|
||||
"color": "#869DB1",
|
||||
"style": {}
|
||||
}
|
||||
|
||||
|
||||
#######################################################
|
||||
#######################################################
|
||||
#######################################################
|
||||
#### Functions
|
||||
#######################################################
|
||||
|
||||
def getFileTree(path, phantomPath=""):
|
||||
files = []
|
||||
for f in os.listdir(path):
|
||||
filepath = os.path.join(path, f)
|
||||
filephantompath = os.path.join(phantomPath, f)
|
||||
# Check what type of file:
|
||||
if os.path.isfile(filepath):
|
||||
# Add leaf node (file) if pdf:
|
||||
if f.endswith(".pdf"):
|
||||
files.append({
|
||||
"label": f,
|
||||
"expanded": False,
|
||||
"icon": PDF_ICON,
|
||||
"data": filephantompath,
|
||||
"items": []
|
||||
})
|
||||
elif os.path.isdir(filepath):
|
||||
# Add folder:
|
||||
files.append({
|
||||
"label": f,
|
||||
"expanded": False,
|
||||
"data": "",
|
||||
"items": getFileTree(filepath, filephantompath)
|
||||
})
|
||||
# Return list:
|
||||
return files
|
||||
|
||||
|
||||
def getDocuments():
|
||||
# Return list:
|
||||
return getFileTree(DP)
|
||||
|
||||
def createFolder(folderpath):
|
||||
if not os.path.exists(folderpath):
|
||||
os.makedirs(os.path.join(DP, folderpath))
|
||||
|
||||
def uploadDocument(file, folder=""):
|
||||
filename = os.path.join(DP, folder, file.name)
|
||||
if filename[-4:].lower() <> ".pdf":
|
||||
system.perspective("File extension not compatible!\r\nThe supported extensions are: pdf")
|
||||
else:
|
||||
filepath = os.path.join(DP, filename)
|
||||
#if system.file.fileExists(filepath):
|
||||
#return "Config file already exists!\r\nYou must delete the config before uploading over it."
|
||||
file.copyTo(filepath)
|
||||
#system.file.writeFile(filepath, contents, False)
|
||||
|
||||
def deleteDocuments(filenames):
|
||||
for filename in filenames:
|
||||
filepath = os.path.join(DP, filename)
|
||||
try:
|
||||
if os.path.isfile(filepath):
|
||||
os.remove(filepath)
|
||||
elif os.path.isdir(filepath):
|
||||
shutil.rmtree(filepath)
|
||||
else:
|
||||
pass#return "Config file doesn't exist!"
|
||||
except:
|
||||
system.perspective.print("Failed to delete "+filename)
|
||||
@ -0,0 +1,535 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 2529,
|
||||
"width": 4892
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "HSS_Inbound"
|
||||
},
|
||||
"position": {
|
||||
"height": 651,
|
||||
"width": 1687,
|
||||
"x": 122,
|
||||
"y": 1868.22
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/HSS_Inbound",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "HSS_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 1601,
|
||||
"width": 949,
|
||||
"x": 10,
|
||||
"y": 301
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/HSS_Singulator",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "HSS_Sorter"
|
||||
},
|
||||
"position": {
|
||||
"height": 1973,
|
||||
"width": 4223,
|
||||
"x": 522,
|
||||
"y": 10
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/HSS_Sorter",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "OXD_Inbound"
|
||||
},
|
||||
"position": {
|
||||
"height": 800,
|
||||
"width": 636,
|
||||
"x": 1802,
|
||||
"y": 1450
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/OXD_Inbound",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "OXD_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 508,
|
||||
"width": 1103,
|
||||
"x": 2076,
|
||||
"y": 1032
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/OXD_Singulator",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "OXD_Sorter"
|
||||
},
|
||||
"position": {
|
||||
"height": 517,
|
||||
"width": 1434,
|
||||
"x": 2983,
|
||||
"y": 1033
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/OXD_Sorter",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "OXD_Problem_Solve"
|
||||
},
|
||||
"position": {
|
||||
"height": 286,
|
||||
"width": 928,
|
||||
"x": 2530,
|
||||
"y": 1125
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/OXD_Problem_Solve",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Runout"
|
||||
},
|
||||
"position": {
|
||||
"height": 1467,
|
||||
"width": 709,
|
||||
"x": 4172,
|
||||
"y": 841
|
||||
},
|
||||
"props": {
|
||||
"path": "Windows/Graphics/Templates/Runout",
|
||||
"style": {
|
||||
"classes": "painted-events"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_HSS_Inbound"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 106,
|
||||
"x": 1017,
|
||||
"y": 1740
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]HSSInboundStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_HSS_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 125,
|
||||
"x": 497,
|
||||
"y": 920
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]HSSSingulatorStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_HSS_Sorter"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 95,
|
||||
"x": 1760,
|
||||
"y": 120
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]HSSSorterStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Inbound"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 110,
|
||||
"x": 2537,
|
||||
"y": 2000
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDInboundStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Singulator"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 128,
|
||||
"x": 2797,
|
||||
"y": 1640
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDSingulatorStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Sorter"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 97,
|
||||
"x": 3774,
|
||||
"y": 1266
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDSorterStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_OXD_Problem_Solve"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 150,
|
||||
"x": 3007,
|
||||
"y": 910
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]OXDProblemSolveStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NavButton_Runout"
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 74,
|
||||
"x": 4607,
|
||||
"y": 1662
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"enableTooltip": true,
|
||||
"label": null,
|
||||
"tagPath": "[default]RunoutStatus",
|
||||
"view": ""
|
||||
},
|
||||
"path": "Templates/Buttons/NavButton",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"system": {
|
||||
"onStartup": {
|
||||
"config": {
|
||||
"script": "\tif system.perspective.isAuthorized(True, [\u0027Authenticated/Roles/Maintenance\u0027]):\n\t\tself.meta.visible \u003d True\n\telse:\n\t\tself.meta.visible \u003d False"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "StartStopSystem",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 125,
|
||||
"x": 1190,
|
||||
"y": 982
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"params": {
|
||||
"label": "",
|
||||
"tagPaths": [
|
||||
"[default]MCP01/MCP01",
|
||||
"[default]MCP02/MCP02",
|
||||
"[default]MCP03/MCP03",
|
||||
"[default]MCP20/MCP20",
|
||||
"[default]MCP21/MCP21"
|
||||
],
|
||||
"view": "Windows/Graphics/Overview"
|
||||
},
|
||||
"path": "Templates/Buttons/StartStopSystem",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"system": {
|
||||
"onStartup": {
|
||||
"config": {
|
||||
"script": "\tif system.perspective.isAuthorized(True, [\u0027Authenticated/Roles/Maintenance\u0027]):\n\t\tself.meta.visible \u003d True\n\telse:\n\t\tself.meta.visible \u003d False"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "StartStopHSS",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 125,
|
||||
"x": 1190,
|
||||
"y": 1172
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"params": {
|
||||
"label": "",
|
||||
"tagPath": "[default]HSSStatus",
|
||||
"tagPaths": [
|
||||
"[default]MCP02/MCP02",
|
||||
"[default]MCP03/MCP03",
|
||||
"[default]MCP21/MCP21"
|
||||
],
|
||||
"view": "Windows/Graphics/Overview"
|
||||
},
|
||||
"path": "Templates/Buttons/StartStopSystem",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"system": {
|
||||
"onStartup": {
|
||||
"config": {
|
||||
"script": "\tif system.perspective.isAuthorized(True, [\u0027Authenticated/Roles/Maintenance\u0027]):\n\t\t\tself.meta.visible \u003d True\n\telse:\n\t\t\tself.meta.visible \u003d False"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "StartStopOXD",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"height": 40,
|
||||
"width": 125,
|
||||
"x": 1190,
|
||||
"y": 1362
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"params": {
|
||||
"label": "",
|
||||
"tagPath": "[default]OXDStatus",
|
||||
"tagPaths": [
|
||||
"[default]MCP01/MCP01",
|
||||
"[default]MCP20/MCP20"
|
||||
],
|
||||
"view": "Windows/Graphics/Overview"
|
||||
},
|
||||
"path": "Templates/Buttons/StartStopSystem",
|
||||
"style": {
|
||||
"transform": "scale(4)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.tag.writeBlocking(\"[default]MCP21/Verify_Inspection\", 1)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 144,
|
||||
"width": 344,
|
||||
"x": 387.5,
|
||||
"y": 678
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "isAuthorized(true, \u0027Authenticated/Roles/Administrator\u0027) ||\r\nisAuthorized(true, \u0027Authenticated/Roles/Maintenance\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FF0000",
|
||||
"color": "#FF0000"
|
||||
},
|
||||
"text": "Shoe Pin Fault Reset",
|
||||
"textStyle": {
|
||||
"backgroundColor": "#FF0000",
|
||||
"borderColor": "#FF0000",
|
||||
"color": "#000000",
|
||||
"fontSize": 28,
|
||||
"outlineColor": "#FF0000"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
||||
WITH LANES 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
|
||||
FROM package_history
|
||||
WHERE s04_timestamp BETWEEN :startDate AND :endDate
|
||||
AND destination_act = :lane
|
||||
GROUP BY DATE_FORMAT(s04_timestamp, "%Y-%m-%d %H:00")
|
||||
)
|
||||
SELECT
|
||||
start_timestamp AS time,
|
||||
hour,
|
||||
/* Counts: */
|
||||
total AS total_count,
|
||||
/* PPH: */
|
||||
total AS total_pph,
|
||||
/* Percents: */
|
||||
ROUND(total/total, 4) AS total_percent
|
||||
FROM LANES;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user