Compare commits

..

No commits in common. "171aaca0265ee0f12ed444aaff92055bb70d1e36" and "da357ae0521b2464b4919a4835b9ecc4f2f864ca" have entirely different histories.

868 changed files with 49820 additions and 750993 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

View File

@ -1,55 +0,0 @@
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1,515 +0,0 @@
{
"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"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,976 +0,0 @@
{
"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"
}
}

View File

@ -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,
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)

View File

@ -1,516 +0,0 @@
{
"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"
}
}

View File

@ -1,625 +0,0 @@
{
"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"
}
}

View File

@ -1,280 +0,0 @@
{
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,69 +0,0 @@
{
"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"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,12 +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,
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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

@ -1,939 +0,0 @@
{
"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"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,50 +0,0 @@
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;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View File

@ -1,5 +1,6 @@
{
"custom": {
"FillColour": "value",
"alarm_message": null,
"covert_mode": true,
"disconnected": false,
@ -9,13 +10,15 @@
"plc": "value",
"priority": 0,
"priority_string": "No active alarms",
"running": false,
"running_status": 0,
"searchId": "value",
"show_error": false,
"show_running": true,
"state": 5,
"state_string": "Unknown"
},
"params": {
"directionLeft": false,
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
@ -32,6 +35,9 @@
]
},
"propConfig": {
"custom.FillColour": {
"persistent": true
},
"custom.alarm_message": {
"persistent": true
},
@ -42,7 +48,7 @@
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
"type": "expression"
}
],
@ -163,6 +169,15 @@
},
"persistent": true
},
"custom.running": {
"binding": {
"config": {
"expression": "{view.custom.running_status} \u003d 3"
},
"type": "expr"
},
"persistent": true
},
"custom.running_status": {
"binding": {
"config": {
@ -193,6 +208,36 @@
},
"persistent": true
},
"custom.show_error": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.show_running": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
"type": "expression"
}
],
"type": "property"
},
"persistent": true
},
"custom.state": {
"binding": {
"config": {
@ -251,10 +296,6 @@
},
"persistent": true
},
"params.directionLeft": {
"paramDirection": "input",
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
@ -270,15 +311,15 @@
},
"props": {
"defaultSize": {
"height": 25,
"width": 25
"height": 100,
"width": 100
}
},
"root": {
"children": [
{
"meta": {
"name": "PressureSwitch_2"
"name": "PPI"
},
"position": {
"height": 1,
@ -369,138 +410,104 @@
"props": {
"elements": [
{
"elements": [
{
"elements": [
{
"id": "stop1507",
"name": "stop1507",
"offset": "0",
"stopColor": "#020101",
"stopOpacity": "1",
"style": {
"stopColor": "#020101",
"stopOpacity": "1"
},
"type": "stop"
}
],
"id": "linearGradient1509",
"name": "linearGradient1509",
"type": "linearGradient"
},
{
"gradientTransform": "matrix(1.0156665,0,0,0.98457489,-0.22712617,-0.22017344)",
"gradientUnits": "userSpaceOnUse",
"href": "#linearGradient1509",
"id": "linearGradient3055",
"name": "linearGradient3055",
"type": "linearGradient",
"x1": "2.4719212",
"x2": "5.6080947",
"y1": "4.8826461",
"y2": "4.8826461"
}
],
"id": "defs2",
"name": "defs2",
"id": "defs1",
"name": "defs1",
"type": "defs"
},
{
"elements": [
{
"fill": {
"opacity": 1
},
"height": "11.216189",
"id": "rect5779",
"name": "rect5779",
"cx": "6.6145835",
"cy": "6.6145835",
"fill": {},
"id": "path1",
"name": "path1",
"r": "6.019948",
"stroke": {
"dasharray": "none",
"linejoin": "round",
"paint": "#000000",
"width": 1.2
"width": "0.264583"
},
"style": {
"paintOrder": "stroke fill markers"
},
"type": "rect",
"width": "11.21619",
"x": "7.7715612e-16",
"y": "0"
"type": "circle"
},
{
"elements": [
{
"fill": {
"opacity": "1",
"url": "url(#linearGradient3055)"
},
"id": "tspan1453",
"name": "tspan1453",
"stroke": {
"dasharray": "none",
"width": "0.116835"
},
"text": "P",
"type": "tspan",
"x": "0.99078566",
"y": "9.0214157"
}
],
"d": "m 2.1166666,8.5242134 h 3.175",
"fill": {
"opacity": "1",
"url": "url(#linearGradient3055)"
"paint": "transparent"
},
"id": "text1455",
"name": "text1455",
"id": "path2",
"name": "path2",
"stroke": {
"dasharray": "none",
"linejoin": "round",
"paint": "#000000",
"width": "0.116835"
"width": "0.264583"
},
"style": {
"InkscapeFontSpecification": "\u0027Arial Narrow, Normal\u0027",
"fontFamily": "\u0027Arial Narrow\u0027",
"fontSize": "9.7785px",
"paintOrder": "stroke fill markers"
},
"text": "P",
"transform": "scale(0.98457515,1.0156665)",
"type": "text",
"x": "0.99078566",
"y": "9.0214157"
"type": "path"
},
{
"d": "M 7.1327097,2.9635882 9.9122555,5.8103519 6.9937326,8.2419488",
"d": "M 7.9374999,8.5242134 H 11.112492",
"fill": {
"opacity": "0.0131332",
"paint": "#020101"
"paint": "transparent"
},
"id": "path3213",
"name": "path3213",
"id": "path3",
"name": "path3",
"stroke": {
"dasharray": "none",
"linejoin": "round",
"paint": "#000000",
"width": "0.663625"
"width": "0.264583"
},
"style": {
"paintOrder": "stroke fill markers"
"type": "path"
},
{
"d": "M 5.1593748,4.183724 V 8.4170573",
"fill": {
"paint": "transparent"
},
"id": "path5",
"name": "path5",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
},
{
"d": "m 8.2020833,4.1405926 h -3.175",
"fill": {
"paint": "transparent"
},
"id": "path6",
"name": "path6",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
},
{
"d": "M 8.0697914,4.183724 V 8.4170573",
"fill": {
"paint": "transparent"
},
"id": "path7",
"name": "path7",
"stroke": {
"dasharray": "none",
"paint": "#000000",
"width": "0.264583"
},
"type": "path"
}
],
"id": "layer1",
"name": "layer1",
"transform": "translate(0.22362278,0.22362278)",
"type": "group"
}
],
"preserveAspectRatio": "none",
"style": {},
"viewBox": "0 0 11.663437 11.663435"
"viewBox": "0 0 13.229166 13.229167"
},
"type": "ia.shapes.svg"
}
@ -638,6 +645,7 @@
}
},
"props": {
"aspectRatio": "1:1",
"mode": "percent",
"style": {
"cursor": "pointer"

View File

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

View File

@ -1,76 +0,0 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 24,
"width": 24
}
},
"root": {
"children": [
{
"meta": {
"name": "troubleshoot_white_24dp"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"elements": [
{
"elements": [
{
"fill": {
"paint": "transparent"
},
"height": "24",
"name": "rect",
"type": "rect",
"width": "24"
}
],
"name": "group",
"type": "group"
},
{
"elements": [
{
"elements": [
{
"d": "M22,20.59l-4.69-4.69C18.37,14.55,19,12.85,19,11c0-4.42-3.58-8-8-8c-4.08,0-7.44,3.05-7.93,7h2.02C5.57,7.17,8.03,5,11,5 c3.31,0,6,2.69,6,6s-2.69,6-6,6c-2.42,0-4.5-1.44-5.45-3.5H3.4C4.45,16.69,7.46,19,11,19c1.85,0,3.55-0.63,4.9-1.69L20.59,22 L22,20.59z",
"name": "path",
"type": "path"
},
{
"name": "polygon",
"points": "8.43,9.69 9.65,15 11.29,15 12.55,11.22 13.5,13.5 15.5,13.5 15.5,12 14.5,12 13.25,9 11.71,9 10.59,12.37 9.35,7 7.7,7 6.45,11 1,11 1,12.5 7.55,12.5",
"type": "polygon"
}
],
"name": "group",
"type": "group"
}
],
"name": "group",
"type": "group"
}
],
"fill": {
"paint": "#FFFFFF"
},
"viewBox": "0 0 24 24"
},
"type": "ia.shapes.svg"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

View File

@ -1,883 +0,0 @@
{
"custom": {
"FilteredViews": [
{
"Path": "autStand/Equipment/Button",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/Camera",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Chute",
"Path": "autStand/Equipment/Conveyor",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/Conveyor",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Conveyor",
"Path": "autStand/Equipment/Conveyor45",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Conveyor",
"Path": "autStand/Equipment/Conveyor_Left90",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Conveyor",
"Path": "autStand/Equipment/Conveyor_Right90",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/DPM",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/EPC",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/Encoder",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/MCM",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Tracking Photoeye",
"Path": "autStand/Equipment/Photoeye_Tracking",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Long Range Photoeye",
"Path": "autStand/Equipment/Photoeye_Long",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Chute Photoeye",
"Path": "autStand/Equipment/Photoeye_Chute",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Proximity Switch",
"Path": "autStand/Equipment/ProxSensor",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Start/Stop Button",
"Path": "autStand/Equipment/SS_Button",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/IO_Block",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/Solenoid",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/VFD",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Beacon_G",
"Path": "autStand/Equipment/Beacon",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Beacon_A",
"Path": "autStand/Equipment/Beacon",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Beacon_R",
"Path": "autStand/Equipment/Beacon",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Beacon_B",
"Path": "autStand/Equipment/Beacon",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Name": "Beacon_H",
"Path": "autStand/Equipment/Beacon",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
},
{
"Path": "autStand/Equipment/Scanner",
"instancePosition": {},
"instanceStyle": {
"classes": ""
}
}
]
},
"events": {
"system": {
"onStartup": {
"config": {
"script": "\tproject_info \u003d system.perspective.getProjectInfo()\n\tviews \u003d project_info.get(\u0027views\u0027,[])\n\tfilter_criterion \u003d \"Symbol-Views\"\n\tfilter_criterion2 \u003d \"Symbol-Library-Views\"\n\tfilter_criterion3 \u003d \"Controller-Views\"\n\tfilter_criterion4 \u003d \"Device-Views\"\n\tfiltered_views \u003d [\n\t\tview for view in views \n\t\t\t\n\t\tif filter_criterion in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion2 in view.get(\u0027path\u0027,\u0027\u0027) \n\t\tand not filter_criterion3 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\tand not filter_criterion4 in view.get(\u0027path\u0027,\u0027\u0027)\n\t\t]\n\tjson_structure \u003d []\n\tfor view in filtered_views:\n\t\t\n\t\tif \u0027Test\u0027 not in view[\u0027path\u0027]:\n\t\t\tinstance \u003d {\n\t\t\t\t\"instanceStyle\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t},\n\t\t\t\t\"instancePosition\": {},\n\t\t\t\t\"Path\": view.get(\u0027path\u0027,\u0027\u0027),\n\t\t\t\t\"forceRunning\":3,\n\t\t\t\t\"forceFault\": None,\n\t\t\t\t\"has_state\":True\n\t\t\t}\n\t\t\tjson_structure.append(instance)\n\t\t\n\tjson_result \u003d system.util.jsonEncode(json_structure)\n\tself.params.Dataset \u003d filtered_views\n\tself.params.FilteredViews \u003d json_structure\n\tself.session.custom.alarm_filter.show_running \u003d True\n\tself.session.custom.alarm_filter.show_safety \u003d True\n\tself.session.custom.alarm_filter.show_diagnostic \u003d True\n\tself.session.custom.alarm_filter.show_gateways \u003d True\n\tself.session.custom.alarm_filter.show_low_alarm \u003d True\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"params": {
"Dataset": [],
"FilteredViews": []
},
"propConfig": {
"custom.FilteredViews": {
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 309,
"width": 378
},
"theme": "dark"
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Table"
},
"propConfig": {
"props.data[11].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state5"
},
"type": "property"
}
},
"props.data[11].Color.style.color": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) "
},
"type": "expr"
}
},
"props.data[12].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state4"
},
"type": "property"
}
},
"props.data[13].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state3"
},
"type": "property"
}
},
"props.data[14].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state2"
},
"type": "property"
}
},
"props.data[15].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state1"
},
"type": "property"
}
},
"props.data[1].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state0"
},
"type": "property"
}
},
"props.data[3].Color.style.backgroundColor": {
"binding": {
"config": {
"path": "session.custom.colours.state5"
},
"type": "property"
}
},
"props.data[3].Color.style.color": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired}\u003d true, \u0027#000000\u0027,\u0027#FFFFFF\u0027) "
},
"type": "expr"
}
}
},
"props": {
"cells": {
"style": {
"paddingLeft": 5
}
},
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Color",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": false,
"number": {
"condition": "",
"value": ""
},
"string": {
"condition": "",
"value": ""
},
"visible": "on-hover"
},
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "center",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"nullFormat": {
"includeNullStrings": false,
"nullFormatValue": "",
"strict": false
},
"number": "value",
"numberFormat": "0,0.##",
"progressBar": {
"bar": {
"color": "",
"style": {
"classes": ""
}
},
"max": 100,
"min": 0,
"track": {
"color": "",
"style": {
"classes": ""
}
},
"value": {
"enabled": true,
"format": "0,0.##",
"justify": "center",
"style": {
"classes": ""
}
}
},
"render": "auto",
"resizable": true,
"sort": "none",
"sortable": false,
"strictWidth": true,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 85
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Description",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": false,
"number": {
"condition": "",
"value": ""
},
"string": {
"condition": "",
"value": ""
},
"visible": "on-hover"
},
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "center",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"nullFormat": {
"includeNullStrings": false,
"nullFormatValue": "",
"strict": false
},
"number": "value",
"numberFormat": "0,0.##",
"progressBar": {
"bar": {
"color": "",
"style": {
"classes": ""
}
},
"max": 100,
"min": 0,
"track": {
"color": "",
"style": {
"classes": ""
}
},
"value": {
"enabled": true,
"format": "0,0.##",
"justify": "center",
"style": {
"classes": ""
}
}
},
"render": "auto",
"resizable": true,
"sort": "none",
"sortable": false,
"strictWidth": false,
"style": {
"borderLeftStyle": "solid",
"borderLeftWidth": 1,
"borderRightStyle": "solid",
"borderRightWidth": 1,
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 100
}
],
"data": [
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "",
"borderBottomStyle": "solid",
"borderBottomWidth": 1,
"borderLeftStyle": "hidden",
"borderRightStyle": "hidden",
"classes": "",
"font-weight": "bold"
},
"value": "State"
},
"Description": {
"align": "center",
"editable": false,
"justify": "left",
"style": {
"backgroundColor": "",
"borderBottomStyle": "solid",
"borderBottomWidth": 1,
"borderLeftStyle": "hidden",
"classes": "some-class",
"font-weight": "bold"
},
"value": "Description"
}
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"classes": "",
"color": "#000000"
},
"value": "Stopped"
},
"Description": "MHE is Stopped/Disabled\n"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#c9fcc0",
"classes": "",
"color": "#000000"
},
"value": "Enabled"
},
"Description": "MHE is Enabled (Not Running)"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"value": "Running"
},
"Description": "MHE is Running"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#00ffd0",
"classes": "",
"color": "#000000"
},
"value": "Power Saving"
},
"Description": "MHE is in Power Saving Mode"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#ff8c00",
"classes": "",
"color": "#000000"
},
"value": "Jammed"
},
"Description": "MHE is Jammed"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#0008ff",
"classes": "",
"color": "#FFFFFF"
},
"value": "Full"
},
"Description": "MHE is Full"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#946446",
"classes": "",
"color": "#FFFFFF"
},
"value": "Maint Mode"
},
"Description": "MHE is in Maintenance Mode"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#B45C5C",
"classes": "",
"color": "#FFFFFF"
},
"value": "Maint Running Mode"
},
"Description": "MHE Running in Maintenance Mode"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "#ff0000",
"classes": "",
"color": "#FFFFFF"
},
"value": "Estop / Faulted\n"
},
"Description": "MHE is Estopped / Faulted\n"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"backgroundColor": "",
"borderBottomStyle": "solid",
"borderBottomWidth": 1,
"borderLeftStyle": "hidden",
"borderRightStyle": "hidden",
"borderTopStyle": "solid",
"borderTopWidth": 1,
"classes": "",
"font-weight": "bold"
},
"value": "Priority"
},
"Description": {
"align": "center",
"editable": false,
"justify": "left",
"style": {
"backgroundColor": "",
"borderBottomStyle": "solid",
"borderBottomWidth": 1,
"borderLeftStyle": "hidden",
"borderTopStyle": "solid",
"borderTopWidth": 1,
"classes": "",
"font-weight": "bold"
},
"value": "Description"
}
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"value": "Healthy"
},
"Description": "Healthy, no active alarms"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"classes": "",
"color": "#000000"
},
"value": "Diagnostic"
},
"Description": "Diagnostic Information"
},
{
"Color": {
"align": "center",
"borderLeftColor": "white",
"justify": "left",
"style": {
"classes": "",
"color": "#000000"
},
"value": "Low"
},
"Description": "Running at reduced capacity",
"Status": "Low"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"value": "Medium"
},
"Description": "Controlled Stop"
},
{
"Color": {
"align": "center",
"justify": "left",
"style": {
"classes": "some-class"
},
"value": "High"
},
"Description": "Uncontrolled Stop"
}
],
"dragOrderable": false,
"enableHeader": false,
"headerStyle": {
"backgroundColor": "#2B2B2B",
"color": "#FFFFFF",
"textIndent": "0px"
},
"pager": {
"bottom": false
},
"rows": {
"highlight": {
"color": "#FFFFFF",
"enabled": false
},
"style": {
"classes": "Background-Styles/Controller"
}
},
"selection": {
"enableRowSelection": false,
"style": {
"fontWeight": "bold"
}
}
},
"type": "ia.display.table"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"basis": "320px"
},
"propConfig": {
"props.params.FilteredViews": {
"binding": {
"config": {
"path": "view.custom.FilteredViews"
},
"type": "property"
}
}
},
"props": {
"path": "autStand/PopUp-Views/Legend_Popup/Legend-table"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "FlexContainer_6"
},
"position": {
"basis": "800px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"tabIndex": 1
},
"props": {
"direction": "column",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "TabContainer"
},
"position": {
"basis": "1377px"
},
"propConfig": {
"props.currentTabIndex": {
"onChange": {
"enabled": null,
"script": "\tif currentValue.value \u003d\u003d 2:\n\t\tsystem.perspective.closePopup(\"TZyBcXB7\")\n\t\tsystem.perspective.openPopup(\n\t\t id\u003d\"DOO\", \n\t\t view\u003d\"autStand/PopUp-Views/Legend_Popup/Legend-DOO\", \n\t\t title\u003d\"Description of Operations - Amazon BNA8\",\n\t\t modal\u003dTrue,\n\t\t draggable\u003dFalse,\n\t\t resizable\u003dFalse,\n\t\t showCloseIcon\u003dTrue,\n\t\t)"
}
},
"props.tabs[0]": {
"binding": {
"config": {
"expression": "if({session.custom.colours.colour_impaired}\u003dTrue, \u0027Alt Color\u0027, \u0027Color\u0027)"
},
"type": "expr"
}
}
},
"props": {
"menuStyle": {
"fontWeight": "bold"
},
"style": {
"classes": "Background-Styles/Controller"
},
"tabs": [
null,
"Icons",
"DOO"
]
},
"type": "ia.container.tab"
}
],
"events": {
"system": {
"onStartup": {
"config": {
"script": "\tself.getChild(\"TabContainer\").props.currentTabIndex \u003d 0"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#3B3B3B",
"opacity": 1
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,887 +0,0 @@
{
"custom": {
"dpm1-dpm2": true,
"dpm2-dpm3": true,
"dpm3-dpm4": true,
"dpm4-dpm5": true,
"dpm5-dpm6": true,
"dpm6-mcm": true,
"mcm-dpm1": true
},
"params": {
"tagProps": [
"System/MCM04/Rack",
"System/MCM04/IO_BLOCK/DPM/VS1A_DPM1",
"System/MCM04/IO_BLOCK/DPM/VS1A_DPM2",
"System/MCM04/IO_BLOCK/DPM/VS1A_DPM3",
"System/MCM04/IO_BLOCK/DPM/VS1A_DPM4",
"System/MCM04/IO_BLOCK/DPM/VS1A_DPM5",
"System/MCM04/IO_BLOCK/DPM/VS1C_DPM2"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-dpm3": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm3-dpm4": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"3": "{view.params.tagProps[3]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{3}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm4-dpm5": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"4": "{view.params.tagProps[4]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{4}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm5-dpm6": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"5": "{view.params.tagProps[5]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{5}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm6-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"6": "{view.params.tagProps[6]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{6}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Communication_Faulted"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},false)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.6666,
"y": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "VS1A_DPM1"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM04/VS1A_DPM1"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "VS1A_DPM2"
},
"position": {
"height": 0.3333,
"width": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": true,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM04/VS1A_DPM2"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "VS1A_DPM3"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"y": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM04/VS1A_DPM3"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "VS1A_DPM4"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"y": 0.6666
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM04/VS1A_DPM4"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "VS1A_DPM5"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333,
"y": 0.6666
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM04/VS1A_DPM5"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "VS1C_DPM2"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333,
"y": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": true,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM04/VS1C_DPM2"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.07
},
"props": {
"text": "VS1A_DPM1 11.200.1.2",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.065,
"y": 0.3121
},
"props": {
"text": "VS1A_DPM2 11.200.1.3",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.4
},
"props": {
"text": "VS1A_DPM3 11.200.1.4",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.75
},
"props": {
"text": "VS1A_DPM4 11.200.1.5",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM5_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.75
},
"props": {
"text": "VS1A_DPM5 11.200.1.6",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM6_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.4
},
"props": {
"text": "VS1C_DPM2 11.200.1.7",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.6666
},
"propConfig": {
"props.params.On": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"LD": false,
"LR": false,
"LRD": true,
"LRU": false,
"LU": false,
"RD": false,
"RLD": false,
"RLU": false,
"RU": false
},
"path": "Windows/Tabs/Enternet Windows/Components/CommLines"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

View File

@ -1,7 +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 Total_count
FROM alltable
WHERE alltable.t_stamp BETWEEN :starttime AND :endtime
GROUP BY date(alltable.t_stamp), hour(alltable.t_stamp)

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,71 +0,0 @@
SELECT
a.id AS ID,
a.eventtime AS StartTimestamp,
clr.eventtime AS EndTimestamp,
-- Duration calculation (HH:MM:SS format)
CONCAT(
LPAD(FLOOR(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(clr.eventtime, NOW())) / 3600), 2, '0'), ':',
LPAD(FLOOR((TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(clr.eventtime, NOW())) % 3600) / 60), 2, '0'), ':',
LPAD( (TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(clr.eventtime, NOW())) % 60) , 2, '0')
) AS Duration,
-- Description combining display path and alarm name
CONCAT(REPLACE(a.displaypath, '_', '-'), ' ', SUBSTRING_INDEX(a.source, ':/alm:', -1)) AS Description,
-- Priority mapping
CASE a.priority
WHEN 0 THEN 'Diagnostic'
WHEN 1 THEN 'Low'
WHEN 2 THEN 'Medium'
WHEN 3 THEN 'High'
WHEN 4 THEN 'Critical'
ELSE 'Unknown'
END AS Priority,
-- Tag information
CONCAT(a.displaypath, '.HMI.Alarm.', SUBSTRING_INDEX(aed.strValue, '/', -1)) AS Tag,
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location,
aed.strValue AS FullTag,
a.displaypath AS Device
FROM alarm_events a
-- Join to get the earliest clear event for each alarm
LEFT JOIN (
SELECT eventid, MIN(eventtime) AS eventtime
FROM alarm_events
WHERE eventtype = 1
GROUP BY eventid
) AS clr ON clr.eventid = a.eventid
-- Join to get additional tag data
LEFT JOIN (
SELECT id, strValue
FROM alarm_event_data
WHERE propname = 'myTag'
GROUP BY id
) AS aed ON aed.id = a.id
WHERE
-- Only active alarm events (not clear events)
a.eventtype = 0
-- Exclude system startup alarms
AND a.displaypath NOT LIKE '%System Startup%'
AND a.source NOT LIKE '%System Startup%'
-- Simple date filtering using named parameters
AND (
-- Case 1: Alarm was cleared within the specified time range
(clr.eventtime IS NOT NULL AND clr.eventtime >= :starttime AND clr.eventtime < :endtime)
OR
-- Case 2: Alarm is still active (no clear time) and started within or before the range
(clr.eventtime IS NULL AND a.eventtime < :endtime)
)
-- Order by end time (most recent clears first), active alarms (NULL) at top, then by ID
ORDER BY clr.eventtime IS NULL DESC, clr.eventtime DESC, a.id DESC
-- Pagination support (100 records per page)
LIMIT 100 OFFSET :offset;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

View File

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

View File

@ -1,99 +0,0 @@
import os, json, sys
global_project_page_ids = {}
def get_project_config():
"""
Scan each view.json under Detailed_Views (no recursion),
go one level deeper (coordinateContainer), extract tagProps[0]
from children, and store as {source_id: view_folder_name}.
"""
global global_project_page_ids
global_project_page_ids.clear()
try:
project_name = system.util.getProjectName()
base_path = (
os.getcwd().replace("\\", "/")
+ "/data/projects/"
+ project_name
+ "/com.inductiveautomation.perspective/Views/autStand/Detailed_Views"
)
if not os.path.exists(base_path):
system.perspective.print("Path not found: " + base_path)
return {}
for view_folder in os.listdir(base_path):
json_file = os.path.join(base_path, view_folder, "view.json")
if not os.path.isfile(json_file):
continue
with open(json_file, "r") as fh:
view_json = json.load(fh)
# go one level deeper: root -> children[0] (coordinateContainer) -> its children
root_children = (view_json.get("root") or {}).get("children") or []
if not root_children:
continue
# assume first child is the coordinateContainer
container = root_children[0]
children = container.get("children") or []
# now loop through these children to get tagProps
for child in children:
props = child.get("props") or {}
params = props.get("params") or {}
tag_props = params.get("tagProps")
if isinstance(tag_props, list) and len(tag_props) > 0:
source_id = str(tag_props[0])
global_project_page_ids[source_id] = view_folder
system.perspective.print("Found: {} -> {}".format(source_id, view_folder))
except:
whid = system.tag.readBlocking("Configuration/FC")[0].value
logger = system.util.getLogger("%s-get_project_config" % whid)
exc_type, exc_obj, tb = sys.exc_info()
logger.error("Error at line %s: %s" % (tb.tb_lineno, exc_obj))
return global_project_page_ids
def navigate_to_url(self, source_id, page_id):
url_to_navigate = "autStand/Detailed_Views/%s" % (page_id)
system.perspective.navigate(view=url_to_navigate, params={"highlightTagPath": source_id + "||Diagnostic"})
def source_id_lookup(self, source_id):
"""
Finds page_id from global_project_page_ids by source_id or by hierarchy,
then navigates.
"""
if not source_id:
return
page_id = global_project_page_ids.get(source_id)
found = False
if page_id:
found = True
navigate_to_url(self, source_id, page_id)
else:
# Walk hierarchy upwards until we find a match
items = source_id.split("/")
while len(items) > 1:
items.pop()
source_id = "/".join(items)
page_id = global_project_page_ids.get(source_id)
if page_id:
found = True
navigate_to_url(self, source_id, page_id)
break
if not found:
open_pop_up("No page id found")

View File

@ -1,552 +0,0 @@
{
"custom": {
"color": "#C2C2C2",
"priority": "No Active Alarms",
"state": "Closed"
},
"params": {
"tagProps": [
"System/MCM02/Photoeyes/TPE/PS3_12_TPE1",
"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": 25,
"width": 55
}
},
"root": {
"children": [
{
"meta": {
"name": "arrow_icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].fill.paint": {
"binding": {
"config": {
"path": "view.custom.color"
},
"type": "property"
}
},
"props.elements[3].fill.paint": {
"binding": {
"config": {
"path": "view.custom.color"
},
"type": "property"
}
}
},
"props": {
"elements": [
{
"id": "defs1",
"name": "defs1",
"type": "defs"
},
{
"d": "M 21.343364,12.531563 2.1710548,22.117718 V 2.9454084 Z",
"fill": {},
"id": "path1",
"name": "path1",
"stroke": {
"paint": "#000000",
"width": "1.91723"
},
"type": "path"
},
{
"id": "line1",
"name": "line1",
"stroke": {
"dasharray": "2, 2",
"paint": "#000000",
"width": "2.25291"
},
"type": "line",
"x1": "22.528276",
"x2": "62.238979",
"y1": "12.531563",
"y2": "12.531563"
},
{
"fill": {},
"height": "19.17231",
"id": "rect1",
"name": "rect1",
"stroke": {
"paint": "#000000",
"width": "1.91723"
},
"type": "rect",
"width": "5.7516928",
"x": "62.519203",
"y": "3.1996493"
}
],
"viewBox": "0 0 70 25"
},
"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})"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true
}
},
"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"
}
},
"meta.visible": {
"binding": {
"config": {
"path": "session.custom.alarm_filter.show_photoeyes"
},
"type": "property"
}
}
},
"props": {
"mode": "percent",
"style": {
"cursor": "pointer",
"userSelect": "none"
}
},
"type": "ia.container.coord"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

View File

@ -1,183 +0,0 @@
{
"custom": {
"customName": ""
},
"params": {
"Name": "",
"Path": ""
},
"propConfig": {
"custom.customName": {
"binding": {
"config": {
"path": "view.params.Path"
},
"transforms": [
{
"code": "\tstring \u003d value \n\tparts \u003d string.split(\"/\")\n\td \u003d parts[-1]\n\treturn d",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"params.Name": {
"paramDirection": "inout",
"persistent": true
},
"params.Path": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 44,
"width": 357
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"basis": "35px",
"grow": 1
},
"propConfig": {
"props.params.tagProps[0]": {
"binding": {
"config": {
"path": "view.params.Name"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"path": "view.params.Path"
},
"type": "property"
}
}
},
"props": {
"params": {
"tagProps": [
null,
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"style": {
"overflow": "hidden",
"pointerEvents": "none"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "100px",
"shrink": 0
},
"props": {
"style": {
"overflow": "hidden",
"paddingLeft": 5
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "50px",
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "if({view.params.Name} !\u003d\"\", {view.params.Name}, {view.custom.customName})"
},
"type": "expr"
}
}
},
"props": {
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"style": {
"paddingLeft": 5
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "45px",
"shrink": 0
},
"props": {
"style": {
"backgroundColor": "#3B3B3B",
"borderColor": "#CAC3C3",
"borderStyle": "solid",
"borderWidth": 1,
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
}

View File

@ -1,52 +0,0 @@
Select
SorterName,inducted_count,sorted_count,destinv_count,destfull_count,unexpected_count,destfault_count,destfault_count,divfail_count,gaperr_count,
lost_count, trackerr_count, unknownn_count, unsafe_count,destdis_count, destnone_count, Startstamp,Endtstamp,
inducted_count/inducted_count as inducted_perc,
sorted_count/inducted_count as sorted_perc,
destinv_count/inducted_count as destinv_perc,
destfull_count/inducted_count as destfull_perc,
unexpected_count/inducted_count as unexpected_perc,
destfault_count/inducted_count as destfault_perc,
divfail_count/inducted_count as divfail_perc,
gaperr_count/inducted_count as gaperr_perc,
lost_count/inducted_count as lost_perc,
trackerr_count/inducted_count as trackerr_perc,
unknownn_count/inducted_count as unknown_perc,
unsafe_count/inducted_count as unsafe_perc,
destdis_count/inducted_count as destdis_perc,
destnone_count/inducted_count as destnone_perc,
inducted_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as inducted_rate,
sorted_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as sorted_rate,
destinv_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as destinv_rate,
destfull_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as destfull_rate,
unexpected_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as unexpected_rate,
destfault_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as destfault_rate,
divfail_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as divfail_rate,
gaperr_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as gaperr_rate,
lost_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as lost_rate,
trackerr_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as trackerr_rate,
unknownn_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as unknown_rate,
unsafe_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as unsafe_rate,
destdis_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as destdis_rate,
destnone_count*3600/TIMESTAMPDIFF(second, Startstamp, Endtstamp) as destnone_rate
FROM
(SELECT
'S03' as SorterName,
COUNT(*) AS inducted_count,
SUM(alltable.ACTUAL_DEST <> 'S03999') AS sorted_count,
SUM(alltable.DivertStatus = 7) AS destinv_count,
SUM(alltable.DivertStatus = 5) AS destfull_count,
SUM(alltable.DivertStatus = 2) AS unexpected_count,
SUM(alltable.DivertStatus = 6) AS destfault_count,
SUM(alltable.DivertStatus = 14) AS divfail_count,
SUM(alltable.DivertStatus = 4) AS gaperr_count,
SUM(alltable.DivertStatus = 17) AS lost_count,
SUM(alltable.DivertStatus = 3) AS trackerr_count,
SUM(alltable.DivertStatus = 1) AS unknownn_count,
SUM(alltable.DivertStatus = 21) AS unsafe_count,
SUM(alltable.DivertStatus = 12) AS destdis_count,
SUM(alltable.DivertStatus = 16) AS destnone_count,
MIN(alltable.t_stamp) AS Startstamp,
Max(alltable.t_stamp) AS Endtstamp
FROM alltable
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)) basa

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,67 +0,0 @@
SELECT
Active.id AS ID,
Active.eventtime AS StartTimestamp,
Clear.eventtime AS EndTimestamp,
CONCAT(
LPAD(FLOOR(Active.duration_seconds / 3600), 2, '0'), ':',
LPAD(FLOOR((Active.duration_seconds % 3600) / 60), 2, '0'), ':',
LPAD(Active.duration_seconds % 60, 2, '0')
) AS Duration,
CONCAT(Active.displaypath, ' - ', SUBSTRING_INDEX(Active.source, ':/alm:', -1)) AS Description,
CASE Active.priority
WHEN 0 THEN 'Diagnostic'
WHEN 1 THEN 'Low'
WHEN 2 THEN 'Medium'
WHEN 3 THEN 'High'
WHEN 4 THEN 'Critical'
ELSE 'Unknown'
END AS Priority,
CONCAT(
Active.displaypath,
'.HMI.',
SUBSTRING_INDEX(aed.strValue, '/', -1)
) AS Tag,
SUBSTRING_INDEX(SUBSTRING_INDEX(aed.strValue, '/', 2), '/', -1) AS Location, aed.strValue AS FullTag,
Active.displaypath AS Device
FROM (
SELECT
ae.id,
ae.eventtime,
ae.eventid,
ae.source,
ae.priority,
ae.displaypath,
TIMESTAMPDIFF(SECOND, ae.eventtime, COALESCE(ae_clear.eventtime, NOW())) AS duration_seconds
FROM alarm_events ae
LEFT JOIN alarm_events ae_clear
ON ae.eventid = ae_clear.eventid
AND ae_clear.eventtype = 1
WHERE ae.eventtype = 0
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
GROUP BY ae.id
) AS Active
LEFT JOIN (
SELECT eventid, MIN(eventtime) AS eventtime
FROM alarm_events
WHERE eventtype = 1
GROUP BY eventid
) AS Clear
ON Active.eventid = Clear.eventid
LEFT JOIN (
SELECT aed.id, aed.strValue
FROM alarm_event_data aed
WHERE aed.propname = 'myTag'
GROUP BY aed.id
) AS aed
ON aed.id = Active.id
ORDER BY Active.eventtime DESC;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -1,33 +0,0 @@
SELECT
SUBSTRING_INDEX(SUBSTRING_INDEX(strValue, '/', 2), '/', -1) AS Location,
CASE priority
WHEN 0 THEN 'Diagnostic'
WHEN 1 THEN 'Low'
WHEN 2 THEN 'Medium'
WHEN 3 THEN 'High'
WHEN 4 THEN 'Critical'
ELSE 'Unknown'
END AS Priority,
COUNT(*) AS Count
FROM (
SELECT
ae.id,
ae.eventid,
ae.priority,
aed.strValue
FROM alarm_events ae
LEFT JOIN alarm_event_data aed
ON ae.id = aed.id
AND aed.propname = 'myTag'
WHERE ae.eventtype = 0
AND NOT EXISTS (
SELECT 1
FROM alarm_events ae_clear
WHERE ae_clear.eventid = ae.eventid
AND ae_clear.eventtype = 1
)
AND ae.displaypath NOT LIKE '%System Startup%'
AND ae.source NOT LIKE '%System Startup%'
) AS Active
GROUP BY Location, Priority
ORDER BY Location, Priority;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@ -1,792 +0,0 @@
{
"custom": {
"activityLogger": {
"alt_pageid": "help",
"start_time": {
"$": [
"ts",
192,
1758446563578
],
"$ts": 1758446563517
}
}
},
"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": {},
"propConfig": {
"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"
}
}
},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "50px"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Body header"
},
"position": {
"basis": "1920px"
},
"props": {
"text": "How can we help you ?",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "45px",
"fontWeight": "bolder",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "120px",
"grow": 1
},
"props": {
"justify": "center",
"style": {
"opacity": "0.73",
"textShadow": "#AAAAAA 1px 2px 2px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Markdown"
},
"position": {
"basis": "94px",
"grow": 1
},
"props": {
"markdown": {
"escapeHtml": false
},
"source": "\u003chtml\u003eThis page provides help on all things SCADA related. Cant find what your looking for ?. \u003cbr\u003eReach out to the MAP team for assistance.\u003c/html\u003e",
"style": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "20px",
"fontWeight": "lighter",
"lineHeight": "1.5",
"marginBottom": "20px",
"textAlign": "center"
}
},
"type": "ia.display.markdown"
},
{
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/menu_book",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "User Guide",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"marginTop": "",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/user_guide"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"newTab": true,
"url": "https://w.amazon.com/bin/view/EURME/MAP/Product_Management/SCADA2/Resources/UserGuide"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "UserGuideCard"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginRight": "50px",
"marginTop": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/developer_mode",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "Developer Guide",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/dev_guide"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"newTab": true,
"url": "https://w.amazon.com/bin/view/EURME/MAP/Projects/Amazon_SCADA/Expanding_BU_and_New_Regions_SCADA/AMZL/DeveloperGuide/"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "DevelopmentGuideCard"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginRight": "50px",
"marginTop": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/comment",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "Provide Feedback",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/feedback"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"newTab": true,
"url": "https://quip-amazon.com/BSxOAUz9geea/SCADA-20-Feedback"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "DevelopmentGuideCard_0"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginRight": 50,
"marginTop": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/healing",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "Report Safety Concern",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/reportsafetyconcern"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"newTab": true,
"url": "https://atoz.amazon.work/safety_observations"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "SafetyConcernsCard"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginTop": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "CardsTopRow"
},
"position": {
"basis": "280px"
},
"props": {
"justify": "center",
"style": {
"marginBottom": "20px",
"marginTop": "20px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/confirmation_number",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "Open a Ticket",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/ticket"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"newTab": true,
"url": "https://river.amazon.com/?org\u003dGlobal_RME"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "Open a Ticket"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginRight": "50px",
"marginTop": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/playlist_add_check",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "Commissioning Tool Guide",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/commission_guide"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"newTab": true,
"url": "https://w.amazon.com/bin/view/EURME/MAP/Product_Management/SCADA2/Resources/CommissioningToolUserGuide"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "Commissioning Tool guide"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginRight": "50px",
"marginTop": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "58px"
},
"props": {
"color": "#4D9CCE",
"path": "material/local_library",
"style": {
"margin": "10px",
"marginTop": "50px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100px"
},
"props": {
"text": "Symbol Library",
"textStyle": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": "22px",
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"buttonid": "help/symbol_library"
},
"events": {
"dom": {
"onClick": [
{
"config": {
"script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)"
},
"scope": "G",
"type": "script"
},
{
"config": {
"params": {},
"view": "Symbol-Views/Symbol-Library-Views/Symbol-Icons-View"
},
"scope": "C",
"type": "nav"
}
]
}
},
"meta": {
"name": "Symbol Library"
},
"position": {
"basis": "400px"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#F2F3F4",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"marginBottom": "10px",
"marginRight": "0px",
"marginTop": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "CardsBottomRow"
},
"position": {
"basis": "260px"
},
"props": {
"justify": "center",
"style": {
"marginTop": "20px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Card body"
},
"position": {
"basis": "734px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Body"
},
"position": {
"basis": "980px"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Footer"
},
"position": {
"basis": "50px"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#EDEDED"
}
},
"type": "ia.container.flex"
}
}

View File

@ -1,158 +0,0 @@
SELECT
roundtime,
Dumpers_jam,
Inbound_jam,
Runout_jam,
Sorter_Recirc_jam,
Sorter_jam
FROM (
SELECT
FROM_UNIXTIME(CEIL(UNIX_TIMESTAMP(a.eventtime) / 600) * 600) AS roundtime,
SUM(a.category = 'Dumpers_jam') AS Dumpers_jam,
SUM(a.category = 'Inbound_jam') AS Inbound_jam,
SUM(a.category = 'Runout_jam') AS Runout_jam,
SUM(a.category = 'Sorter_Recirc_jam') AS Sorter_Recirc_jam,
SUM(a.category = 'Sorter_jam') AS Sorter_jam
FROM (
SELECT
ae.eventtime,
m.category
FROM alarm_events ae
JOIN (
SELECT 'PS1_1_TPE1' AS device, 'Inbound_jam' AS category UNION ALL
SELECT 'PS1_1_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS1_1_TPE3', 'Inbound_jam' UNION ALL
SELECT 'PS1_1_TPE4', 'Inbound_jam' UNION ALL
SELECT 'PS1_2A_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS1_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS1_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS1_4_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS1_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS1_6_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS1_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS1_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS2_1_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS2_1_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS2_1_TPE3', 'Inbound_jam' UNION ALL
SELECT 'PS2_1_TPE4', 'Inbound_jam' UNION ALL
SELECT 'PS2_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS2_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS2_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS2_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS2_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS2_7_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_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS4_1_TPE2', 'Inbound_jam' UNION ALL
SELECT 'PS4_1_TPE3', 'Inbound_jam' UNION ALL
SELECT 'PS4_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'PS4_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL10_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL10_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL10_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL11_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL11_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL11_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL12_2_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL12_2_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL12_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL1_1_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL1_2_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL1_2_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL1_4_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL1_4_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL1_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL1_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL2_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL2_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL2_3_TPE3', 'Inbound_jam' UNION ALL
SELECT 'UL2_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL2_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL2_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL2_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL2_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL3_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL3_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL3_3_TPE3', 'Inbound_jam' UNION ALL
SELECT 'UL3_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL3_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL3_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL3_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL3_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL4_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL4_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL4_3_TPE3', 'Inbound_jam' UNION ALL
SELECT 'UL4_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL4_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL4_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL4_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL5_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL5_3_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL5_3_TPE3', 'Inbound_jam' UNION ALL
SELECT 'UL5_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL5_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL5_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL5_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL5_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL6_1_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL6_2_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL6_2_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL6_4_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL6_4_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL6_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL6_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL6_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL7_1_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL7_2_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL7_4_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL7_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL7_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL8_3_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL8_3_TPE3', 'Inbound_jam' UNION ALL
SELECT 'UL8_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL8_5_TPE2', 'Inbound_jam' UNION ALL
SELECT 'UL9_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL9_7_TPE1', 'Inbound_jam' UNION ALL
SELECT 'UL9_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_10_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_10_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC1_11_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_12_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_4_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_4_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC1_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC1_8_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC2_10_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_10_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC2_11_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_12_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_4_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_4_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC2_5_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_8_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC2_8_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC3_3_JPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC3_3_JPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC3_4_JPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC3_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC3_6_TPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC4_3_JPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC4_3_JPE2', 'Inbound_jam' UNION ALL
SELECT 'ULC4_4_JPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC4_6_TPE1', 'Inbound_jam' UNION ALL
SELECT 'ULC4_6_TPE2', 'Inbound_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
GROUP BY FROM_UNIXTIME(CEIL(UNIX_TIMESTAMP(a.eventtime) / 600) * 600)
ORDER BY roundtime ASC
) AS okeyjam;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -1,228 +0,0 @@
{
"pages": {
"/": {
"title": "",
"viewPath": "Main-Views/Home"
},
"/Command": {
"title": "",
"viewPath": "Main-Views/CommandControl"
},
"/Device-manager": {
"viewPath": "Main-Views/Device-Manager/DeviceManager"
},
"/Help": {
"title": "Help",
"viewPath": "Main-Views/Help"
},
"/MAP-Home": {
"title": "",
"viewPath": "Additional-Home-View/MAP-Home"
},
"/Monitron": {
"viewPath": "Main-Views/Monitron"
},
"/Oil": {
"viewPath": "Main-Views/OilMonitoring"
},
"/Real-Time": {
"title": "",
"viewPath": "Alarm-Views/RealTime"
},
"/Temperature": {
"title": "",
"viewPath": "Main-Views/TempMonitoring"
},
"/Tools": {
"title": "Tools",
"viewPath": "Main-Views/ToolBox"
},
"/Windows/Statistics": {
"title": "",
"viewPath": ""
},
"/Windows/Status": {
"title": "",
"viewPath": ""
}
},
"sharedDocks": {
"bottom": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "show",
"iconUrl": "material/notifications_active",
"id": "Docked-South",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 165,
"viewParams": {},
"viewPath": "Navigation-Views/Docked-South"
}
],
"cornerPriority": "top-bottom",
"left": [
{
"anchor": "fixed",
"autoBreakpoint": 805,
"content": "auto",
"handle": "autoHide",
"iconUrl": "",
"id": "Docked-West",
"modal": false,
"resizable": false,
"show": "auto",
"size": 70,
"viewParams": {},
"viewPath": "Navigation-Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-Eas-TPR",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Tipper"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-EPC",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-EPC"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-VFD",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-VFD"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-SNP",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-DS",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-MCM",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-MCM"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Extendo",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-BTN",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-SS-BTN",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 400,
"viewParams": {},
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button"
}
],
"top": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "auto",
"handle": "hide",
"iconUrl": "",
"id": "",
"modal": false,
"resizable": false,
"show": "visible",
"size": 50,
"viewParams": {},
"viewPath": "Framework/Breakpoint"
}
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@ -1,608 +0,0 @@
{
"custom": {
"color": "#C2C2C2",
"priority": "No Active Alarms",
"state": "Closed"
},
"params": {
"forceFaultStatus": null,
"tagProps": [
"System/MCM01/Station/EPC/UL1_3_EPC1",
"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},{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.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},{view.params.forceFaultStatus},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},{view.params.forceFaultStatus},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"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.forceFaultStatus": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "inout",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 38,
"width": 25
}
},
"root": {
"children": [
{
"meta": {
"name": "PullChord_Part2"
},
"position": {
"height": 1,
"width": 1,
"x": 0.0015,
"y": 0.0005
},
"propConfig": {
"props.elements[1].fill.paint": {
"binding": {
"config": {
"expression": "if({view.custom.state} \u003d \"Closed\", \"#000000\", {view.custom.color})"
},
"type": "expr"
}
},
"props.elements[2].visibility": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.color} \u003d \"#FF0000\" \u0026\u0026 \r\n {parent.meta.visible},\r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
},
"type": "expr"
}
},
"props.elements[3].visibility": {
"binding": {
"config": {
"expression": "if(\r\n {view.custom.color} \u003d \"#00FF00\" \u0026\u0026 \r\n {parent.meta.visible} || {view.custom.state} \u003d \"Closed\",\r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z",
"fill": {
"paint": "#AAAAAA"
},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
},
{
"d": "m 20.752995,30.343588 a 7.2578735,7.1963887 0 0 1 -7.257873,7.196389 7.2578735,7.1963887 0 0 1 -7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.257873,7.196389 z",
"fill": {},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
},
{
"d": "m 13.785537,6.4238337 -7.0747349,-3.1261989 -0.985,1.7060701 6.2447349,4.563801 z",
"fill": {
"paint": "#0000FF"
},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
},
{
"d": "m 12.141737,10.447495 -5.3573679,5.578853 1.2662916,1.509108 6.4243953,-4.30722 z",
"fill": {
"paint": "#0000FF"
},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
},
{
"d": "m 21.18,10 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 5,-5 5,5 0 0 1 5,5 z",
"fill": {
"paint": "#0000FF"
},
"name": "path",
"stroke": {
"paint": "#000000",
"width": 1
},
"type": "path"
}
],
"viewBox": "-0.5 -0.5 27 42"
},
"type": "ia.shapes.svg"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East-EPC\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true,
"location": "top-left",
"style": {}
}
},
"propConfig": {
"meta.tooltip.style.classes": {
"binding": {
"config": {
"expression": "{view.custom.priority}"
},
"transforms": [
{
"fallback": "Alarms-Styles/NoAlarm",
"inputType": "scalar",
"mappings": [
{
"input": "High",
"output": "Alarms-Styles/High"
}
],
"outputType": "style-list",
"type": "map"
}
],
"type": "expr"
}
},
"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"
}
},
"meta.visible": {
"binding": {
"config": {
"path": "session.custom.alarm_filter.show_safety"
},
"type": "property"
}
}
},
"props": {
"aspectRatio": "25:38",
"mode": "percent",
"style": {
"cursor": "pointer"
}
},
"type": "ia.container.coord"
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@ -239,50 +239,6 @@
"viewPath": "autStand/Docked_Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Conv",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Device",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Device"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-VFD",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-VFD"
}
],
"top": [
{
"anchor": "fixed",
@ -391,50 +347,6 @@
"viewPath": "autStand/Docked_Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Device",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Device"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Conv",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-VFD",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-VFD"
}
],
"top": [
{
"anchor": "fixed",
@ -489,50 +401,6 @@
"viewPath": "autStand/Docked_Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Device",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Device"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Conv",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv"
},
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-VFD",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-VFD"
}
],
"top": [
{
"anchor": "fixed",
@ -640,22 +508,6 @@
"viewPath": "autStand/Docked_Views/Docked-West"
}
],
"right": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "cover",
"handle": "hide",
"iconUrl": "",
"id": "Docked-East-Device",
"modal": false,
"resizable": false,
"show": "onDemand",
"size": 600,
"viewParams": {},
"viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Device"
}
],
"top": [
{
"anchor": "fixed",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,241 @@
{
"custom": {
"state": 0,
"string": "Starting"
},
"params": {
"name": "amber",
"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},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": 1
},
{
"input": 0,
"output": 0
},
{
"input": 2,
"output": 2
},
{
"input": 3,
"output": 3
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.string": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": "Starting",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "Running"
},
{
"input": 2,
"output": "EStop or Faulted"
},
{
"input": 3,
"output": "Gridlock Prevention"
},
{
"input": 4,
"output": "Full"
},
{
"input": 5,
"output": "Jammed"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
},
"persistent": true
},
"params.name": {
"paramDirection": "input",
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 20,
"width": 20
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "substring({view.params.name}, 0, 1)"
},
"type": "expr"
}
}
},
"props": {
"textStyle": {
"fontSize": "20px",
"textAlign": "center",
"textTransform": "uppercase"
}
},
"type": "ia.display.label"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openDock(\u0027Docked-East-JR\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
},
"scope": "G",
"type": "script"
},
"onMouseEnter": {
"config": {
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root",
"tooltip": {
"enabled": true
}
},
"propConfig": {
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "\"Source Id: \" + {view.params.tagProps[0]} + \", Status: \" + {view.custom.string}\n"
},
"type": "expr"
}
},
"meta.visible": {
"binding": {
"config": {
"path": "session.custom.alarm_filter.show_beacons"
},
"type": "property"
}
},
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.state"
},
"transforms": [
{
"fallback": "#808080",
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "#00FF00"
},
{
"input": 2,
"output": "#FF0000"
},
{
"input": 3,
"output": "#FF00FF"
},
{
"input": 4,
"output": "#0000D9"
},
{
"input": 5,
"output": "#FF8C00"
}
],
"outputType": "color",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"mode": "percent",
"style": {
"borderStyle": "solid",
"cursor": "pointer",
"overflow": "hidden"
}
},
"type": "ia.container.coord"
}
}

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