Added queries #10
|
After Width: | Height: | Size: 6.0 KiB |
@ -0,0 +1,15 @@
|
||||
def detailed_view(page_id):
|
||||
"""
|
||||
This function is used to naviagte to a page from a navigation button
|
||||
This function takes one parameter "page_id. This is the id of the page
|
||||
the user wishes to navigate to.
|
||||
|
||||
Args:
|
||||
page_id : Target page the function will use to navigate to.
|
||||
Returns:
|
||||
None.
|
||||
|
||||
Raises:
|
||||
None.
|
||||
"""
|
||||
system.perspective.navigate(page_id)
|
||||
|
After Width: | Height: | Size: 12 KiB |
@ -1,626 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#000000",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Offline"
|
||||
},
|
||||
"params": {
|
||||
"demoColor": -1,
|
||||
"demoState": -1,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"System/MCM02/SOL/NCS1_1_SOL48",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(\r\n {view.params.demoColor} \u003e\u003d 0,\r\n {view.params.demoColor},\r\n coalesce({value}, -1)\r\n)\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#C2C2C2"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FFA500"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#0008FF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#FFF700"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#87CEEB"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#90EE90"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "#964B00"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "#8B0000"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "#808080"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "#8B8000"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "#006400"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "#FFFFC5"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "#00008B"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "#FF7276"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "#556B2F"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "#B43434"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "#4682B4"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "#FFD700"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.divertingLeft": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.divertingRight": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"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": "if(\r\n {view.params.demoState} \u003e\u003d 0,\r\n {view.params.demoState},\r\n coalesce({value}, -1)\r\n)\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "Offline",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Closed"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Actuated"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Communication Faulted"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Conveyor Running In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Disabled"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Disconnected"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "Enabled Not Running"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "Encoder Fault"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "Energy Management"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "ESTOP Was Actuated"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "EStopped"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "EStopped Locally"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "Extended Faulted"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "Full"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "Gaylord Start Pressed"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "Jam Fault"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "Jammed"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "Loading Allowed"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "Loading Not Allowed"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "Low Air Pressure Fault Was Present"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 22,
|
||||
"output": "Conveyor Stopped In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 23,
|
||||
"output": "Motor Faulted"
|
||||
},
|
||||
{
|
||||
"input": 24,
|
||||
"output": "Motor Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 25,
|
||||
"output": "Normal"
|
||||
},
|
||||
{
|
||||
"input": 26,
|
||||
"output": "Off Inactive"
|
||||
},
|
||||
{
|
||||
"input": 27,
|
||||
"output": "Open"
|
||||
},
|
||||
{
|
||||
"input": 28,
|
||||
"output": "PLC Ready To Run"
|
||||
},
|
||||
{
|
||||
"input": 29,
|
||||
"output": "Package Release Pressed"
|
||||
},
|
||||
{
|
||||
"input": 30,
|
||||
"output": "Power Branch Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 31,
|
||||
"output": "Pressed"
|
||||
},
|
||||
{
|
||||
"input": 32,
|
||||
"output": "Ready To Receive"
|
||||
},
|
||||
{
|
||||
"input": 33,
|
||||
"output": "Running"
|
||||
},
|
||||
{
|
||||
"input": 34,
|
||||
"output": "Started"
|
||||
},
|
||||
{
|
||||
"input": 35,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 36,
|
||||
"output": "System Started"
|
||||
},
|
||||
{
|
||||
"input": 37,
|
||||
"output": "Unknown"
|
||||
},
|
||||
{
|
||||
"input": 38,
|
||||
"output": "VFD Fault"
|
||||
},
|
||||
{
|
||||
"input": 39,
|
||||
"output": "Conveyor Running In Power Saving Mode"
|
||||
},
|
||||
{
|
||||
"input": 40,
|
||||
"output": "Conveyor Jogging In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 41,
|
||||
"output": "VFD Reset Required"
|
||||
},
|
||||
{
|
||||
"input": 42,
|
||||
"output": "Jam Reset Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 43,
|
||||
"output": "Start Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 44,
|
||||
"output": "Stop Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 45,
|
||||
"output": "No Container"
|
||||
},
|
||||
{
|
||||
"input": 46,
|
||||
"output": "Ready To Be Enabled"
|
||||
},
|
||||
{
|
||||
"input": 47,
|
||||
"output": "Half Full"
|
||||
},
|
||||
{
|
||||
"input": 48,
|
||||
"output": "Enabled"
|
||||
},
|
||||
{
|
||||
"input": 49,
|
||||
"output": "Tipper Faulted"
|
||||
},
|
||||
{
|
||||
"input": 54,
|
||||
"output": "Diverting"
|
||||
},
|
||||
{
|
||||
"input": 50,
|
||||
"output": "OK"
|
||||
},
|
||||
{
|
||||
"input": 51,
|
||||
"output": "DISCONNECTED"
|
||||
},
|
||||
{
|
||||
"input": 52,
|
||||
"output": "FAULTED"
|
||||
},
|
||||
{
|
||||
"input": 53,
|
||||
"output": "FAULTED/DISCONNECTED"
|
||||
},
|
||||
{
|
||||
"input": 101,
|
||||
"output": "Diverting"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "Diverting Left"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "Diverting Right"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.demoColor": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.demoState": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 50,
|
||||
"width": 50
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "SOL"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.color"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if ({view.custom.state} \u003d \"Offline\", \"#fff\", \"#000\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"fill": {},
|
||||
"height": "47.417244",
|
||||
"id": "beaconSquare",
|
||||
"name": "beaconSquare",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2.36887"
|
||||
},
|
||||
"type": "rect",
|
||||
"width": "47.337795",
|
||||
"x": "1.450278",
|
||||
"y": "1.3708278"
|
||||
},
|
||||
{
|
||||
"fill": {},
|
||||
"id": "beaconLabel",
|
||||
"name": "beaconLabel",
|
||||
"stroke": {
|
||||
"width": "1.15193"
|
||||
},
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": "21px",
|
||||
"textAnchor": "middle"
|
||||
},
|
||||
"text": "SOL",
|
||||
"textAnchor": "middle",
|
||||
"type": "text",
|
||||
"x": "24.958401",
|
||||
"y": "31.781378"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 50 50"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-Conv\u0027)\n\t#create tags lists for the device\n\tprops \u003d self.view.params.tagProps\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, props[0])\n\tsystem.perspective.openDock(\u0027Docked-East-Device\u0027,params\u003d{\u0027tagProps\u0027:props, \"tags\":tags_table_dataset, \"name\":\"\"} )"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"draggable": false,
|
||||
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
||||
"modal": false,
|
||||
"overlayDismiss": false,
|
||||
"position": {
|
||||
"relativeLocation": "top-right"
|
||||
},
|
||||
"positionType": "relative",
|
||||
"resizable": false,
|
||||
"showCloseIcon": false,
|
||||
"type": "open",
|
||||
"viewParams": {
|
||||
"text": "{/root.meta.tooltip.text}"
|
||||
},
|
||||
"viewPath": "autStand/Custom_Views/Tooltip",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
},
|
||||
"onMouseLeave": {
|
||||
"config": {
|
||||
"draggable": true,
|
||||
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
||||
"modal": false,
|
||||
"overlayDismiss": false,
|
||||
"resizable": true,
|
||||
"showCloseIcon": true,
|
||||
"type": "close",
|
||||
"viewPath": "autStand/Custom_Views/Tooltip",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.state} !\u003d \"Offline\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_solenoids"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"overflow": "visible",
|
||||
"userSelect": "None"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 99 KiB |
@ -0,0 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"marginBottom": "2px"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "transparent",
|
||||
"borderBottomColor": "var(--neutral-30)",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": "1px",
|
||||
"color": "var(--neutral-80)",
|
||||
"fontSize": "12px",
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": "6px",
|
||||
"paddingRight": "6px",
|
||||
"textTransform": "uppercase",
|
||||
"fill": "var(--neutral-70)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
def handleTagHighlight(view, currentValue):
|
||||
tag_priority = currentValue.value
|
||||
|
||||
# --- CASE 1: Remove all highlights by applying CLEAR class ---
|
||||
if not tag_priority or str(tag_priority).upper() == "CLEAR":
|
||||
for child in view.rootContainer.getChildren():
|
||||
try:
|
||||
child.props.style.classes = "Highlight/Pulse-Clear"
|
||||
except:
|
||||
pass
|
||||
return False
|
||||
|
||||
# --- CASE 2: Highlight as normal ---
|
||||
parts = str(tag_priority).split("||")
|
||||
tag = parts[0]
|
||||
priority = parts[1] if len(parts) > 1 else "1"
|
||||
|
||||
splitedTag = tag.split("/")
|
||||
deviceName = splitedTag[-1]
|
||||
|
||||
Docked_East_Map = {
|
||||
"VFD": "Docked-East-VFD",
|
||||
"MCM": "Docked-East-MCM"
|
||||
}
|
||||
Docked_East_View = Docked_East_Map["VFD"]
|
||||
|
||||
if "PE" in deviceName:
|
||||
tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1"
|
||||
|
||||
if "MCM" in deviceName:
|
||||
Docked_East_View = Docked_East_Map["MCM"]
|
||||
|
||||
# Clear old highlights (set to Clear class)
|
||||
components = view.rootContainer.getChildren()
|
||||
for child in components:
|
||||
child.props.style.classes = "Highlight/Pulse-Clear"
|
||||
|
||||
# Apply highlight if found
|
||||
foundMatch = False
|
||||
for child in components:
|
||||
params = child.props.get("params", {})
|
||||
tagProps = params.get("tagProps", {})
|
||||
tagsList = list(tagProps)
|
||||
|
||||
if len(tagsList) == 0:
|
||||
continue
|
||||
|
||||
tagPath = tagsList[0]
|
||||
|
||||
if tag == tagPath:
|
||||
child.props.style.classes = "Highlight/Pulse-" + priority
|
||||
system.perspective.openDock(Docked_East_View, params={'tagProps': tagProps})
|
||||
foundMatch = True
|
||||
|
||||
return foundMatch
|
||||
@ -0,0 +1,12 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "#AAAAAA",
|
||||
"borderColor": "#808080",
|
||||
"borderStyle": "none",
|
||||
"color": "#555555",
|
||||
"margin": "5px",
|
||||
"fill": "#2B2B2B"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 101 B |
@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "AllOf",
|
||||
"securityLevels": [
|
||||
{
|
||||
"name": "Authenticated",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,603 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms"
|
||||
},
|
||||
"params": {
|
||||
"demoColor": -1,
|
||||
"tagProps": [
|
||||
"System/MCM02/Encoder/ENSH/NCS1_1_ENSH1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(\r\n {view.params.demoColor} \u003e\u003d 0,\r\n {view.params.demoColor},\r\n coalesce({value}, 0)\r\n)\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#C2C2C2"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FFA500"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#0008FF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#FFF700"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#87CEEB"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#90EE90"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "#964B00"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "#8B0000"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "#808080"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "#8B8000"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "#006400"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "#FFFFC5"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "#00008B"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "#FF7276"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "#556B2F"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "#B43434"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "#4682B4"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "#FFD700"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"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},-1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "Offline",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Closed"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Actuated"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Communication Faulted"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Conveyor Running In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Disabled"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Disconnected"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "Enabled Not Running"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "Encoder Fault"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "Energy Management"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "ESTOP Was Actuated"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "EStopped"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "EStopped Locally"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "Extended Faulted"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "Full"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "Gaylord Start Pressed"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "Jam Fault"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "Jammed"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "Loading Allowed"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "Loading Not Allowed"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "Low Air Pressure Fault Was Present"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 22,
|
||||
"output": "Conveyor Stopped In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 23,
|
||||
"output": "Motor Faulted"
|
||||
},
|
||||
{
|
||||
"input": 24,
|
||||
"output": "Motor Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 25,
|
||||
"output": "Normal"
|
||||
},
|
||||
{
|
||||
"input": 26,
|
||||
"output": "Off Inactive"
|
||||
},
|
||||
{
|
||||
"input": 27,
|
||||
"output": "Open"
|
||||
},
|
||||
{
|
||||
"input": 28,
|
||||
"output": "PLC Ready To Run"
|
||||
},
|
||||
{
|
||||
"input": 29,
|
||||
"output": "Package Release Pressed"
|
||||
},
|
||||
{
|
||||
"input": 30,
|
||||
"output": "Power Branch Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 31,
|
||||
"output": "Pressed"
|
||||
},
|
||||
{
|
||||
"input": 32,
|
||||
"output": "Ready To Receive"
|
||||
},
|
||||
{
|
||||
"input": 33,
|
||||
"output": "Running"
|
||||
},
|
||||
{
|
||||
"input": 34,
|
||||
"output": "Started"
|
||||
},
|
||||
{
|
||||
"input": 35,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 36,
|
||||
"output": "System Started"
|
||||
},
|
||||
{
|
||||
"input": 37,
|
||||
"output": "Unknown"
|
||||
},
|
||||
{
|
||||
"input": 38,
|
||||
"output": "VFD Fault"
|
||||
},
|
||||
{
|
||||
"input": 39,
|
||||
"output": "Conveyor Running In Power Saving Mode"
|
||||
},
|
||||
{
|
||||
"input": 40,
|
||||
"output": "Conveyor Jogging In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 41,
|
||||
"output": "VFD Reset Required"
|
||||
},
|
||||
{
|
||||
"input": 42,
|
||||
"output": "Jam Reset Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 43,
|
||||
"output": "Start Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 44,
|
||||
"output": "Stop Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 45,
|
||||
"output": "No Container"
|
||||
},
|
||||
{
|
||||
"input": 46,
|
||||
"output": "Ready To Be Enabled"
|
||||
},
|
||||
{
|
||||
"input": 47,
|
||||
"output": "Half Full"
|
||||
},
|
||||
{
|
||||
"input": 48,
|
||||
"output": "Enabled"
|
||||
},
|
||||
{
|
||||
"input": 49,
|
||||
"output": "Tipper Faulted"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"params.demoColor": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"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.color"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\t#create tags lists for the device\n\tprops \u003d self.view.params.tagProps\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, props[0])\n\tsystem.perspective.openDock(\u0027Docked-East-Device\u0027,params\u003d{\u0027tagProps\u0027:props, \"tags\":tags_table_dataset, \"name\":\"\"} )"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"draggable": false,
|
||||
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
||||
"modal": false,
|
||||
"overlayDismiss": false,
|
||||
"position": {
|
||||
"relativeLocation": "top-right"
|
||||
},
|
||||
"positionType": "relative",
|
||||
"resizable": false,
|
||||
"showCloseIcon": false,
|
||||
"type": "open",
|
||||
"viewParams": {
|
||||
"text": "{/Encoder.meta.tooltip.text}"
|
||||
},
|
||||
"viewPath": "autStand/Custom_Views/Tooltip",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
},
|
||||
"onMouseLeave": {
|
||||
"config": {
|
||||
"draggable": true,
|
||||
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
||||
"modal": false,
|
||||
"overlayDismiss": false,
|
||||
"resizable": true,
|
||||
"showCloseIcon": true,
|
||||
"type": "close",
|
||||
"viewPath": "autStand/Custom_Views/Tooltip",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Encoder",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.state} !\u003d \"Offline\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_encoders"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"userSelect": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--neutral-60)",
|
||||
"borderTopLeftRadius": "4px",
|
||||
"borderTopRightRadius": "4px",
|
||||
"borderBottomLeftRadius": "4px",
|
||||
"borderBottomRightRadius": "4px",
|
||||
"color": "var(--neutral-10)",
|
||||
"fontSize": "12px",
|
||||
"fontWeight": "bold",
|
||||
"lineHeight": "16px",
|
||||
"padding": "2px",
|
||||
"textAlign": "center"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
|
||||
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
|
||||
COUNT(*) AS Inducted,
|
||||
SUM(alltable.ACTUAL_DEST NOT IN ('S013001', 'S012069', 'S011076')) AS Sorted,
|
||||
SUM(alltable.ACTUAL_DEST IN ('S013001', 'S012069', 'S011076') AND (alltable.DivertStatus & (128|256|512|1024|4096|65536)) > 0) AS AwcsRecirc,
|
||||
SUM(alltable.ACTUAL_DEST IN ('S013001', 'S012069', 'S011076') AND (alltable.DivertStatus & (4|32|262144|524288|1048576)) > 0) AS OperationalRecirc,
|
||||
SUM(alltable.ACTUAL_DEST IN ('S013001', 'S012069', 'S011076') AND (alltable.DivertStatus & (2|8|16|64|8192|16384|131072|2097152)) > 0) AS MachineRecirc
|
||||
FROM alltable
|
||||
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
|
||||
GROUP BY hour(alltable.t_stamp)
|
||||
@ -1,58 +0,0 @@
|
||||
SELECT
|
||||
roundtime AS `Round Time`,
|
||||
sLocation_ID AS `Location ID`,
|
||||
CONCAT(COALESCE(Success_pct, 0), '%') AS `Success Percentage`,
|
||||
CONCAT(COALESCE(Unknown_pct, 0), '%') AS `Unknown Percentage`,
|
||||
CONCAT(COALESCE(Unexpected_Container_pct, 0), '%') AS `Unexpected Container Percentage`,
|
||||
CONCAT(COALESCE(Tracking_Error_pct, 0), '%') AS `Tracking Error Percentage`,
|
||||
CONCAT(COALESCE(Gap_Error_pct, 0), '%') AS `Gap Error Percentage`,
|
||||
CONCAT(COALESCE(Destination_Full_pct, 0), '%') AS `Destination Full Percentage`,
|
||||
CONCAT(COALESCE(Destination_Non_Operational_pct, 0), '%') AS `Destination Non Operational Percentage`,
|
||||
CONCAT(COALESCE(Invalid_Destination_pct, 0), '%') AS `Invalid Destination Percentage`,
|
||||
CONCAT(COALESCE(Scanner_Error_pct, 0), '%') AS `Scanner Error Percentage`,
|
||||
CONCAT(COALESCE(Destination_Disabled_pct, 0), '%') AS `Destination Disabled Percentage`,
|
||||
CONCAT(COALESCE(Throughput_Limit_pct, 0), '%') AS `Throughput Limit Percentage`,
|
||||
CONCAT(COALESCE(Failed_To_Divert_pct, 0), '%') AS `Failed To Divert Percentage`,
|
||||
CONCAT(COALESCE(No_Destination_Received_pct, 0), '%') AS `No Destination Received Percentage`,
|
||||
CONCAT(COALESCE(Lost_Container_pct, 0), '%') AS `Lost Container Percentage`,
|
||||
CONCAT(COALESCE(Dimension_Error_pct, 0), '%') AS `Dimension Error Percentage`,
|
||||
CONCAT(COALESCE(Weight_Error_pct, 0), '%') AS `Weight Error Percentage`,
|
||||
CONCAT(COALESCE(Container_Utilization_pct, 0), '%') AS `Container Utilization Percentage`,
|
||||
CONCAT(COALESCE(Unable_To_Divert_pct, 0), '%') AS `Unable To Divert Percentage`,
|
||||
CONCAT(COALESCE(Destination_Not_Attempted_pct, 0), '%') AS `Destination Not Attempted Percentage`
|
||||
FROM (
|
||||
SELECT
|
||||
FROM_UNIXTIME(
|
||||
FLOOR(UNIX_TIMESTAMP(t_stamp) /
|
||||
CEIL(TIMESTAMPDIFF(SECOND, :starttime, :endtime) / 24.0)
|
||||
) *
|
||||
CEIL(TIMESTAMPDIFF(SECOND, :starttime, :endtime) / 24.0)
|
||||
) AS roundtime,
|
||||
sLocation_ID,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 0 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Success_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 1 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Unknown_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 2 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Unexpected_Container_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 3 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Tracking_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 4 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Gap_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 5 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Full_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 6 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Non_Operational_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 7 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Invalid_Destination_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 IN (8, 9, 10) THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Scanner_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 12 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Disabled_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 13 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Throughput_Limit_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 14 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Failed_To_Divert_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 16 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS No_Destination_Received_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 17 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Lost_Container_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 18 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Dimension_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 19 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Weight_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 20 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Container_Utilization_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 21 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Unable_To_Divert_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 22 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Not_Attempted_pct
|
||||
FROM item_data
|
||||
WHERE t_stamp BETWEEN :starttime AND :endtime
|
||||
AND adiSort_Code_0 NOT IN (11, 15)
|
||||
AND (COALESCE(:locationid, '') = '' OR sLocation_ID = :locationid)
|
||||
GROUP BY roundtime, sLocation_ID
|
||||
ORDER BY roundtime ASC
|
||||
) basa;
|
||||
|
||||
@ -0,0 +1,789 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Status": "",
|
||||
"tagProps": [
|
||||
"MCM01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Status": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 212,
|
||||
"width": 336
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"textStyle": {
|
||||
"textIndent": "10px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "JAM",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"text": "Jams"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "24px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"path": "autStand/Equipment/JAM",
|
||||
"style": {
|
||||
"marginRight": "5px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "10px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginRight": "10px"
|
||||
},
|
||||
"text": 0,
|
||||
"textStyle": {
|
||||
"textAlign": "end"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "60px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#555555",
|
||||
"key": "value"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginLeft": 10
|
||||
},
|
||||
"text": "AREA",
|
||||
"textStyle": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "195px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.area_display"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginLeft": 50
|
||||
},
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomColor": "#555555",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": 0.5,
|
||||
"borderLeftColor": "#555555",
|
||||
"borderLeftStyle": "none",
|
||||
"borderLeftWidth": 0.5,
|
||||
"borderRightColor": "#555555",
|
||||
"borderRightStyle": "none",
|
||||
"borderRightWidth": 0.5,
|
||||
"borderTopColor": "#555555",
|
||||
"borderTopStyle": "solid",
|
||||
"borderTopWidth": 0.5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginLeft": 10
|
||||
},
|
||||
"text": "STATUS",
|
||||
"textStyle": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params.value.tagProps[0]": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"key": "value",
|
||||
"value": {
|
||||
"tagProps": [
|
||||
null,
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": "autStand/Equipment/Controller-Views/CommandControlStatus"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-around",
|
||||
"style": {
|
||||
"borderBottomColor": "#555555",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": 0.5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "25px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.counts"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tfor v in value.values():\n\t\tif v \u003e 0:\n\t\t\treturn \"red\"\n\treturn \"\"",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/notifications_active",
|
||||
"style": {
|
||||
"classes": "",
|
||||
"marginLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginLeft": 10
|
||||
},
|
||||
"text": "ACTIVE ALARMS",
|
||||
"textStyle": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_3"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "High",
|
||||
"textStyle": {
|
||||
"fontSize": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "Medium",
|
||||
"textStyle": {
|
||||
"fontSize": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "Low",
|
||||
"textStyle": {
|
||||
"fontSize": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_3"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "Diag",
|
||||
"textStyle": {
|
||||
"fontSize": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_4"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": "Total",
|
||||
"textStyle": {
|
||||
"fontSize": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": 5,
|
||||
"textStyle": {
|
||||
"fontSize": 10,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "update-alarm-count",
|
||||
"pageScope": false,
|
||||
"script": "\thigh \u003d payload.get(\"High\",0)\n\tself.props.text \u003d high",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": 2,
|
||||
"textStyle": {
|
||||
"fontSize": 10,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "update-alarm-count",
|
||||
"pageScope": false,
|
||||
"script": "\tmedium \u003d payload.get(\"Medium\",0)\n\tself.props.text \u003d medium",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": 0,
|
||||
"textStyle": {
|
||||
"fontSize": 10,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "update-alarm-count",
|
||||
"pageScope": false,
|
||||
"script": "\tlow \u003d payload.get(\"Low\",0)\n\tself.props.text \u003d low",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_3"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": 3,
|
||||
"textStyle": {
|
||||
"fontSize": 10,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "update-alarm-count",
|
||||
"pageScope": false,
|
||||
"script": "\tdiag \u003d payload.get(\"Diagnostic\",0)\n\tself.props.text \u003d diag",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_4"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"text": 10,
|
||||
"textStyle": {
|
||||
"fontSize": 10,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "update-alarm-count",
|
||||
"pageScope": false,
|
||||
"script": "\tcritical \u003d payload.get(\"Critical\",0)\n\thigh \u003d payload.get(\"High\",0)\n\tmed \u003d payload.get(\"Medium\",0)\n\tlow \u003d payload.get(\"Low\",0)\n\tdiag \u003d payload.get(\"Diagnostic\",0)\n\t\n\ttotal \u003d critical + high + med + low + diag\n\tself.props.text \u003d total\n\t",
|
||||
"sessionScope": false,
|
||||
"viewScope": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "334px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 10,
|
||||
"marginRight": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"counts": {
|
||||
"Critical": 0,
|
||||
"Diagnostic": 3,
|
||||
"High": 5,
|
||||
"Low": 0,
|
||||
"Medium": 2
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tDETAILED_VIEWS \u003d {\n\t\t\"MCM01\": \"/autStand/MCM01\",\n\t\t\"MCM02\": \"/autStand/MCM02\"\n\t}\n\tpage \u003d self.view.params.tagProps[0]\n\t\n\tsystem.perspective.navigate(DETAILED_VIEWS[page])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.Total": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.counts.Critical} + {this.custom.counts.Diagnostic} + {this.custom.counts.High} + {this.custom.counts.Low} + {this.custom.counts.Medium}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.area": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "jsonGet({this.custom.plc_dict}, \"Area\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.area_display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(len({this.custom.sub_area})\u003e0,\r\nconcat({this.custom.area} + \"/\" + {this.custom.sub_area}),\r\n{this.custom.area})"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.counts": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tsystem.perspective.sendMessage(\"update-alarm-count\", self.custom.counts, \"view\")"
|
||||
}
|
||||
},
|
||||
"custom.plc_dict": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonGet({value}, {view.params.tagProps[0]})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.provider": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\"[\"+{session.custom.fc}+\"_SCADA_TAG_PROVIDER]\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), 0, {value})",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.sub_area": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "jsonGet({this.custom.plc_dict}, \"SubArea\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.table": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"polling": {
|
||||
"enabled": true,
|
||||
"rate": "3"
|
||||
},
|
||||
"queryPath": "Alarms-autStand/GetActiveAlarmsByLocationAndPriority"
|
||||
},
|
||||
"type": "query"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\ttry:\n\t\tMCM \u003d self.view.params.tagProps[0]\n\t\tdata \u003d currentValue.value\n\t\t\n\t\t# Convert dataset to PyDataSet\n\t\trows \u003d system.dataset.toPyDataSet(data)\n\t\t\n\t\t# Initialize counts dictionary with first-letter uppercase keys\n\t\tcounts \u003d {\n\t\t\t\"Low\": 0,\n\t\t\t\"Medium\": 0,\n\t\t\t\"High\": 0,\n\t\t\t\"Critical\": 0,\n\t\t\t\"Diagnostic\": 0\n\t\t}\n\t\t\n\t\t# Loop through rows and filter for current MCM\n\t\tfor row in rows:\n\t\t\tif row[\"Location\"] \u003d\u003d MCM:\n\n\t\t\t\tpriority \u003d row[\"Priority\"].capitalize()\n\t\t\t\tif priority in counts:\n\t\t\t\t\tcounts[priority] \u003d row[\"Count\"]\n\t\t\n\t\tself.custom.counts \u003d counts\n\t\n\texcept Exception as e:\n\t\tsystem.perspective.print(\"Error gaq dzma: \" + str(e))"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.covert} \u003d False \u0026\u0026 {this.custom.status} \u003d 5, False, True)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"animationFillMode": "both",
|
||||
"borderBottomLeftRadius": 10,
|
||||
"borderBottomRightRadius": 10,
|
||||
"borderColor": "#555555",
|
||||
"borderStyle": "solid",
|
||||
"borderTopLeftRadius": 10,
|
||||
"borderTopRightRadius": 10,
|
||||
"borderWidth": 1,
|
||||
"box-shadow": "5px 5px 5px grey",
|
||||
"classes": "Background-Styles/Controller",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 296 B |
@ -0,0 +1,515 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#C2C2C2"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FFA500"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#0008FF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#FFF700"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#87CEEB"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#90EE90"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "#964B00"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "#8B0000"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "#808080"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "#8B8000"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "#006400"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "#FFFFC5"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "#00008B"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "#FF7276"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "#556B2F"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "#B43434"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "#4682B4"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "#FFD700"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Closed"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Actuated"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Communication Faulted"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Conveyor Running In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Disabled"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Disconnected"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "Enabled Not Running"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "Encoder Fault"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "Energy Management"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "ESTOP Was Actuated"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "EStopped"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "EStopped Locally"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "Extended Faulted"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "Full"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "Gaylord Start Pressed"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "Jam Fault"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "Jammed"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "Loading Allowed"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "Loading Not Allowed"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "Low Air Pressure Fault Was Present"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 22,
|
||||
"output": "Conveyor Stopped In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 23,
|
||||
"output": "Motor Faulted"
|
||||
},
|
||||
{
|
||||
"input": 24,
|
||||
"output": "Motor Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 25,
|
||||
"output": "Normal"
|
||||
},
|
||||
{
|
||||
"input": 26,
|
||||
"output": "Off Inactive"
|
||||
},
|
||||
{
|
||||
"input": 27,
|
||||
"output": "Open"
|
||||
},
|
||||
{
|
||||
"input": 28,
|
||||
"output": "PLC Ready To Run"
|
||||
},
|
||||
{
|
||||
"input": 29,
|
||||
"output": "Package Release Pressed"
|
||||
},
|
||||
{
|
||||
"input": 30,
|
||||
"output": "Power Branch Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 31,
|
||||
"output": "Pressed"
|
||||
},
|
||||
{
|
||||
"input": 32,
|
||||
"output": "Ready To Receive"
|
||||
},
|
||||
{
|
||||
"input": 33,
|
||||
"output": "Running"
|
||||
},
|
||||
{
|
||||
"input": 34,
|
||||
"output": "Started"
|
||||
},
|
||||
{
|
||||
"input": 35,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 36,
|
||||
"output": "System Started"
|
||||
},
|
||||
{
|
||||
"input": 37,
|
||||
"output": "Unknown"
|
||||
},
|
||||
{
|
||||
"input": 38,
|
||||
"output": "VFD Fault"
|
||||
},
|
||||
{
|
||||
"input": 39,
|
||||
"output": "Conveyor Running In Power Saving Mode"
|
||||
},
|
||||
{
|
||||
"input": 40,
|
||||
"output": "Conveyor Jogging In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 41,
|
||||
"output": "VFD Reset Required"
|
||||
},
|
||||
{
|
||||
"input": 42,
|
||||
"output": "Jam Reset Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 43,
|
||||
"output": "Start Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 44,
|
||||
"output": "Stop Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 45,
|
||||
"output": "No Container"
|
||||
},
|
||||
{
|
||||
"input": 46,
|
||||
"output": "Ready To Be Enabled"
|
||||
},
|
||||
{
|
||||
"input": 47,
|
||||
"output": "Half Full"
|
||||
},
|
||||
{
|
||||
"input": 48,
|
||||
"output": "Enabled"
|
||||
},
|
||||
{
|
||||
"input": 49,
|
||||
"output": "Tipper Faulted"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 30,
|
||||
"width": 188
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "drawing"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"id": "defs1",
|
||||
"name": "defs1",
|
||||
"type": "defs"
|
||||
},
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"fill": {
|
||||
"paint": "#C2C2C2"
|
||||
},
|
||||
"height": "7.9060049",
|
||||
"id": "rect1",
|
||||
"name": "rect1",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 0
|
||||
},
|
||||
"type": "rect",
|
||||
"width": "52.39917",
|
||||
"x": "0.26337066",
|
||||
"y": "0.2977989"
|
||||
}
|
||||
],
|
||||
"id": "layer1",
|
||||
"name": "layer1",
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"viewBox": "0 0 52.916668 8.4666672"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\t#create devices and tags lists for the conveyor\n\tprops \u003d self.view.params.tagProps[0]\n\tautStand.devices.build_device_mapping(props)\n\tdevice_table_dataset \u003d autStand.devices.build_device_table(self)\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, props)\n\tsystem.perspective.openDock(\u0027Docked-East-Conv\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps, \"devices\": device_table_dataset, \"tags\":tags_table_dataset})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"borderStyle": "solid",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
@ -0,0 +1,976 @@
|
||||
{
|
||||
"custom": {
|
||||
"largeView": false
|
||||
},
|
||||
"params": {
|
||||
"params": {}
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.largeView": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{page.props.dimensions.viewport.width} \u003e 800"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.params": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 58
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"page": "/Monitron"
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "nav"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px"
|
||||
},
|
||||
"props": {
|
||||
"color": "#FFFFFF",
|
||||
"path": "material/vibration",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "41px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "[IEC_SCADA_TAG_PROVIDER]Monitron/monitron_data"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.getRowCount()",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFFFF",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"display": false
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"page": "/Oil"
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "nav"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px"
|
||||
},
|
||||
"props": {
|
||||
"color": "#FFFFFF",
|
||||
"path": "material/opacity",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "41px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "[IEC_SCADA_TAG_PROVIDER]Oil/oil_condition_monitoring"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.getRowCount()",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFFFF",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"display": false
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Image"
|
||||
},
|
||||
"position": {
|
||||
"basis": "120px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.largeView"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"fit": {
|
||||
"height": 30,
|
||||
"mode": "fill"
|
||||
},
|
||||
"source": "/system/images/Builtin/amazon_rme_logo.png"
|
||||
},
|
||||
"type": "ia.display.image"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Spacer Start"
|
||||
},
|
||||
"position": {
|
||||
"basis": "16px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"text": " "
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"id": "Docked-West",
|
||||
"type": "toggle"
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "dock"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Menu Dock"
|
||||
},
|
||||
"position": {
|
||||
"basis": "24px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{view.custom.largeView}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"color": "#FFFFFF",
|
||||
"path": "material/menu",
|
||||
"style": {
|
||||
"classes": "Header/Icon",
|
||||
"marginRight": "10px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "550px",
|
||||
"grow": 1
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "300px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.area": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"Area\"),\"\"))"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.lookup_path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(if({this.custom.path}[1,0]\u003d\"DetailedView\", {this.custom.path}[2,0],\r\n\"\"), \"\")\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "page.props.path"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value},\"/\")",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.path_to_display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(len({this.custom.lookup_path})\u003c1, \"\",\r\nif(len({this.custom.area}) \u003c1, {this.custom.lookup_path},\r\nif(len({this.custom.sub_area}) \u003e 0, concat({this.custom.lookup_path} + \" / \" + {this.custom.area} + \" / \" + {this.custom.sub_area}),\r\nconcat({this.custom.lookup_path} + \" / \" + {this.custom.area}))))"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.plc_dict": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonGet({value},{this.custom.lookup_path})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.sub_area": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"SubArea\"), \"\"))"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.size} \u003d \"large\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.path_to_display"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "150px",
|
||||
"grow": 1
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Area"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon_1",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{[System]Gateway/Database/MariaDB/Available}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Database Connection Status: LOST",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Database Connection Status: GOOD"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "Database Connection Status: LOST"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{[System]Gateway/Database/MariaDB/Available}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#FF0000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "#FF0000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": " db_tag_path \u003d \"[System]Gateway/Database/MariaDB/Available\"\n\t\n if not (system.tag.readBlocking([db_tag_path])[0].value):\n \tsystem.perspective.openPopup(\"errorPopup\",\u0027autStand/PopUp-Views/DatabaseError\u0027, title\u003d\"Database Error\")\n\t"
|
||||
},
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"color": "#47FF47",
|
||||
"path": "material/table_chart"
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Spacer End_3"
|
||||
},
|
||||
"position": {
|
||||
"basis": "10px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"text": " "
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"custom": {
|
||||
"buttonid": "HeaderLegendIcon"
|
||||
},
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"draggable": false,
|
||||
"id": "TZyBcXB7",
|
||||
"modal": true,
|
||||
"overlayDismiss": true,
|
||||
"resizable": false,
|
||||
"showCloseIcon": false,
|
||||
"type": "open",
|
||||
"viewPath": "autStand/PopUp-Views/Legend_Popup/Legend-popup-view",
|
||||
"viewportBound": true
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon",
|
||||
"tooltip": {
|
||||
"delay": 250,
|
||||
"enabled": true,
|
||||
"sustain": 1000,
|
||||
"text": "Legend"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"color": "#FFFFFF",
|
||||
"path": "material/legend_toggle",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Spacer End"
|
||||
},
|
||||
"position": {
|
||||
"basis": "10px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"text": " "
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.navigate(page \u003d \"/Real-Time\")"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Label.props.text"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\treturn \"red\" if value \u003e 0 else \"#fff\"",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/notifications_active",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "41px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"polling": {
|
||||
"enabled": true,
|
||||
"rate": "3"
|
||||
},
|
||||
"queryPath": "Alarms-autStand/GetActiveAlarmsByLocationAndPriority",
|
||||
"returnFormat": "json"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttotal \u003d sum(row[\"Count\"] for row in value if \"Count\" in row and row[\"Count\"] is not None)\n\treturn total",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "query"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFFFF",
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "75px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{./Label.props.text} + \" active alarms in the system\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"justify": "flex-end",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"custom": {
|
||||
"covert": true
|
||||
},
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tdevice_list \u003d tags.tag_utilities.get_devices(self.session.custom.fc)\n\ttags.tag_utilities.reset_disconnect_tags(self.session.custom.fc, device_list)\n\tAWS.wbsckt_abort.close_websckt()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon_2",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.heartbeat_received": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_heartbeat_interval"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(secondsBetween(todate({value}),todate(now())) \u003e 70, False, True)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.wbsckt_running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_running"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} \u003d True \u0026\u0026 ({this.custom.heartbeat_received} \u003d True) , True, False)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.wbsckt_running"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "websocket running"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "websocket disconnected"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.wbsckt_running"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": false,
|
||||
"output": "#FF4747"
|
||||
},
|
||||
{
|
||||
"input": true,
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/location_city",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"position.basis": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "len({this.props.text}) * 11 + \"px\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "Configuration/FC"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"icon": "material/building",
|
||||
"style": {
|
||||
"borderWidth": "0.25px",
|
||||
"color": "#FFFFFF",
|
||||
"textAlign": "",
|
||||
"textIndent": 10
|
||||
},
|
||||
"textStyle": {
|
||||
"lineBreak": "auto"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Spacer End"
|
||||
},
|
||||
"position": {
|
||||
"basis": "20px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"text": " "
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "User"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"path": "material/person",
|
||||
"style": {
|
||||
"classes": "Header/Icon",
|
||||
"color": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Sign In"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.props.auth.user"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tif not value: # None or empty\n\t return \"Sign In\"\n\telse:\n\t username \u003d value.get(\"username\", \"\")\n\t return username.split(\"@\")[0] if username else \"Sign In\"",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Header/Icon",
|
||||
"color": "#FFFFFF",
|
||||
"cursor": "pointer",
|
||||
"marginLeft": "4px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Spacer End_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "20px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"text": " "
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closeSession()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Exit",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "bottom-left",
|
||||
"style": {
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 12
|
||||
},
|
||||
"tail": false,
|
||||
"text": "Exit Application"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"path": "material/exit_to_app",
|
||||
"style": {
|
||||
"classes": "Header/Icon",
|
||||
"color": "#FFFFFF",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"hasDelegate": true,
|
||||
"name": "Spacer End_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "16px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"text": " "
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"justify": "flex-end",
|
||||
"style": {
|
||||
"background": "rgb(43,43,43)"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
|
||||
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
|
||||
concat(round(COUNT(*)/COUNT(*) * 100,2),'%') AS Inducted,
|
||||
concat(round(SUM(alltable.ACTUAL_DEST <> 'S03999')/COUNT(*) * 100,2),'%') AS Sorted,
|
||||
concat(round(SUM((alltable.ACTUAL_DEST = 'S03999') AND (alltable.DivertStatus = 7 OR alltable.DivertStatus = 8 OR alltable.DivertStatus = 9 OR alltable.DivertStatus = 10 OR alltable.DivertStatus = 12 OR alltable.DivertStatus = 16))/COUNT(*) * 100,2),'%') AS AwcsRecirc,
|
||||
concat(round(SUM((alltable.ACTUAL_DEST = 'S03999') AND (alltable.DivertStatus = 2 OR alltable.DivertStatus = 5 OR alltable.DivertStatus = 18 OR alltable.DivertStatus = 19 or alltable.DivertStatus = 20))/COUNT(*) * 100,2),'%') AS OperationalRecirc,
|
||||
concat(round(SUM((alltable.ACTUAL_DEST = 'S03999') AND (alltable.DivertStatus = 1 OR alltable.DivertStatus = 3 OR alltable.DivertStatus = 4 OR alltable.DivertStatus = 6 OR alltable.DivertStatus = 13 OR alltable.DivertStatus = 14 OR alltable.DivertStatus = 17 OR alltable.DivertStatus = 21))/COUNT(*) * 100,2),'%') AS MachineRecirc
|
||||
FROM alltable
|
||||
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
|
||||
GROUP BY hour(alltable.t_stamp)
|
||||
@ -1,209 +0,0 @@
|
||||
SELECT
|
||||
CONCAT(DATE(t_stamp), ' ', HOUR(t_stamp), ':00') AS `Start Timestamp`,
|
||||
CONCAT('H', TIMESTAMPDIFF(HOUR, DATE_FORMAT(t_stamp, "%Y-%m-%d %H:00:00"), DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))) AS `Hour`,
|
||||
sScanner_Name AS `Scanner Name`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_bad_reads), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total Bad Reads`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_comm_fault), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total Comm Faults`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_good_reads), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total Good Reads`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_multi_items), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total Multi Items`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_multi_reads), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total Multi Reads`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_no_data), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total No Data`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
) = 0 THEN 0
|
||||
ELSE ROUND((COALESCE(SUM(diScanner_no_reads), 0) * 100.0) / (
|
||||
COALESCE(SUM(diScanner_bad_reads), 0) +
|
||||
COALESCE(SUM(diScanner_comm_fault), 0) +
|
||||
COALESCE(SUM(diScanner_good_reads), 0) +
|
||||
COALESCE(SUM(diScanner_multi_items), 0) +
|
||||
COALESCE(SUM(diScanner_multi_reads), 0) +
|
||||
COALESCE(SUM(diScanner_no_data), 0) +
|
||||
COALESCE(SUM(diScanner_no_reads), 0)
|
||||
), 2)
|
||||
END, '%'
|
||||
) AS `Total No Reads`
|
||||
FROM scanner_reads
|
||||
WHERE t_stamp BETWEEN :starttime AND :endtime
|
||||
AND (sScanner_Name = :scannername OR :scannername IS NULL OR :scannername = '')
|
||||
GROUP BY DATE(t_stamp), HOUR(t_stamp), sScanner_Name
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
CONCAT(DATE(t_stamp), ' ', HOUR(t_stamp), ':00') AS `Start Timestamp`,
|
||||
CONCAT('H', TIMESTAMPDIFF(HOUR, DATE_FORMAT(t_stamp, "%Y-%m-%d %H:00:00"), DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))) AS `Hour`,
|
||||
'S03aa' AS `Scanner Name`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 NOT IN (0, 8, 9, 10, 11, 15) THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2)
|
||||
END, '%'
|
||||
) AS `Total Bad Reads`,
|
||||
'0%' AS `Total Comm Faults`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 0 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2)
|
||||
END, '%'
|
||||
) AS `Total Good Reads`,
|
||||
'0%' AS `Total Multi Items`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 10 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2)
|
||||
END, '%'
|
||||
) AS `Total Multi Reads`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 9 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2)
|
||||
END, '%'
|
||||
) AS `Total No Data`,
|
||||
CONCAT(
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 8 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2)
|
||||
END, '%'
|
||||
) AS `Total No Reads`
|
||||
FROM item_data
|
||||
WHERE t_stamp BETWEEN :starttime AND :endtime
|
||||
AND adiSort_Code_0 NOT IN (11, 15)
|
||||
AND sLocation_ID LIKE 'S03%'
|
||||
AND (:scannername IS NULL OR :scannername = '' OR :scannername = 'S03aa')
|
||||
GROUP BY DATE(t_stamp), HOUR(t_stamp)
|
||||
ORDER BY `Start Timestamp` ASC;
|
||||
|
||||
|
After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"borderStyle": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,448 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"TAG0",
|
||||
"TAG1",
|
||||
"TAG2",
|
||||
"TAG3",
|
||||
"TAG4",
|
||||
"TAG5",
|
||||
"TAG6",
|
||||
"TAG7",
|
||||
"TAG8",
|
||||
"TAG9",
|
||||
"TAG10",
|
||||
"TAG11"
|
||||
]
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "DPM"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"con_lines": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
],
|
||||
"in": false,
|
||||
"out": false,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/DPM_TO_HUB"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL14_1_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.0256,
|
||||
"y": 0.0056
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.32",
|
||||
"tagProps": [
|
||||
"UL14_1_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL14_2_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.0715,
|
||||
"y": 0.0056
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.33",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL14_3_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.1148,
|
||||
"y": 0.0056
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.34",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL14_4_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.155,
|
||||
"y": 0.0074
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.35",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL14_5_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.1957,
|
||||
"y": 0.0047
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.36",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL15_1_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.2368,
|
||||
"y": 0.0074
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.37",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL15_2_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.2766,
|
||||
"y": 0.0064
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.38",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL15_3_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"rotate": {
|
||||
"anchor": "-607% 50%"
|
||||
},
|
||||
"width": 0.0349,
|
||||
"x": 0.3167,
|
||||
"y": 0.0064
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.39",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL15_5_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.3979,
|
||||
"y": 0.0064
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.41",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PS3_1_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.4386,
|
||||
"y": 0.0056
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.30",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DPM_label"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.0694,
|
||||
"width": 0.101,
|
||||
"x": 0.7498,
|
||||
"y": 0.6527
|
||||
},
|
||||
"props": {
|
||||
"text": "NCS1_1_DPM2",
|
||||
"textStyle": {
|
||||
"fontSize": "2vmin"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL15_4_SIO"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.1667,
|
||||
"width": 0.0349,
|
||||
"x": 0.3578,
|
||||
"y": 0.0064
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"IP": "11.200.1.40",
|
||||
"tagProps": [
|
||||
"/system/someting_SIO",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "autStand/Custom_Views/Enternet-Windows/Components/FIO_SIO"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"position": {
|
||||
"x": 0.6348,
|
||||
"y": -0.1546
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,516 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#C2C2C2"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FFA500"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#0008FF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#FFF700"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#87CEEB"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#90EE90"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "#964B00"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "#8B0000"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "#808080"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "#8B8000"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "#006400"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "#FFFFC5"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "#00008B"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "#FF7276"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "#556B2F"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "#B43434"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "#4682B4"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "#FFD700"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Closed"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Actuated"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Communication Faulted"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Conveyor Running In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Disabled"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Disconnected"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "Enabled Not Running"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "Encoder Fault"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "Energy Management"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "ESTOP Was Actuated"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "EStopped"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "EStopped Locally"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "Extended Faulted"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "Full"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "Gaylord Start Pressed"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "Jam Fault"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "Jammed"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "Loading Allowed"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "Loading Not Allowed"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "Low Air Pressure Fault Was Present"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 22,
|
||||
"output": "Conveyor Stopped In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 23,
|
||||
"output": "Motor Faulted"
|
||||
},
|
||||
{
|
||||
"input": 24,
|
||||
"output": "Motor Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 25,
|
||||
"output": "Normal"
|
||||
},
|
||||
{
|
||||
"input": 26,
|
||||
"output": "Off Inactive"
|
||||
},
|
||||
{
|
||||
"input": 27,
|
||||
"output": "Open"
|
||||
},
|
||||
{
|
||||
"input": 28,
|
||||
"output": "PLC Ready To Run"
|
||||
},
|
||||
{
|
||||
"input": 29,
|
||||
"output": "Package Release Pressed"
|
||||
},
|
||||
{
|
||||
"input": 30,
|
||||
"output": "Power Branch Was Faulted"
|
||||
},
|
||||
{
|
||||
"input": 31,
|
||||
"output": "Pressed"
|
||||
},
|
||||
{
|
||||
"input": 32,
|
||||
"output": "Ready To Receive"
|
||||
},
|
||||
{
|
||||
"input": 33,
|
||||
"output": "Running"
|
||||
},
|
||||
{
|
||||
"input": 34,
|
||||
"output": "Started"
|
||||
},
|
||||
{
|
||||
"input": 35,
|
||||
"output": "Stopped"
|
||||
},
|
||||
{
|
||||
"input": 36,
|
||||
"output": "System Started"
|
||||
},
|
||||
{
|
||||
"input": 37,
|
||||
"output": "Unknown"
|
||||
},
|
||||
{
|
||||
"input": 38,
|
||||
"output": "VFD Fault"
|
||||
},
|
||||
{
|
||||
"input": 39,
|
||||
"output": "Conveyor Running In Power Saving Mode"
|
||||
},
|
||||
{
|
||||
"input": 40,
|
||||
"output": "Conveyor Jogging In Maintenance Mode"
|
||||
},
|
||||
{
|
||||
"input": 41,
|
||||
"output": "VFD Reset Required"
|
||||
},
|
||||
{
|
||||
"input": 42,
|
||||
"output": "Jam Reset Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 43,
|
||||
"output": "Start Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 44,
|
||||
"output": "Stop Push Button Pressed"
|
||||
},
|
||||
{
|
||||
"input": 45,
|
||||
"output": "No Container"
|
||||
},
|
||||
{
|
||||
"input": 46,
|
||||
"output": "Ready To Be Enabled"
|
||||
},
|
||||
{
|
||||
"input": 47,
|
||||
"output": "Half Full"
|
||||
},
|
||||
{
|
||||
"input": 48,
|
||||
"output": "Enabled"
|
||||
},
|
||||
{
|
||||
"input": 49,
|
||||
"output": "Tipper Faulted"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 50,
|
||||
"width": 50
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "drawing"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.color"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"id": "defs1",
|
||||
"name": "defs1",
|
||||
"type": "defs"
|
||||
},
|
||||
{
|
||||
"fill": {},
|
||||
"height": "100%",
|
||||
"id": "rect1",
|
||||
"name": "rect1",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "0"
|
||||
},
|
||||
"type": "rect",
|
||||
"width": "100%",
|
||||
"x": 0,
|
||||
"y": "0"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"viewBox": "0 0 50 50"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\t#create devices and tags lists for the conveyor\n\tprops \u003d self.view.params.tagProps[0]\n\tautStand.devices.build_device_mapping(props)\n\tdevice_table_dataset \u003d autStand.devices.build_device_table(self)\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, props)\n\tsystem.perspective.openDock(\u0027Docked-East-Conv\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps, \"devices\": device_table_dataset, \"tags\":tags_table_dataset})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"borderStyle": "solid",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 7.0 KiB |
@ -1,24 +0,0 @@
|
||||
SELECT
|
||||
DATE_FORMAT(:starttime, '%Y-%m-%d %H:%i') AS StartTimestamp,
|
||||
DATE_FORMAT(:endtime, '%Y-%m-%d %H:%i') AS EndTimestamp,
|
||||
|
||||
-- Total is now the sum of Merge, Transport, and Sorter counts
|
||||
(COALESCE(c.MergeCount,0) + COALESCE(c.TransportCount,0) + COALESCE(c.SorterCount,0)) AS Total,
|
||||
|
||||
-- New individual metrics
|
||||
COALESCE(c.MergeCount,0) AS Merge_MCM01,
|
||||
COALESCE(c.TransportCount,0) AS Transport_MCM01,
|
||||
COALESCE(c.SorterCount,0) AS Sorter_MCM02
|
||||
|
||||
FROM (SELECT 1) AS p
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
-- New metric: Merge_MCM01
|
||||
SUM(Merge_MCM01 = 1) AS MergeCount,
|
||||
-- New metric: Transport_MCM01
|
||||
SUM(Transport_MCM01 = 1) AS TransportCount,
|
||||
-- Kept metric: Sorter_MCM02
|
||||
SUM(Sorter_MCM02 = 1) AS SorterCount
|
||||
FROM jam_area
|
||||
WHERE t_stamp BETWEEN :starttime AND :endtime
|
||||
) AS c ON 1=1;
|
||||
@ -0,0 +1,625 @@
|
||||
{
|
||||
"custom": {
|
||||
"PLCs": "{ \"MCM01 Fluid Inbound\": [ \"MCM01\" ], \"MCM02 Non Con Sorter\": [ \"MCM02\" ] }",
|
||||
"activityLogger": {
|
||||
"alt_pageid": "command_control",
|
||||
"start_time": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1758809934540
|
||||
],
|
||||
"$ts": 1758809934540
|
||||
}
|
||||
},
|
||||
"devices": {
|
||||
"MCM01": {
|
||||
"area": "Fluid Inbound",
|
||||
"name": "MCM01",
|
||||
"tagProps": [
|
||||
"MCM01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"MCM02": {
|
||||
"area": "Non Con Sorter",
|
||||
"name": "MCM02",
|
||||
"tagProps": [
|
||||
"MCM02",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"system": {
|
||||
"onShutdown": {
|
||||
"config": {
|
||||
"script": "\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onStartup": {
|
||||
"config": {
|
||||
"script": "\tself.custom.activityLogger.start_time \u003d system.date.now()"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"page_name": "Command and Control"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.PLCs": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews"
|
||||
},
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.activityLogger": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.activityLogger.pageid": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{page.props.path}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.devices": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.PLCs"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdevices \u003d system.util.jsonDecode(value)\n\tPLCs \u003d {}\n\tfc \u003d self.session.custom.fc\n\tconfig \u003d system.tag.readBlocking(\u0027[\u0027 + fc + \u0027_SCADA_TAG_PROVIDER]\u0027 + \u0027/Configuration/PLC\u0027)[0].value\n\t\n\tif devices:\n\t\tfor k, v in devices.items():\n\t\t\tdevice_list \u003d v\n\t\t\tfor i in device_list:\n\t\t\t\tdecode \u003d system.util.jsonDecode(config)\n\t\t\t\tif decode:\n\t\t\t\t\tarea \u003d decode[i][\"Area\"]\n\t\t\t\t\tsub_area \u003d decode[i][\"SubArea\"]\n\t\t\t\t\tarea_label \u003d str(area) + \"/\" + str(sub_area) if sub_area else str(area)\n\t\t\t\telse:\n\t\t\t\t\tarea \u003d \"\"\n\t\t\t\t\tarea_label \u003d \"\"\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tPLCs[i] \u003d {\u0027name\u0027:i,\u0027area\u0027:area_label,\u0027tagProps\u0027:[\n\t\t\t\t\t\t\t\t i,\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\",\n\t\t\t\t\t\t\t\t \"value\"\n\t\t\t\t\t\t\t\t ]}\n\t\n\treturn PLCs",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.page_name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Table"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.devices"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tresults \u003d []\n\tfor row, val in value.items():\n\t\tresults.append({\"plc\": val[\"name\"], \"area\": val[\"area\"],\"status\": {\"tagProps\":val[\"tagProps\"]},\"alarms\": {\"tagProps\":val[\"tagProps\"]},\"actions\": {\"tagProps\":val[\"tagProps\"]}})\n\t\n\tresults.sort(key\u003dlambda item: item[\u0027plc\u0027])\n\treturn results",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"cells": {
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 16,
|
||||
"paddingRight": 16
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "plc",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"classes": "",
|
||||
"color": "#4A4A4A",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 11,
|
||||
"paddingRight": 11
|
||||
},
|
||||
"title": "PLC"
|
||||
},
|
||||
"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": false,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 50
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "area",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"classes": "",
|
||||
"color": "#4A4A4A",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 11,
|
||||
"paddingRight": 11
|
||||
},
|
||||
"title": "Area"
|
||||
},
|
||||
"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": false,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 50
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "status",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"classes": "",
|
||||
"color": "#4A4A4A",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 11,
|
||||
"paddingRight": 11
|
||||
},
|
||||
"title": "Status"
|
||||
},
|
||||
"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": false,
|
||||
"sort": "none",
|
||||
"sortable": false,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "autStand/Equipment/Controller-Views/CommandControlStatus",
|
||||
"visible": true,
|
||||
"width": 75
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "alarms",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"classes": "",
|
||||
"color": "#4A4A4A",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 11,
|
||||
"paddingRight": 11
|
||||
},
|
||||
"title": "Active Alarms"
|
||||
},
|
||||
"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": false,
|
||||
"sort": "none",
|
||||
"sortable": false,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "autStand/Equipment/Controller-Views/CommandControlAlarms",
|
||||
"visible": true,
|
||||
"width": "auto"
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "actions",
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"classes": "",
|
||||
"color": "#4A4A4A",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 11,
|
||||
"paddingRight": 11
|
||||
},
|
||||
"title": "Controls"
|
||||
},
|
||||
"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": "view",
|
||||
"resizable": false,
|
||||
"sort": "none",
|
||||
"sortable": false,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": "",
|
||||
"textAlign": "center"
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "autStand/Equipment/Controller-Views/CommandControlActions",
|
||||
"visible": true,
|
||||
"width": "auto"
|
||||
}
|
||||
],
|
||||
"dragOrderable": false,
|
||||
"pager": {
|
||||
"activeOption": 50,
|
||||
"initialOption": 50
|
||||
},
|
||||
"rows": {
|
||||
"height": 44,
|
||||
"highlight": {
|
||||
"color": "#EEEEEE"
|
||||
},
|
||||
"striped": {
|
||||
"enabled": false
|
||||
},
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderColor": "#4A4A4A",
|
||||
"borderStyle": "none",
|
||||
"borderWidth": 1,
|
||||
"classes": "Fonts/BodyText14",
|
||||
"color": "#4A4A4A"
|
||||
}
|
||||
},
|
||||
"selection": {
|
||||
"enableRowSelection": false
|
||||
},
|
||||
"style": {
|
||||
"borderStyle": "none",
|
||||
"margin": 5,
|
||||
"overflow": "hidden",
|
||||
"overflowX": "hidden",
|
||||
"overflowY": "hidden"
|
||||
},
|
||||
"virtualized": false
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"Devices": [],
|
||||
"count": "value",
|
||||
"delay": 4000
|
||||
},
|
||||
"events": {
|
||||
"system": {
|
||||
"onShutdown": [
|
||||
{
|
||||
"config": {
|
||||
"script": "\tself.session.custom.command_auth.enabled \u003d False"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"config": {
|
||||
"script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--neutral-10)",
|
||||
"borderColor": "var(--info)",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "1px",
|
||||
"boxShadow": "none",
|
||||
"color": "var(--info)",
|
||||
"fontWeight": "normal",
|
||||
"margin": "5px",
|
||||
"textTransform": "uppercase",
|
||||
"fill": "var(--info)"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"animation": {
|
||||
"duration": "0.2s",
|
||||
"direction": "normal",
|
||||
"iterationCount": "1",
|
||||
"timingFunction": "ease",
|
||||
"keyframes": {
|
||||
"0%": {},
|
||||
"100%": {
|
||||
"backgroundColor": "var(--neutral-20)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,280 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Dataset": [
|
||||
{
|
||||
"path": "Symbol-Views/Device-Views/DeviceStatus"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Device-Views/DeviceStatus_old"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Device-Views/Estop"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/ARSAW"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/AUS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Camera"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/ControlCabinet"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Estop"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/GoodsLift"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/JAM"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Light_Curtain"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Main_Panel"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Network"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Pointer"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PressureSwitch"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord_End"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord_Line"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/RFID"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Robot"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SLAMs"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SafetyGate"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Stacker_Destacker"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/StatusNonPowered"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Status_NS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/THEA"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Test"
|
||||
}
|
||||
],
|
||||
"FilteredViews": [
|
||||
{
|
||||
"Name": "DeviceStatus",
|
||||
"Path": "Symbol-Views/Equipment-Views/DeviceStatus",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Button",
|
||||
"Path": "Symbol-Views/Equipment-Views/Button",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "ControlCabinet",
|
||||
"Path": "Symbol-Views/Equipment-Views/ControlCabinet",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Extendo",
|
||||
"Path": "Symbol-Views/Equipment-Views/Extendo",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "MCM",
|
||||
"Path": "Symbol-Views/Equipment-Views/MCM",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "SS_Button",
|
||||
"Path": "Symbol-Views/Equipment-Views/SS_Button",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "PullChord",
|
||||
"Path": "Symbol-Views/Equipment-Views/PullChord",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "PullChord_End",
|
||||
"Path": "Symbol-Views/Equipment-Views/PullChord_End",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "PullChord_Line",
|
||||
"Path": "Symbol-Views/Equipment-Views/PullChord_Line",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Status",
|
||||
"Path": "Symbol-Views/Equipment-Views/Status",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Chute",
|
||||
"Path": "Symbol-Views/Equipment-Views/Chute",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Carrier",
|
||||
"Path": "Symbol-Views/Equipment-Views/Carrier",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Tipper",
|
||||
"Path": "Symbol-Views/Equipment-Views/Tipper",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"SelectedValue": "",
|
||||
"key": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Dataset": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.FilteredViews": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.SelectedValue": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
},
|
||||
"params.key": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 650,
|
||||
"width": 1165
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ViewRepeater"
|
||||
},
|
||||
"position": {
|
||||
"basis": "1px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"bidirectional": true,
|
||||
"path": "view.params.FilteredViews"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"alignContent": "flex-start",
|
||||
"alignItems": "flex-start",
|
||||
"elementPosition": {
|
||||
"basis": "auto"
|
||||
},
|
||||
"elementStyle": {
|
||||
"classes": "Framework/Cards/Title"
|
||||
},
|
||||
"justify": "center",
|
||||
"path": "Symbol-Views/Symbol-Library-Views/Symbol",
|
||||
"style": {
|
||||
"gap": "20px",
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"wrap": "wrap"
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"justify": "space-evenly",
|
||||
"wrap": "wrap"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "transparent",
|
||||
"margin": "1px"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 58 KiB |
@ -0,0 +1,69 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"highlightTagPath": "value"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params.viewParams.highlightTagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.highlightTagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"controls": {
|
||||
"click": true,
|
||||
"in": true,
|
||||
"out": true,
|
||||
"pan": true,
|
||||
"reset": true,
|
||||
"zoom": true
|
||||
},
|
||||
"panning": true,
|
||||
"viewParams": {},
|
||||
"viewPath": "autStand/Detailed_Views/MCM-Views/MCM01"
|
||||
},
|
||||
"path": "autStand/Custom_Views/View-Scaler"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"position": {
|
||||
"x": 0.3594,
|
||||
"y": 0.2046
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent"
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
|
||||
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
|
||||
COUNT(*) AS Inducted,
|
||||
SUM(alltable.ACTUAL_DEST <> 'S03999') AS Sorted,
|
||||
SUM(alltable.DivertStatus = 7) AS DestinationInvalid,
|
||||
SUM(alltable.DivertStatus = 16) AS DestinationNone,
|
||||
SUM(alltable.DivertStatus = 12) AS DestinationDisabled,
|
||||
SUM(alltable.DivertStatus = 5) AS DestinationFull,
|
||||
SUM(alltable.DivertStatus = 2) AS Unexpected,
|
||||
SUM(alltable.DivertStatus = 6) AS DestinationFault,
|
||||
SUM(alltable.DivertStatus = 14) AS DivertFail,
|
||||
SUM(alltable.DivertStatus = 4) AS GapError,
|
||||
SUM(alltable.DivertStatus = 17) AS Lost,
|
||||
SUM(alltable.DivertStatus = 3) AS TrackingError,
|
||||
SUM(alltable.DivertStatus = 1) AS Unknown,
|
||||
SUM(alltable.DivertStatus = 21) AS Unsafe
|
||||
FROM alltable
|
||||
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
|
||||
GROUP BY hour(alltable.t_stamp)
|
||||
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 140 KiB |
@ -1,77 +0,0 @@
|
||||
SELECT
|
||||
CASE
|
||||
WHEN c.sActual_Dest_ID LIKE 'S03%' THEN 'S03'
|
||||
ELSE 'S03'
|
||||
END AS Sorter,
|
||||
DATE_FORMAT(:starttime, '%Y-%m-%d %H:%i') AS start_time,
|
||||
DATE_FORMAT(:endtime, '%Y-%m-%d %H:%i') AS end_time,
|
||||
COALESCE(c.sActual_Dest_ID, 'N/A') AS Lane,
|
||||
CONCAT(COALESCE(c.Success_pct, 0), '%') AS success_perc,
|
||||
CONCAT(COALESCE(c.Unknown_pct, 0), '%') AS unknown_perc,
|
||||
CONCAT(COALESCE(c.Unexpected_Container_pct, 0), '%') AS unexpected_container_perc,
|
||||
CONCAT(COALESCE(c.Tracking_Error_pct, 0), '%') AS tracking_error_perc,
|
||||
CONCAT(COALESCE(c.Gap_Error_pct, 0), '%') AS gap_error_perc,
|
||||
CONCAT(COALESCE(c.Destination_Full_pct, 0), '%') AS destination_full_perc,
|
||||
CONCAT(COALESCE(c.Destination_Non_Operational_pct, 0), '%') AS destination_non_operational_perc,
|
||||
CONCAT(COALESCE(c.Invalid_Destination_pct, 0), '%') AS invalid_destination_perc,
|
||||
CONCAT(COALESCE(c.Scanner_Error_pct, 0), '%') AS scan_error_perc,
|
||||
CONCAT(COALESCE(c.Destination_Disabled_pct, 0), '%') AS destination_disabled_perc,
|
||||
CONCAT(COALESCE(c.Throughput_Limit_pct, 0), '%') AS throughput_limit_perc,
|
||||
CONCAT(COALESCE(c.Failed_To_Divert_pct, 0), '%') AS failed_to_divert_perc,
|
||||
CONCAT(COALESCE(c.No_Destination_Received_pct, 0), '%') AS no_destination_received_perc,
|
||||
CONCAT(COALESCE(c.Lost_Container_pct, 0), '%') AS lost_container_perc,
|
||||
CONCAT(COALESCE(c.Dimension_Error_pct, 0), '%') AS dimension_error_perc,
|
||||
CONCAT(COALESCE(c.Weight_Error_pct, 0), '%') AS weight_error_perc,
|
||||
CONCAT(COALESCE(c.Container_Utilization_pct, 0), '%') AS container_utilization_perc,
|
||||
CONCAT(COALESCE(c.Unable_To_Divert_pct, 0), '%') AS unable_to_divert_perc,
|
||||
CONCAT(COALESCE(c.Destination_Not_Attempted_pct, 0), '%') AS destination_not_attempted_perc,
|
||||
COALESCE(c.total, 0) AS total
|
||||
FROM (SELECT 1) AS p
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
sActual_Dest_ID,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 0 THEN 1 ELSE 0 END) AS Success_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 1 THEN 1 ELSE 0 END) AS Unknown_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 2 THEN 1 ELSE 0 END) AS Unexpected_Container_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 3 THEN 1 ELSE 0 END) AS Tracking_Error_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 4 THEN 1 ELSE 0 END) AS Gap_Error_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 5 THEN 1 ELSE 0 END) AS Destination_Full_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 6 THEN 1 ELSE 0 END) AS Destination_Non_Operational_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 7 THEN 1 ELSE 0 END) AS Invalid_Destination_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 IN (8, 9, 10) THEN 1 ELSE 0 END) AS Scanner_Error_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 12 THEN 1 ELSE 0 END) AS Destination_Disabled_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 13 THEN 1 ELSE 0 END) AS Throughput_Limit_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 14 THEN 1 ELSE 0 END) AS Failed_To_Divert_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 16 THEN 1 ELSE 0 END) AS No_Destination_Received_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 17 THEN 1 ELSE 0 END) AS Lost_Container_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 18 THEN 1 ELSE 0 END) AS Dimension_Error_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 19 THEN 1 ELSE 0 END) AS Weight_Error_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 20 THEN 1 ELSE 0 END) AS Container_Utilization_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 21 THEN 1 ELSE 0 END) AS Unable_To_Divert_count,
|
||||
SUM(CASE WHEN adiSort_Code_0 = 22 THEN 1 ELSE 0 END) AS Destination_Not_Attempted_count,
|
||||
COUNT(*) AS total,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 0 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Success_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 1 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Unknown_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 2 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Unexpected_Container_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 3 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Tracking_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 4 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Gap_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 5 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Full_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 6 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Non_Operational_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 7 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Invalid_Destination_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 IN (8, 9, 10) THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Scanner_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 12 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Disabled_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 13 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Throughput_Limit_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 14 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Failed_To_Divert_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 16 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS No_Destination_Received_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 17 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Lost_Container_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 18 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Dimension_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 19 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Weight_Error_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 20 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Container_Utilization_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 21 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Unable_To_Divert_pct,
|
||||
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((SUM(CASE WHEN adiSort_Code_0 = 22 THEN 1 ELSE 0 END) * 100.0) / COUNT(*), 2) END AS Destination_Not_Attempted_pct
|
||||
FROM item_data
|
||||
WHERE t_stamp BETWEEN :starttime AND :endtime
|
||||
AND adiSort_Code_0 NOT IN (11, 15)
|
||||
GROUP BY sActual_Dest_ID
|
||||
) AS c ON 1=1;
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
|
||||
concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
|
||||
concat(round(COUNT(*)/COUNT(*) * 100,2),'%') AS Total,
|
||||
concat(round(SUM(SUBSTRING(alltable.ScanLabel,1,1) <> '?' AND
|
||||
SUBSTRING(alltable.ScanLabel,1,1) <> '9' AND
|
||||
SUBSTRING(alltable.ScanLabel,1,1) <> '0')/COUNT(*) * 100,2),'%') AS GoodRead,
|
||||
concat(round(SUM(SUBSTRING(alltable.ScanLabel,1,1) = '?')/COUNT(*) * 100,2),'%') AS NoRead,
|
||||
concat(round(SUM(SUBSTRING(alltable.ScanLabel,1,1) = '9')/COUNT(*) * 100,2),'%') AS MultiRead,
|
||||
concat(round(SUM(SUBSTRING(alltable.ScanLabel,1,1) = '0')/COUNT(*) * 100,2),'%') AS NoCode
|
||||
FROM alltable
|
||||
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
|
||||
GROUP BY hour(alltable.t_stamp)
|
||||
@ -1,200 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"state": {
|
||||
"$": [
|
||||
"ds",
|
||||
192,
|
||||
1766054596663
|
||||
],
|
||||
"$columns": [
|
||||
{
|
||||
"data": [
|
||||
"MCM01",
|
||||
"MCM01"
|
||||
],
|
||||
"name": "Location",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
"High",
|
||||
"Medium"
|
||||
],
|
||||
"name": "Priority",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"name": "Count",
|
||||
"type": "Integer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": ""
|
||||
},
|
||||
"params": {
|
||||
"value": {
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "[BNA8_SCADA_TAG_PROVIDER]System/Queries/Alarms/ActiveAlarmsByLocationAndPriority"
|
||||
},
|
||||
"type": "tag"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tMCM \u003d self.params.value.tagProps[0]\n\tqueryData \u003d currentValue.value\n\t\n\tif not queryData:\n\t self.custom.status \u003d \"\"\n\t\n\t# Define priority order from highest to lowest\n\tpriority_order \u003d [\"Critical\", \"High\", \"Medium\", \"Low\", \"Diagnostic\"]\n\texisting_priorities \u003d set()\n\tmyPriority \u003d \"\"\n\t\n\t# Populate the set\n\tfor row in range(queryData.rowCount):\n\t mcm_val \u003d queryData.getValueAt(row, 0)\n\t severity \u003d queryData.getValueAt(row, 1).capitalize()\n\t count \u003d queryData.getValueAt(row, 2)\n\t\n\t if mcm_val \u003d\u003d MCM and count \u003e 0:\n\t existing_priorities.add(severity)\n\t\n\t# Find the highest one that exists\n\tfor priority in priority_order:\n\t if priority in existing_priorities:\n\t myPriority \u003d priority\n\t break\n\t\n\tself.custom.status \u003d myPriority"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.status": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.value": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 50,
|
||||
"width": 300
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.navigate(self.view.params.value.tagProps[0])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "State-Styles/Background-Fill/State5",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "High",
|
||||
"output": "State-Styles/Background-Fill/State1"
|
||||
},
|
||||
{
|
||||
"input": "Medium",
|
||||
"output": "State-Styles/Background-Fill/State2"
|
||||
},
|
||||
{
|
||||
"input": "Low",
|
||||
"output": "State-Styles/Background-Fill/State3"
|
||||
},
|
||||
{
|
||||
"input": "Diagnostic",
|
||||
"output": "State-Styles/Background-Fill/State4"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.status"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "HEALTHY",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "Diagnostic",
|
||||
"output": "DIAGNOSTIC"
|
||||
},
|
||||
{
|
||||
"input": "Low",
|
||||
"output": "HALF WORKFLOW"
|
||||
},
|
||||
{
|
||||
"input": "Medium",
|
||||
"output": "CONTROLLED STOP"
|
||||
},
|
||||
{
|
||||
"input": "High",
|
||||
"output": "UNCONTROLLED STOP"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderColor": "#555555",
|
||||
"borderStyle": "none",
|
||||
"cursor": "pointer",
|
||||
"fontSize": 12,
|
||||
"marginBottom": 8,
|
||||
"marginTop": 8,
|
||||
"textAlign": "center"
|
||||
},
|
||||
"textStyle": {
|
||||
"fontSize": 12,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Error_message": "none"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Error_message": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 100,
|
||||
"width": 242
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"props": {
|
||||
"color": "#FFFFFF",
|
||||
"path": "material/error_outline",
|
||||
"style": {
|
||||
"backgroundColor": "#555555"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Error_message"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#000000"
|
||||
},
|
||||
"textStyle": {
|
||||
"color": "#FFFFFF",
|
||||
"fontWeight": "bold",
|
||||
"margin": 10,
|
||||
"textAlign": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"borderColor": "#FFFFFF",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "1px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Error"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Background-Styles/Controller"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--neutral-10)",
|
||||
"borderColor": "var(--success)",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "1px",
|
||||
"boxShadow": "none",
|
||||
"color": "var(--success)",
|
||||
"fontWeight": "normal",
|
||||
"margin": "5px",
|
||||
"textTransform": "uppercase",
|
||||
"fill": "var(--success)"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"animation": {
|
||||
"duration": "0.2s",
|
||||
"direction": "normal",
|
||||
"iterationCount": "1",
|
||||
"timingFunction": "ease",
|
||||
"keyframes": {
|
||||
"0%": {},
|
||||
"100%": {
|
||||
"backgroundColor": "var(--neutral-20)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--error)",
|
||||
"borderTopLeftRadius": "4px",
|
||||
"borderTopRightRadius": "4px",
|
||||
"borderBottomLeftRadius": "4px",
|
||||
"borderBottomRightRadius": "4px",
|
||||
"color": "var(--neutral-10)",
|
||||
"fontSize": "12px",
|
||||
"fontWeight": "bold",
|
||||
"lineHeight": "16px",
|
||||
"padding": "2px",
|
||||
"textAlign": "center"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.6 KiB |
@ -0,0 +1,17 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--error)",
|
||||
"borderTopLeftRadius": "4px",
|
||||
"borderTopRightRadius": "4px",
|
||||
"borderBottomLeftRadius": "4px",
|
||||
"borderBottomRightRadius": "4px",
|
||||
"color": "var(--neutral-10)",
|
||||
"fontSize": "12px",
|
||||
"fontWeight": "bold",
|
||||
"lineHeight": "16px",
|
||||
"padding": "2px",
|
||||
"textAlign": "center"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--neutral-10)",
|
||||
"borderColor": "var(--warning)",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "1px",
|
||||
"boxShadow": "none",
|
||||
"color": "var(--warning)",
|
||||
"fontWeight": "normal",
|
||||
"margin": "5px",
|
||||
"textTransform": "uppercase",
|
||||
"fill": "var(--warning)"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"animation": {
|
||||
"duration": "0.2s",
|
||||
"direction": "normal",
|
||||
"iterationCount": "1",
|
||||
"timingFunction": "ease",
|
||||
"keyframes": {
|
||||
"0%": {},
|
||||
"100%": {
|
||||
"backgroundColor": "var(--neutral-20)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 88 KiB |
@ -0,0 +1,939 @@
|
||||
{
|
||||
"custom": {
|
||||
"PLC_list": [
|
||||
"MCM01",
|
||||
"MCM02",
|
||||
"MCM03",
|
||||
"MCM04",
|
||||
"MCM05",
|
||||
"MCM06",
|
||||
"MCM07"
|
||||
],
|
||||
"color": "#C2C2C2",
|
||||
"running_state": -1,
|
||||
"type": "Enable",
|
||||
"views_data": []
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM06/Chute/NC/S02_203CH",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.PLC_list": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}",
|
||||
"type": "{view.custom.type}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{type}/Color"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#C2C2C2"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#FFA500"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#0008FF"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "#00FF00"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "#FFF700"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "#87CEEB"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "#90EE90"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "#964B00"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 10,
|
||||
"output": "#000000"
|
||||
},
|
||||
{
|
||||
"input": 11,
|
||||
"output": "#8B0000"
|
||||
},
|
||||
{
|
||||
"input": 12,
|
||||
"output": "#808080"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "#8B8000"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "#006400"
|
||||
},
|
||||
{
|
||||
"input": 15,
|
||||
"output": "#FFFFC5"
|
||||
},
|
||||
{
|
||||
"input": 16,
|
||||
"output": "#00008B"
|
||||
},
|
||||
{
|
||||
"input": 17,
|
||||
"output": "#FF7276"
|
||||
},
|
||||
{
|
||||
"input": 18,
|
||||
"output": "#556B2F"
|
||||
},
|
||||
{
|
||||
"input": 19,
|
||||
"output": "#B43434"
|
||||
},
|
||||
{
|
||||
"input": 20,
|
||||
"output": "#4682B4"
|
||||
},
|
||||
{
|
||||
"input": 21,
|
||||
"output": "#FFD700"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.type": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Chute_JR"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "GS"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "PR"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Start"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "JR"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Enable"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.views_data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"equipment_id": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 400
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "#FFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closeDock(\u0027Docked-East-BTN\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Icon",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
},
|
||||
"text": "Close faceplate"
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/close",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px",
|
||||
"display": false
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Labels/Label_1",
|
||||
"marginTop": 20
|
||||
},
|
||||
"text": "No Active Alarms"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "AlarmStatusTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.filters.active.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value[1:]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"columns": {
|
||||
"active": {
|
||||
"displayPath": {
|
||||
"enabled": false
|
||||
},
|
||||
"priority": {
|
||||
"enabled": false
|
||||
},
|
||||
"source": {
|
||||
"enabled": false
|
||||
},
|
||||
"state": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"active": {
|
||||
"priorities": {
|
||||
"critical": false,
|
||||
"high": false,
|
||||
"low": false,
|
||||
"medium": false
|
||||
},
|
||||
"states": {
|
||||
"clearUnacked": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"refreshRate": 500,
|
||||
"toolbar": {
|
||||
"enabled": false
|
||||
}
|
||||
},
|
||||
"type": "ia.display.alarmstatustable"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Active_tab"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "NAME"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " return value.rsplit(\u0027/\u0027, 1)[-1]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"paddingLeft": 20
|
||||
},
|
||||
"text": "BUTTON LIGHT"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "PB_Light"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50%",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.color"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt",
|
||||
"paddingLeft": 10
|
||||
},
|
||||
"textStyle": {
|
||||
"color": "#C2C2C2"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px",
|
||||
"shrink": 2
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Info_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"margin-left": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/JR_PB\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\n\ttag_path3 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB\"\n\tsystem.tag.writeBlocking([tag_path3],[True])\n\ttag_path4 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Enable_Chute_PB\"\n\tsystem.tag.writeBlocking([tag_path4],[True])"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.enabled": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.image.icon.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.type"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "Start",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.image.icon.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.type"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "PR",
|
||||
"output": "material/not_started"
|
||||
},
|
||||
{
|
||||
"input": "Start",
|
||||
"output": "material/not_started"
|
||||
},
|
||||
{
|
||||
"input": "JR",
|
||||
"output": "material/sync_problem"
|
||||
},
|
||||
{
|
||||
"input": "GS",
|
||||
"output": "material/not_started"
|
||||
},
|
||||
{
|
||||
"input": "Chute_JR",
|
||||
"output": "material/sync_problem"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.color"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.type"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "UNKNOWN",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "PR",
|
||||
"output": "ENABLE"
|
||||
},
|
||||
{
|
||||
"input": "Start",
|
||||
"output": "START"
|
||||
},
|
||||
{
|
||||
"input": "JR",
|
||||
"output": "JAM RESET"
|
||||
},
|
||||
{
|
||||
"input": "GS",
|
||||
"output": "GAYLORD START"
|
||||
},
|
||||
{
|
||||
"input": "Chute_JR",
|
||||
"output": "CHUTE JAM RESET"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.textStyle.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.type"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "Start",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"icon": {}
|
||||
},
|
||||
"style": {
|
||||
"classes": "Background-Styles/Controller"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Reset Jam"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel",
|
||||
"padding": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"gap": 6,
|
||||
"paddingBottom": 20,
|
||||
"paddingLeft": 10,
|
||||
"paddingRight": 10,
|
||||
"paddingTop": 13
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Commands_tab"
|
||||
},
|
||||
"position": {
|
||||
"tabIndex": 2
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"paddingTop": 1
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "tabs"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.tabs": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.type"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d \"PR\" or value \u003d\u003d \"Enable\":\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
},
|
||||
"tabStyle": {
|
||||
"active": {
|
||||
"classes": "",
|
||||
"color": "#FFFFFF",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
},
|
||||
"inactive": {
|
||||
"classes": "",
|
||||
"color": "#B8B8B8",
|
||||
"fontFamily": "Arial",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "bold",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "670px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"border-top": "1px solid white",
|
||||
"gap": ""
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Buttons/Button-Menu"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -1,322 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"beacon": false,
|
||||
"flashingColor": "#808080",
|
||||
"solidColor": "#FF8C00",
|
||||
"state": "Offline"
|
||||
},
|
||||
"params": {
|
||||
"demoColor": false,
|
||||
"tagProps": [
|
||||
"System/MCM02/Beacon/NCS1_1_BCN1_A",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.beacon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Beacon"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.demoColor})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.flashingColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.beacon"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tif value \u003d\u003d 0:\n\t\treturn \"#808080\" # Normal OFF\n\t\n\treturn self.custom.solidColor # Normal ON\n",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.solidColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value}, \"S\")\r\n",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"code": "\treturn value[-1]",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"fallback": "#808080",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "R",
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": "G",
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": "B",
|
||||
"output": "#0000FF"
|
||||
},
|
||||
{
|
||||
"input": "A",
|
||||
"output": "#FF8C00"
|
||||
},
|
||||
{
|
||||
"input": "H",
|
||||
"output": "#FFFFFF"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
},
|
||||
"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},-1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "Offline",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "OFF"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "SOLID"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "FLASHING"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.demoColor": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 20
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "BCN"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.flashingColor"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value[-1]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"fill": {},
|
||||
"height": "47.417244",
|
||||
"id": "beaconSquare",
|
||||
"name": "beaconSquare",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "2.36887"
|
||||
},
|
||||
"type": "rect",
|
||||
"width": "47.337795",
|
||||
"x": "1.450278",
|
||||
"y": "1.3708278"
|
||||
},
|
||||
{
|
||||
"fill": {
|
||||
"paint": "#000"
|
||||
},
|
||||
"fontSize": "29.5834px",
|
||||
"id": "beaconLabel",
|
||||
"name": "beaconLabel",
|
||||
"stroke": {
|
||||
"width": "1.64352"
|
||||
},
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": "30px",
|
||||
"textAnchor": "middle"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 26.11241,
|
||||
"y": 35.09856
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 50 50"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\t#create tags lists for the device\n\tsystem.perspective.closeDock(\"Docked-East-Conv\")\n\tprops \u003d self.view.params.tagProps\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, props[0])\n\tsystem.perspective.openDock(\u0027Docked-East-Device\u0027,params\u003d{\u0027tagProps\u0027:props, \"tags\":tags_table_dataset, \"name\":\"\"} )"
|
||||
},
|
||||
"preventDefault": true,
|
||||
"scope": "G",
|
||||
"stopPropagation": true,
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"draggable": false,
|
||||
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
||||
"modal": false,
|
||||
"overlayDismiss": false,
|
||||
"position": {
|
||||
"relativeLocation": "top-right"
|
||||
},
|
||||
"positionType": "relative",
|
||||
"resizable": false,
|
||||
"showCloseIcon": false,
|
||||
"type": "open",
|
||||
"viewParams": {
|
||||
"text": "{/root.meta.tooltip.text}"
|
||||
},
|
||||
"viewPath": "autStand/Custom_Views/Tooltip",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
},
|
||||
"onMouseLeave": {
|
||||
"config": {
|
||||
"draggable": true,
|
||||
"id": "LZ5nPg42{view.params.tagProps[0]}",
|
||||
"modal": false,
|
||||
"overlayDismiss": false,
|
||||
"resizable": true,
|
||||
"showCloseIcon": true,
|
||||
"type": "close",
|
||||
"viewPath": "autStand/Custom_Views/Tooltip",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.state} !\u003d \"Offline\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_beacons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"overflow": "visible",
|
||||
"userSelect": "None"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"color": "#8E8E8E",
|
||||
"fontSize": "12px",
|
||||
"fontWeight": "300",
|
||||
"lineHeight": "16px",
|
||||
"marginRight": "10px",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@ -1,36 +0,0 @@
|
||||
{
|
||||
"base": {
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(245,245,245,1) 0%, rgba(235,235,235,1) 70%, rgba(208,208,208,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"textTransform": "uppercase"
|
||||
}
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pseudo": "hover",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(0deg, rgba(245,245,245,1) 0%, rgba(235,235,235,1) 70%, rgba(208,208,208,1) 100%);",
|
||||
"borderColor": "#000",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#000",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pseudo": "disabled",
|
||||
"style": {
|
||||
"backgroundImage": "linear-gradient(180deg, rgba(208,208,208,1) 0%, rgba(208,208,208,1) 100%);",
|
||||
"borderColor": "#555",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": "2px",
|
||||
"color": "#555555",
|
||||
"cursor": "not-allowed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,50 @@
|
||||
SELECT
|
||||
base.Total_Jam,
|
||||
base.Inbound_jam,
|
||||
base.Sorter_jam,
|
||||
base.Startstamp,
|
||||
base.Endtstamp,
|
||||
1 AS Total_perc,
|
||||
base.Inbound_jam / NULLIF(base.Total_Jam,0) AS Inbound_perc,
|
||||
base.Sorter_jam / NULLIF(base.Total_Jam,0) AS Sorter_perc
|
||||
FROM (
|
||||
SELECT
|
||||
MIN(a.eventtime) AS Startstamp,
|
||||
MAX(COALESCE(c.eventtime, a.eventtime)) AS Endtstamp,
|
||||
SUM(a.category = 'Inbound_jam') AS Inbound_jam,
|
||||
SUM(a.category = 'Sorter_jam') AS Sorter_jam,
|
||||
SUM(a.category IN ('Inbound_jam','Sorter_jam')) AS Total_Jam
|
||||
FROM (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.eventtime,
|
||||
ae.eventid,
|
||||
ae.displaypath AS device,
|
||||
m.category
|
||||
FROM alarm_events ae
|
||||
JOIN (
|
||||
SELECT 'UL15_1_TPE1' AS device, 'Inbound_jam' AS category UNION ALL
|
||||
SELECT 'UL14_1_TPE1', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_1_TPE1', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_1_TPE2', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_1_TPE3', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_2_TPE1', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_4_TPE1', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_8_TPE1', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_10_TPE1', 'Inbound_jam' UNION ALL
|
||||
SELECT 'PS3_12_TPE1', 'Sorter_jam'
|
||||
) AS m
|
||||
ON ae.displaypath = m.device
|
||||
WHERE ae.eventtype = 0
|
||||
AND ae.eventtime BETWEEN :starttime AND :endtime
|
||||
AND ae.displaypath NOT LIKE '%System Startup%'
|
||||
AND ae.source NOT LIKE '%System Startup%'
|
||||
) AS a
|
||||
LEFT JOIN (
|
||||
SELECT eventid, MIN(eventtime) AS eventtime
|
||||
FROM alarm_events
|
||||
WHERE eventtype = 1
|
||||
GROUP BY eventid
|
||||
) AS c
|
||||
ON a.eventid = c.eventid
|
||||
) AS base;
|
||||
|
After Width: | Height: | Size: 145 KiB |
@ -1,495 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Status": "",
|
||||
"tagProps": [
|
||||
"MCM02",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Status": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 212,
|
||||
"width": 336
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.MCM"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"textIndent": "10px"
|
||||
},
|
||||
"textStyle": {
|
||||
"textIndent": "10px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "JAM",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"text": "Jams"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "24px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"path": "autStand/Equipment/JAM",
|
||||
"style": {
|
||||
"marginRight": "5px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "10px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.totalJams"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginRight": "20px",
|
||||
"overflow": "visible",
|
||||
"textAlign": "end"
|
||||
},
|
||||
"textStyle": {
|
||||
"textAlign": "end"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "60px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#555555"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12,
|
||||
"marginLeft": 10
|
||||
},
|
||||
"text": "AREA",
|
||||
"textStyle": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "195px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.area_display"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontSize": 12,
|
||||
"marginLeft": 50
|
||||
},
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomColor": "#555555",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": 0.5,
|
||||
"borderLeftColor": "#555555",
|
||||
"borderLeftStyle": "none",
|
||||
"borderLeftWidth": 0.5,
|
||||
"borderRightColor": "#555555",
|
||||
"borderRightStyle": "none",
|
||||
"borderRightWidth": 0.5,
|
||||
"borderTopColor": "#555555",
|
||||
"borderTopStyle": "solid",
|
||||
"borderTopWidth": 0.5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12,
|
||||
"marginLeft": 10
|
||||
},
|
||||
"text": "STATUS",
|
||||
"textStyle": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params.value.tagProps[0]": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"value": {
|
||||
"tagProps": [
|
||||
null,
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": "autStand/Equipment/Controller-Views/CommandControlStatus"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-around",
|
||||
"style": {
|
||||
"borderBottomColor": "#555555",
|
||||
"borderBottomStyle": "solid",
|
||||
"borderBottomWidth": 0.5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "25px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.counts"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"color": "#FFF9F9",
|
||||
"path": "material/notifications_active",
|
||||
"style": {
|
||||
"classes": "",
|
||||
"marginLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12,
|
||||
"marginLeft": 10
|
||||
},
|
||||
"text": "ACTIVE ALARMS",
|
||||
"textStyle": {
|
||||
"fontFamily": "Roboto",
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_3"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params.value.tagProps[0]": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagProps[0]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"classes": "Text-Styles/Ariel-Bold-White-12pt",
|
||||
"value": {
|
||||
"tagProps": [
|
||||
null,
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": "autStand/Equipment/Controller-Views/CommandControlAlarms"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "80px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 10,
|
||||
"marginRight": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\n\tpage \u003d self.view.params.tagProps[0]\n\t\n\tsystem.perspective.navigate(\"/\"+ page)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.MCM": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.area_display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "jsonGet({this.custom.plc_dict}, \"Area\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.plc_dict": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "jsonGet({value}, {view.params.tagProps[0]})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.totalJams": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "[BNA8_SCADA_TAG_PROVIDER]System/Queries/Alarms/ActiveAlarmsTable"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# value is a dataset returned from your SQL query\n\tfrom java.util import HashSet\n\t\n\tunique_devices \u003d HashSet()\n\t\n\t# iterate rows\n\tfor rowIndex in range(value.getRowCount()):\n\t device \u003d value.getValueAt(rowIndex, \"Description\")\n\t tag \u003d value.getValueAt(rowIndex, \"Tag\")\n\t location \u003d value.getValueAt(rowIndex, \"Location\")\n\t\n\t # match for TPE devices that are jammed and match MCM area\n\t if (\n\t device\n\t and tag\n\t and \"TPE\" in str(device)\n\t and \"Jammed\" in str(tag)\n\t and str(location) \u003d\u003d str(self.custom.MCM)\n\t ):\n\t unique_devices.add(device)\n\t\n\t# return total unique jammed device count\n\treturn unique_devices.size()",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.covert} \u003d False \u0026\u0026 {this.custom.status} \u003d 5, False, True)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"animationFillMode": "both",
|
||||
"borderBottomLeftRadius": 10,
|
||||
"borderBottomRightRadius": 10,
|
||||
"borderColor": "#555555",
|
||||
"borderStyle": "solid",
|
||||
"borderTopLeftRadius": 10,
|
||||
"borderTopRightRadius": 10,
|
||||
"borderWidth": 1,
|
||||
"box-shadow": "5px 5px 5px grey",
|
||||
"classes": "Background-Styles/Controller",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
def handleTagHighlight(view, currentValue):
|
||||
tag_priority = currentValue.value
|
||||
|
||||
if tag_priority == None:
|
||||
return
|
||||
|
||||
parts = str(tag_priority).split("||")
|
||||
tag = parts[0]
|
||||
|
||||
splitedTag = tag.split("/")
|
||||
|
||||
deviceName = splitedTag[-1]
|
||||
|
||||
Docked_East_Map = {
|
||||
"VFD" : "Docked-East-VFD",
|
||||
"MCM" : "Docked-East-MCM"
|
||||
}
|
||||
|
||||
Docked_East_View = Docked_East_Map["VFD"]
|
||||
|
||||
if "PE" in deviceName:
|
||||
tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1"
|
||||
|
||||
if "MCM" in deviceName:
|
||||
Docked_East_View = Docked_East_Map["MCM"]
|
||||
|
||||
components = view.rootContainer.getChildren()
|
||||
|
||||
priority = parts[1]
|
||||
|
||||
foundMatch = False
|
||||
|
||||
# clear all highlights and apply new one when found
|
||||
for child in components:
|
||||
params = child.props.get("params", {})
|
||||
tagProps = params.get("tagProps", {})
|
||||
tagsList = list(tagProps)
|
||||
|
||||
if len(tagsList) == 0:
|
||||
continue
|
||||
|
||||
child.props.style.classes = ""
|
||||
|
||||
tagPath = tagsList[0]
|
||||
|
||||
if tag == tagPath:
|
||||
child.props.style["classes"] = "Highlight/Pulse-" + priority
|
||||
system.perspective.openDock(Docked_East_View, params={'tagProps': tagProps})
|
||||
foundMatch = True
|
||||
|
||||
return foundMatch
|
||||
@ -0,0 +1,908 @@
|
||||
{
|
||||
"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": 5,
|
||||
"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",
|
||||
"visible": false
|
||||
},
|
||||
"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,519 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": true,
|
||||
"display_icon": true,
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "No Active Alarms",
|
||||
"running": false,
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Off(Inactive)"
|
||||
},
|
||||
"params": {
|
||||
"angle": 0,
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"System/MCM01/Conveyor/UL1_3_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, True,\r\n\t\t1, True,\r\n\t\t2, {session.custom.alarm_filter.show_running},\r\n\t\t3, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t4, True,\r\n\t\t5, True,\r\n\t\t6, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t7, True,\r\n\t\t8, True,\r\n\t\t9, True,\r\n\t\t13, True,\r\n\t\t14, True,\r\n\t\t61, True,\r\n 131, True,\t\r\n\t\tFalse )",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode} \u003e 0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 61,
|
||||
"output": 4
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "No Active Alarms"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 6,
|
||||
"output": "Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 7,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 8,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 9,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 13,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 14,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 61,
|
||||
"output": "Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 131,
|
||||
"output": "Medium"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.state} \u003d 1"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n0, \"Off(Inactive)\",\r\n1, \"Enabled, Not Running\",\r\n2, \"Running\",\r\n3, \"Energy Management\",\r\n4, \"Jammed\",\r\n5, \"Full\",\r\n6, \"Maintenance Mode / Conveyor Stopped In Maintenance Mode\",\r\n7, \"Communication Fault\",\r\n8, \"VFD Fault\",\r\n9, \"E-Stop\",\r\n13,\"Encoder_Fault\",\r\n14,\"Stopped\",\r\n61,\"Conveyor Running In Maintenance Mode\",\r\n131, \"Disconnected\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.angle": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.directionLeft": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 29
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 61, 131,\r\n \"#c2c2c2\", \"#c9fcc0\", \"#00ff11\", \"#00ffd0\", \"#ff8c00\",\r\n \"#0008ff\", \"#946446\", \"#ff0000\", \"#ff0000\", \"#ff0000\", \"#ff8c00\", \"#c2c2c2\", \"#B45C5C\", \"#c2c2c2\",\r\n \"#fff700\"\r\n )\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.transform": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},\"\")",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scaleX(-1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 30 30 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-1.5 -1.5 73 63"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left",
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string} + \", State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "solid"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "none"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"borderColor": "#FF0000",
|
||||
"borderStyle": "none",
|
||||
"borderWidth": "2px",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 47 KiB |
@ -0,0 +1,32 @@
|
||||
def build_row(**kwargs):
|
||||
"""
|
||||
Args:
|
||||
Any number of arguments using kwargs key = value format.
|
||||
Key StyleClass is used for adding formatting to the row.
|
||||
StyleClass = {classes:value}
|
||||
Returns:
|
||||
A python dict with style formatting for perspective tables..
|
||||
|
||||
Raises:
|
||||
KeyError: Raises an exception.
|
||||
"""
|
||||
row = {}
|
||||
column ={}
|
||||
for key,value in kwargs.items():
|
||||
if key != "StyleClass":
|
||||
column[key]={"value":value}
|
||||
row["value"]=column
|
||||
style_class = kwargs.get("StyleClass")
|
||||
row["style"] = style_class
|
||||
return row
|
||||
|
||||
def build_row_with_view(**kwargs):
|
||||
row = {}
|
||||
column ={}
|
||||
for key,value in kwargs.items():
|
||||
if key != "StyleClass":
|
||||
column[key]= value
|
||||
row["value"]=column
|
||||
style_class = kwargs.get("StyleClass")
|
||||
row["style"] = style_class
|
||||
return row
|
||||
@ -0,0 +1,207 @@
|
||||
{
|
||||
"custom": {
|
||||
"state": 0,
|
||||
"string": "Inactive"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"/system/mcm01/test",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"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": "Actuated"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Faulted"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Inactive"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 22,
|
||||
"width": 25
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"props": {
|
||||
"text": "SOL",
|
||||
"textStyle": {
|
||||
"fontSize": 10,
|
||||
"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_solenoids"
|
||||
},
|
||||
"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,447 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"",
|
||||
"",
|
||||
"PLC",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 148,
|
||||
"width": 362
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "20px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"text": "NAME"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "205px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.name"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Name"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "20px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"text": "PRIORITY"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Priority"
|
||||
},
|
||||
"position": {
|
||||
"basis": "205px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{/root.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/Critical"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.priority"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Critical"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Medium"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Low"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Warning"
|
||||
},
|
||||
{
|
||||
"input": 5,
|
||||
"output": "No active alarms"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"textAlign": "left"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Priority"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "20px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"text": "TIMESTAMP"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "DeviceName"
|
||||
},
|
||||
"position": {
|
||||
"basis": "205px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.timestamp"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "EventTime"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "20px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "NameField"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"text": "DURATION"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "91px"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Spacer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "199px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "/root.custom.duration"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "Text-Styles/Ariel-Bold-12pt"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "EventTime_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "40px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PopUp-Styles/InfoLabel"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"delay": 2000,
|
||||
"duration": "",
|
||||
"enable": true,
|
||||
"name": "",
|
||||
"priority": "",
|
||||
"timestamp": ""
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.active_bit": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.IsActive"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.shelved_bit": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.IsShelved"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.update": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "now({this.custom.delay})"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tif self.custom.enable:\n\t\t\n\t\timport time\n\t\t\n\t\tdef convert(millis):\n\t\t\tmillis \u003d int(millis)\n\t\t\tseconds\u003d(millis/1000)%60\n\t\t\tseconds \u003d int(seconds)\n\t\t\tminutes\u003d(millis/(1000*60))%60\n\t\t\tminutes \u003d int(minutes)\n\t\t\thours\u003d(millis/(1000*60*60))\n\t\t\treturn(\"%d:%d:%d\" % (hours, minutes, seconds))\n\t\t\n\t\tdef update_custom_properties(name, timestamp, duration, priority):\n\t\t\tself.custom.name \u003d name\n\t\t\tself.custom.timestamp \u003d timestamp\n\t\t\tself.custom.duration \u003d duration\n\t\t\tself.custom.priority \u003d priority\n\t\t\n\t\tdef get_alarms():\n\t\t\talarm_dict \u003d system.tag.readBlocking(\"System/ActiveAlarms\")\n\t\t\talarms_decoded \u003d system.util.jsonDecode(alarm_dict[0].value)\n\t\t\treturn alarms_decoded\n\t\t\t\n\t\tdef get_tag_config():\n\t\t\tname \u003d\"\"\n\t\t\tpath \u003d self.view.params.tagProps[0]\n\t\t\tif system.tag.exists(path) and path !\u003d \"\":\n\t\t\t\ttag_config \u003d system.tag.getConfiguration(path)[0]\n\t\t\t\talarms \u003d tag_config.get(\"alarms\")\n\t\t\t\tfor alarm in alarms:\n\t\t\t\t\tif alarm.get(\"name\") \u003d\u003d self.view.params.tagProps[1]:\n\t\t\t\t\t\tname \u003d alarm.get(\"AdditionalInfo\")\n\t\t\t\t\t\tbreak\n\t\t\t\ttimestamp \u003d \"N/A\"\n\t\t\t\tduration \u003d \"N/A\"\n\t\t\t\tpriority \u003d 5\n\t\t\t\tupdate_custom_properties(name, timestamp, duration, priority)\n\t\t\t\t\t\n\t\tdef get_active_alarm():\n\t\t\ttagPath \u003d self.view.params.tagProps[0]\n\t\t\tprops_alarm_name \u003d str(self.view.params.tagProps[1])\n\t\t\ttag_display_path \u003d tagPath + \"/\" + props_alarm_name\n\t\t\talarms \u003d get_alarms()\n\t\t\tfor i in alarms:\n\t\t\t\tdisplaypath \u003d alarms[i].get(\"DisplayPath\")\n\t\t\t\talarm_name \u003d alarms[i].get(\"Name\")\n\t\t\t\tsystem.perspective.print(displaypath)\n\t\t\t\tif tag_display_path \u003d\u003d displaypath:\n\t\t\t\t\tname \u003d alarms[i].get(\"AddInfo\")\n\t\t\t\t\ttimestamp \u003d alarms[i].get(\"TimeStamp\")\n\t\t\t\t\tduration \u003d alarms[i].get(\"Duration\")\n\t\t\t\t\tduration \u003d convert(duration)\n\t\t\t\t\tpriority \u003d alarms[i].get(\"Priority\")\n\t\t\t\t\tupdate_custom_properties(name, timestamp, duration, priority)\n\t\t\t\t\tbreak\n\t\t\t\t\t\n\t\tif self.custom.active_bit and not self.custom.shelved_bit:\n\t\t\tget_active_alarm()\n\t\t\t\n\t\telse:\n\t\t\talarms \u003d get_tag_config()"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"borderRadius": "10x",
|
||||
"borderStyle": "solid",
|
||||
"classes": "PopUp-Styles/Information-Device"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 94 KiB |