Merge pull request 'Alarm click events' (#143) from guga into main
Reviewed-on: #143
This commit is contained in:
commit
f06f72bfcf
@ -0,0 +1,19 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"timingFunction": "ease-in-out",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(255, 255, 0, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(255, 255, 0, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(255, 255, 0, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\n\tutils.handleTagHighlight(self.view, currentValue)\n\n\t"
|
||||
},
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -18254,6 +18266,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FL2078_2"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 153.37,
|
||||
"y": 233.80263412475585
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": false,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM01/Conveyor/FL2078_2_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tfound \u003d utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM02_upper \u003d \"Detailed-Views/MCM02 Fluid Inbound Upper\"\n\t\tsystem.perspective.navigate(view \u003d MCM02_upper, params \u003d {\u0027highlightTagPath\u0027:currentValue})\n\t\t"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -11740,6 +11752,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL1_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 153.37,
|
||||
"y": 233.8
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM02/Conveyor/UL11_4_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tutils.handleTagHighlight(self.view, currentValue)"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -3218,6 +3230,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/ControlCabinet"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL1_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 462.25543701171875,
|
||||
"y": 144.8
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM02/Conveyor/UL1_4_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tutils.handleTagHighlight(self.view, currentValue)"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -6684,6 +6696,40 @@
|
||||
"path": "Custom-Views/Area_Nav_Button"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL21_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 925.26,
|
||||
"y": 368.2377040863037
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM03/Conveyor/UL21_4_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tutils.handleTagHighlight(self.view, currentValue)"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -15144,6 +15156,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/JR_Button"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL31_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 238.53,
|
||||
"y": 229.05
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM04/Conveyor/UL31_3_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tfound \u003d utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM04_Chutes \u003d \"Detailed-Views/MCM04 Chutes\"\n\t\tsystem.perspective.navigate(view \u003d MCM04_Chutes, params \u003d {\u0027highlightTagPath\u0027:currentValue})"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tutils.handleTagHighlight(self.view, currentValue)"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -17644,6 +17656,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/JR_Button"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL41_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 817.5041870117187,
|
||||
"y": 398.6770935058594
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": true,
|
||||
"tagProps": [
|
||||
"System/MCM05/Conveyor/UL41_4_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tfound \u003d utils.handleTagHighlight(self.view, currentValue)\n\tif not found:\n\t\tMCM05_Chutes \u003d \"Detailed-Views/MCM05 Chutes\"\n\t\tsystem.perspective.navigate(view \u003d MCM05_Chutes, params \u003d {\u0027highlightTagPath\u0027:currentValue})"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tutils.handleTagHighlight(self.view, currentValue)"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -9794,6 +9806,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/JR_Button"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL51_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 477.18125,
|
||||
"y": 287.8645935058594
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM06/Conveyor/UL51_4_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"params": {
|
||||
"highlightTagPath": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.highlightTagPath": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tutils.handleTagHighlight(self.view, currentValue)"
|
||||
},
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1028,
|
||||
@ -14075,6 +14087,40 @@
|
||||
"path": "Symbol-Views/Equipment-Views/Button"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "UL61_4"
|
||||
},
|
||||
"position": {
|
||||
"height": 20.05,
|
||||
"width": 19.98,
|
||||
"x": 506.78416793823243,
|
||||
"y": 218.8391774749756
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"has_state": true,
|
||||
"isHighlighted": false,
|
||||
"tagProps": [
|
||||
"System/MCM07/Conveyor/UL61_3_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
||||
40
MTN6_SCADA/ignition/script-python/utils/code.py
Normal file
40
MTN6_SCADA/ignition/script-python/utils/code.py
Normal file
@ -0,0 +1,40 @@
|
||||
def handleTagHighlight(view, currentValue):
|
||||
tag = currentValue.value
|
||||
|
||||
if tag == "":
|
||||
return
|
||||
|
||||
splitedTag = str(tag).split("/")
|
||||
deviceName = splitedTag[-1]
|
||||
|
||||
Docked_East_Map = {
|
||||
"VFD" : "Docked-East-VFD",
|
||||
"MCM" : "Docked-East-MCM"
|
||||
}
|
||||
|
||||
Docked_East_View = Docked_East_Map["VFD"]
|
||||
|
||||
if "PE" in deviceName:
|
||||
tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1"
|
||||
|
||||
if "MCM" in deviceName:
|
||||
Docked_East_View = Docked_East_Map["MCM"]
|
||||
|
||||
components = view.rootContainer.getChildren()
|
||||
|
||||
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"
|
||||
system.perspective.openDock(Docked_East_View, params={'tagProps': tagProps})
|
||||
return True
|
||||
|
||||
return False
|
||||
@ -0,0 +1,18 @@
|
||||
{
|
||||
"base": {
|
||||
"animation": {
|
||||
"duration": "2.5s",
|
||||
"keyframes": {
|
||||
"0%": {
|
||||
"boxShadow": "0 0 12px 5px rgba(255, 255, 0, 0.8)"
|
||||
},
|
||||
"50%": {
|
||||
"boxShadow": "0 0 20px 8px rgba(255, 255, 0, 1)"
|
||||
},
|
||||
"100%": {
|
||||
"boxShadow": "0 0 5px 2px rgba(255, 255, 0, 0.3)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -13,16 +13,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"page_name": "Alarms-RealTime"
|
||||
},
|
||||
"params": {},
|
||||
"propConfig": {
|
||||
"custom.activityLogger": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.page_name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
@ -691,6 +685,17 @@
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onRowClick": {
|
||||
"config": {
|
||||
"script": "\tdata \u003d self.props.selection.data\n\tif not data or len(data) !\u003d 1:\n\t return\n\t\n\trow \u003d data[0]\n\tclickedTagPath \u003d row.get(\"FullTag\", \"\")\n\tMCM \u003d row.get(\"Location\", \"\")\n\t\n\tMCM_Pages_Map \u003d {\n\t\t\"MCM01\": \"Detailed-Views/MCM01 Fluid Inbound Merges 1-4\",\n\t\t\"MCM02\": \"Detailed-Views/MCM02 Fluid Inbound Merges 5-7\",\n\t\t\"MCM03\": \"Detailed-Views/MCM03 Non Con\",\n\t\t\"MCM04\": \"Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve\",\n\t\t\"MCM05\": \"Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve\",\n\t\t\"MCM06\": \"Detailed-Views/MCM06 Non Con\",\n\t\t\"MCM07\": \"Detailed-Views/MCM07 Bypass\",\n\t}\n\t\n\n\tpage \u003d MCM_Pages_Map.get(MCM)\n\t\n\tif not page:\n\t return\n\t\t\n\tdevice \u003d row.get(\"Device\", \"\")\n\t\n\tif not device or not clickedTagPath:\n\t\treturn\n\n\tpathToDevice \u003d \"\"\n\n#\tcheck for the mcm\n\tif \"MCM\" in device:\n\t\tparts \u003d clickedTagPath.split(\"/\")\n\t\tpathToDevice \u003d \"/\".join(parts[:3])\n\n\telse:\n\t\tindex \u003d clickedTagPath.find(device)\n\t\tif index \u003d\u003d -1:\n\t\t\treturn\n\t\tpathToDevice \u003d clickedTagPath[:index + len(device)]\n\n\t\t\n\t# Navigate to target view, passing the tag to highlight\n\tsystem.perspective.navigate(view \u003d page, params \u003d {\u0027highlightTagPath\u0027:pathToDevice})\n\t\n\t\n"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Table"
|
||||
},
|
||||
@ -1179,7 +1184,7 @@
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sort": "ascending",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
@ -1379,6 +1384,192 @@
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": 80
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "FullTag",
|
||||
"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": "left",
|
||||
"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": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": "",
|
||||
"display": "none"
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "Device",
|
||||
"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": "left",
|
||||
"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": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": "",
|
||||
"display": "none"
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
}
|
||||
],
|
||||
"emptyMessage": {
|
||||
@ -1396,7 +1587,74 @@
|
||||
}
|
||||
},
|
||||
"selection": {
|
||||
"mode": "multiple interval"
|
||||
"data": [
|
||||
{
|
||||
"Description": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "MCM01 - Hello world"
|
||||
},
|
||||
"Device": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "MCM01"
|
||||
},
|
||||
"Duration": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "01:05:19"
|
||||
},
|
||||
"FullTag": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "System/MCM01/MCM01/Beacon_Light"
|
||||
},
|
||||
"ID": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": 12
|
||||
},
|
||||
"Location": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "MCM01"
|
||||
},
|
||||
"Priority": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "High"
|
||||
},
|
||||
"StartTimestamp": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1750942947091
|
||||
],
|
||||
"$ts": 1750939070000
|
||||
}
|
||||
},
|
||||
"Tag": {
|
||||
"style": {
|
||||
"classes": "Alarms-Styles/High"
|
||||
},
|
||||
"value": "MCM01.HMI.Beacon_Light"
|
||||
}
|
||||
}
|
||||
],
|
||||
"mode": "multiple interval",
|
||||
"selectedColumn": "Location",
|
||||
"selectedRow": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
@ -2900,7 +3158,7 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1750755617512
|
||||
1750938073345
|
||||
],
|
||||
"$ts": 1750435156149
|
||||
},
|
||||
@ -2908,7 +3166,7 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1750755617511
|
||||
1750938073345
|
||||
],
|
||||
"$ts": 1750436956149
|
||||
}
|
||||
@ -3856,7 +4114,7 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1750755617512
|
||||
1750938073345
|
||||
],
|
||||
"$ts": 1750435156149
|
||||
},
|
||||
@ -3864,7 +4122,7 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1750755617511
|
||||
1750938073345
|
||||
],
|
||||
"$ts": 1750436956149
|
||||
},
|
||||
@ -4123,7 +4381,6 @@
|
||||
"contentStyle": {
|
||||
"classes": "Background-Styles/Grey-Background"
|
||||
},
|
||||
"currentTabIndex": 2,
|
||||
"menuType": "modern",
|
||||
"style": {
|
||||
"classes": "Background-Styles/Grey-Background"
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1750766217642
|
||||
1750943397562
|
||||
],
|
||||
"$ts": 1750766217641
|
||||
"$ts": 1750943397562
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -251,7 +251,7 @@
|
||||
"height": 30,
|
||||
"mode": "fill"
|
||||
},
|
||||
"source": "/system/images/Builtin/amazon_rme_logo.png"
|
||||
"source": null
|
||||
},
|
||||
"type": "ia.display.image"
|
||||
},
|
||||
@ -823,7 +823,7 @@
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tdata \u003d value\n\trows \u003d system.dataset.toPyDataSet(data)\n\t\n\ttotal \u003d sum(row[\"Count\"] for row in rows)\n\t\n\treturn total",
|
||||
"code": "\tif value is None or not hasattr(system.dataset, \"toPyDataSet\"):\n\t\treturn \n\t\t\n\trows \u003d system.dataset.toPyDataSet(value)\n\t\n\ttotal \u003d sum(row[\"Count\"] for row in rows)\n\t\n\treturn total",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
@ -882,158 +882,178 @@
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
"children": [
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
{
|
||||
"input": false,
|
||||
"output": "websocket disconnected"
|
||||
"expression": "if(secondsBetween(todate({value}),todate(now())) \u003e 70, False, True)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
"type": "tag"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.custom.wbsckt_running"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": false,
|
||||
"output": "#FF4747"
|
||||
"custom.wbsckt_running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_running"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "#FFFFFF"
|
||||
"expression": "if({value} \u003d True \u0026\u0026 ({this.custom.heartbeat_received} \u003d True) , True, False)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
"type": "tag"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"basis": "50px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/location_city",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
},
|
||||
{
|
||||
],
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
"name": "FlexContainer_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "direct",
|
||||
"tagPath": "Configuration/FC"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
"basis": "200px"
|
||||
},
|
||||
"props": {
|
||||
"icon": "material/building",
|
||||
"style": {
|
||||
"borderWidth": "0.25px",
|
||||
"color": "#FFFFFF",
|
||||
"textAlign": "",
|
||||
"textIndent": 10
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
@ -1094,6 +1114,7 @@
|
||||
"name": "Sign In"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": true,
|
||||
"display_icon": true,
|
||||
"plc": "value",
|
||||
"plc": "System",
|
||||
"priority": 0,
|
||||
"priority_string": "No Active Alarms",
|
||||
"running": false,
|
||||
@ -17,7 +18,7 @@
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"System/MCM01/Conveyor/UL1_3_VFD1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
|
||||
@ -1,60 +1,62 @@
|
||||
WITH Active AS (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.eventtime,
|
||||
ae.eventid,
|
||||
ae.source,
|
||||
ae.priority,
|
||||
ae.displaypath,
|
||||
TIMESTAMPDIFF(SECOND, ae.eventtime, NOW()) AS duration_seconds
|
||||
FROM alarm_events ae
|
||||
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%'
|
||||
-- Priority filter using FIND_IN_SET for comma-separated values
|
||||
AND (
|
||||
:priorityList IS NULL
|
||||
OR :priorityList = ''
|
||||
OR FIND_IN_SET(ae.priority, :priorityList) > 0
|
||||
)
|
||||
GROUP BY ae.id
|
||||
),
|
||||
SingleMyTag AS (
|
||||
SELECT aed.id, aed.strValue
|
||||
FROM alarm_event_data aed
|
||||
WHERE aed.propname = 'myTag'
|
||||
GROUP BY aed.id
|
||||
)
|
||||
SELECT
|
||||
Active.id AS ID,
|
||||
Active.eventtime AS StartTimestamp,
|
||||
NULL AS EndTimestamp, -- no end time since it's still active
|
||||
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
|
||||
FROM Active
|
||||
LEFT JOIN SingleMyTag aed
|
||||
ON aed.id = Active.id
|
||||
WITH Active AS (
|
||||
SELECT
|
||||
ae.id,
|
||||
ae.eventtime,
|
||||
ae.eventid,
|
||||
ae.source,
|
||||
ae.priority,
|
||||
ae.displaypath,
|
||||
TIMESTAMPDIFF(SECOND, ae.eventtime, NOW()) AS duration_seconds
|
||||
FROM alarm_events ae
|
||||
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%'
|
||||
-- Priority filter using FIND_IN_SET for comma-separated values
|
||||
AND (
|
||||
:priorityList IS NULL
|
||||
OR :priorityList = ''
|
||||
OR FIND_IN_SET(ae.priority, :priorityList) > 0
|
||||
)
|
||||
GROUP BY ae.id
|
||||
),
|
||||
SingleMyTag AS (
|
||||
SELECT aed.id, aed.strValue
|
||||
FROM alarm_event_data aed
|
||||
WHERE aed.propname = 'myTag'
|
||||
GROUP BY aed.id
|
||||
)
|
||||
SELECT
|
||||
Active.id AS ID,
|
||||
Active.eventtime AS StartTimestamp,
|
||||
NULL AS EndTimestamp, -- no end time since it's still active
|
||||
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 Active
|
||||
LEFT JOIN SingleMyTag aed
|
||||
ON aed.id = Active.id
|
||||
ORDER BY Active.eventtime DESC;
|
||||
Loading…
x
Reference in New Issue
Block a user