fixed the alarms
|
Before Width: | Height: | Size: 6.8 KiB |
@ -0,0 +1,55 @@
|
||||
def handleTagHighlight(view, currentValue):
|
||||
tag_priority = currentValue.value
|
||||
|
||||
# --- CASE 1: Remove all highlights by applying CLEAR class ---
|
||||
if not tag_priority or str(tag_priority).upper() == "CLEAR":
|
||||
for child in view.rootContainer.getChildren():
|
||||
try:
|
||||
child.props.style.classes = "Highlight/Pulse-Clear"
|
||||
except:
|
||||
pass
|
||||
return False
|
||||
|
||||
# --- CASE 2: Highlight as normal ---
|
||||
parts = str(tag_priority).split("||")
|
||||
tag = parts[0]
|
||||
priority = parts[1] if len(parts) > 1 else "1"
|
||||
|
||||
splitedTag = tag.split("/")
|
||||
deviceName = splitedTag[-1]
|
||||
|
||||
Docked_East_Map = {
|
||||
"VFD": "Docked-East-VFD",
|
||||
"MCM": "Docked-East-MCM"
|
||||
}
|
||||
Docked_East_View = Docked_East_Map["VFD"]
|
||||
|
||||
if "PE" in deviceName:
|
||||
tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1"
|
||||
|
||||
if "MCM" in deviceName:
|
||||
Docked_East_View = Docked_East_Map["MCM"]
|
||||
|
||||
# Clear old highlights (set to Clear class)
|
||||
components = view.rootContainer.getChildren()
|
||||
for child in components:
|
||||
child.props.style.classes = "Highlight/Pulse-Clear"
|
||||
|
||||
# Apply highlight if found
|
||||
foundMatch = False
|
||||
for child in components:
|
||||
params = child.props.get("params", {})
|
||||
tagProps = params.get("tagProps", {})
|
||||
tagsList = list(tagProps)
|
||||
|
||||
if len(tagsList) == 0:
|
||||
continue
|
||||
|
||||
tagPath = tagsList[0]
|
||||
|
||||
if tag == tagPath:
|
||||
child.props.style.classes = "Highlight/Pulse-" + priority
|
||||
system.perspective.openDock(Docked_East_View, params={'tagProps': tagProps})
|
||||
foundMatch = True
|
||||
|
||||
return foundMatch
|
||||
@ -1,58 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@ -1,442 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"disconnected": false,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 0
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "!isGood({value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 3,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No active alarms"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "High"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 3
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 25,
|
||||
"width": 25
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "JR_Button"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#585858",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "#000000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#000000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#D5D5D5"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "#47FF47"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "#FFFF47"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})"
|
||||
},
|
||||
"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": [
|
||||
{
|
||||
"d": "M 0,0 H 20 V 20 H 0 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1.5"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": "1"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {},
|
||||
"viewBox": "0 0 20 20"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East-JR\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\n {view.custom.disconnected} \u003d false,\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority_string},\n \"Device Disconnected\"\n)\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_buttons"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 21 KiB |
@ -409,7 +409,6 @@
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"key": "value",
|
||||
"tagProps": [
|
||||
"System/MCM01/Conveyor/UL14_1",
|
||||
"value",
|
||||
@ -1372,7 +1371,7 @@
|
||||
"props": {
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM01/Photoeyes/TPE/PS3_1_TPE1",
|
||||
"System/MCM01/PE/TPE/PS3_1_TPE1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -1608,7 +1607,7 @@
|
||||
"props": {
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM01/Photoeyes/TPE/PS3_2_TPE1",
|
||||
"System/MCM01/Photoeye/TPE/PS3_2_TPE1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
@ -4225,7 +4224,7 @@
|
||||
"props": {
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"System/MCM01/SIO/PS3_1_SIO1",
|
||||
"System/MCM01/IO_Block/SIO/PS3_1_SIO1",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,732 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 494 B |
|
After Width: | Height: | Size: 47 KiB |
@ -1,656 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"FillColour": "value",
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"disconnected": false,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"running": false,
|
||||
"running_status": 0,
|
||||
"searchId": "value",
|
||||
"show_error": false,
|
||||
"show_running": true,
|
||||
"state": 5,
|
||||
"state_string": "Unknown"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.FillColour": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.alarm_message": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm} || {session.custom.alarm_filter.show_running},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {session.custom.alarm_filter.show_running},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.disconnected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"fc": "{session.custom.fc}",
|
||||
"plc": "{view.custom.plc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(isNull({value}), False, {value})",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.display_icon": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.plc": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagProps[0]"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "split({value}, \"/\")[0]",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": 0,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.running_status} \u003d 3"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.running_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceRunningStatus},0)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.show_error": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\tFalse)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.show_running": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case(\t{value},\r\n\t\t1, False,\r\n\t\t2, False,\r\n\t\t{session.custom.alarm_filter.show_running}\r\n\t\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": 2
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": 3
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": 4
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 5
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 100,
|
||||
"width": 100
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "PPI"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[1].elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 101,
|
||||
"output": "State-Styles/State101"
|
||||
},
|
||||
{
|
||||
"input": 102,
|
||||
"output": "State-Styles/State102"
|
||||
},
|
||||
{
|
||||
"input": 103,
|
||||
"output": "State-Styles/State103"
|
||||
},
|
||||
{
|
||||
"input": 104,
|
||||
"output": "State-Styles/State104"
|
||||
},
|
||||
{
|
||||
"input": 105,
|
||||
"output": "State-Styles/State105"
|
||||
},
|
||||
{
|
||||
"input": 106,
|
||||
"output": "State-Styles/State106"
|
||||
},
|
||||
{
|
||||
"input": 201,
|
||||
"output": "State-Styles/State201"
|
||||
},
|
||||
{
|
||||
"input": 202,
|
||||
"output": "State-Styles/State202"
|
||||
},
|
||||
{
|
||||
"input": 203,
|
||||
"output": "State-Styles/State203"
|
||||
},
|
||||
{
|
||||
"input": 204,
|
||||
"output": "State-Styles/State204"
|
||||
},
|
||||
{
|
||||
"input": 205,
|
||||
"output": "State-Styles/State205"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"id": "defs1",
|
||||
"name": "defs1",
|
||||
"type": "defs"
|
||||
},
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"cx": "6.6145835",
|
||||
"cy": "6.6145835",
|
||||
"fill": {},
|
||||
"id": "path1",
|
||||
"name": "path1",
|
||||
"r": "6.019948",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"paint": "#000000",
|
||||
"width": "0.264583"
|
||||
},
|
||||
"type": "circle"
|
||||
},
|
||||
{
|
||||
"d": "m 2.1166666,8.5242134 h 3.175",
|
||||
"fill": {
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path2",
|
||||
"name": "path2",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"paint": "#000000",
|
||||
"width": "0.264583"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 7.9374999,8.5242134 H 11.112492",
|
||||
"fill": {
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path3",
|
||||
"name": "path3",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"paint": "#000000",
|
||||
"width": "0.264583"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 5.1593748,4.183724 V 8.4170573",
|
||||
"fill": {
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path5",
|
||||
"name": "path5",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"paint": "#000000",
|
||||
"width": "0.264583"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 8.2020833,4.1405926 h -3.175",
|
||||
"fill": {
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path6",
|
||||
"name": "path6",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"paint": "#000000",
|
||||
"width": "0.264583"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 8.0697914,4.183724 V 8.4170573",
|
||||
"fill": {
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path7",
|
||||
"name": "path7",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"paint": "#000000",
|
||||
"width": "0.264583"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"id": "layer1",
|
||||
"name": "layer1",
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"style": {},
|
||||
"viewBox": "0 0 13.229166 13.229167"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left",
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
},
|
||||
{
|
||||
"input": 2,
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": 3,
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": 4,
|
||||
"output": "Alarms-Styles/High"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.style.color": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"meta.tooltip.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Disconnects/Device-Connected",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "Disconnects/Device-Disconnected"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "Disconnects/Device-Connected"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"aspectRatio": "1:1",
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -1,773 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 10 KiB |
@ -1,537 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"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_status": 0,
|
||||
"searchId": "value",
|
||||
"state": 5,
|
||||
"state_string": "Unknown"
|
||||
},
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"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},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\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))\n\n"
|
||||
},
|
||||
"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_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.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.directionLeft": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 100,
|
||||
"width": 100
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ARSAW"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])",
|
||||
"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": [
|
||||
{
|
||||
"d": "m 25,50.5 a 25,25 0 0 1 -25,-25 25,25 0 0 1 25,-25 25,25 0 0 1 25,25 25,25 0 0 1 -25,25 z",
|
||||
"fill": {},
|
||||
"name": "Circle",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 8.3000002,34.740002 H 31.04 v 4.26 H 8.3000002 Z M 26.77,12 h 4.260001 V 34.74 H 26.77 Z M 16.110001,12 H 24.64 v 17.049999 h -8.529999 z m 17.059997,0 h 8.53 v 17.049999 h -8.53 z",
|
||||
"fill": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"name": "ARSAW",
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {},
|
||||
"viewBox": "-0.5 -0.5 51 52"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
@ -1,171 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 51 KiB |
@ -1,604 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,92 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1710802671820
|
||||
1754319546004
|
||||
],
|
||||
"$ts": 1710802671820
|
||||
"$ts": 1754319545822
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -78,6 +78,143 @@
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
"Counts": {
|
||||
"Diag": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
},
|
||||
"area": "Bulk Inbound",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"subarea": "",
|
||||
"tagProps": [
|
||||
"MCM05",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Counts": {
|
||||
"Diag": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
},
|
||||
"area": "Fluid Inbound",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"subarea": "",
|
||||
"tagProps": [
|
||||
"MCM04",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Counts": {
|
||||
"Diag": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
},
|
||||
"area": "Fluid Inbound",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"subarea": "",
|
||||
"tagProps": [
|
||||
"MCM03",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Counts": {
|
||||
"Diag": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
},
|
||||
"area": "Sorter Destination and Chutes",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"subarea": "",
|
||||
"tagProps": [
|
||||
"MCM02",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Counts": {
|
||||
"Diag": 0,
|
||||
"High": 0,
|
||||
"Low": 0,
|
||||
"Medium": 0
|
||||
},
|
||||
"area": "Sorter Destination, Chutes and Bypass",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"subarea": "",
|
||||
"tagProps": [
|
||||
"MCM01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
],
|
||||
"path": "Symbol-Views/Controller-Views/ControllerStatus",
|
||||
"style": {
|
||||
"overflow": "visible"
|
||||
@ -89,65 +226,26 @@
|
||||
],
|
||||
"custom": {
|
||||
"Devices": [
|
||||
"ARSAW1301",
|
||||
"PLC03",
|
||||
"ARSAW1302",
|
||||
"PLC01",
|
||||
"PLC02",
|
||||
"PLC98",
|
||||
"ARSAW1305",
|
||||
"ARSAW1503",
|
||||
"PLC08",
|
||||
"PLC99",
|
||||
"ARSAW1306",
|
||||
"ARSAW1504",
|
||||
"ARSAW1501",
|
||||
"ARSAW1303",
|
||||
"PLC06",
|
||||
"PLC07",
|
||||
"ARSAW1304",
|
||||
"ARSAW1502",
|
||||
"ARSAW1309",
|
||||
"ARSAW1507",
|
||||
"ARSAW1508",
|
||||
"PLC09",
|
||||
"ARSAW1307",
|
||||
"ARSAW1505",
|
||||
"ARSAW1308",
|
||||
"ARSAW1506",
|
||||
"PLC20",
|
||||
"ARSAW1509",
|
||||
"PLC14",
|
||||
"PLC80",
|
||||
"PLC81",
|
||||
"PLC82",
|
||||
"PLC16",
|
||||
"FSC10",
|
||||
"PLC21",
|
||||
"PLC22",
|
||||
"PLC69",
|
||||
"PLC25",
|
||||
"PLC26",
|
||||
"PLC23",
|
||||
"PLC24",
|
||||
"PLC97",
|
||||
"PLC27",
|
||||
"PLC61",
|
||||
"PLC60",
|
||||
"PLC1000",
|
||||
"PLC13",
|
||||
"ARSAW1312",
|
||||
"ARSAW1510",
|
||||
"ARSAW1511",
|
||||
"ARSAW1310",
|
||||
"ARSAW1311",
|
||||
"ARSAW1512",
|
||||
"PLC70",
|
||||
"PLC71",
|
||||
"PLC32",
|
||||
"PLC30",
|
||||
"PLC31",
|
||||
"PLC15"
|
||||
[
|
||||
"MCM01",
|
||||
"Bulk Inbound"
|
||||
],
|
||||
[
|
||||
"MCM02",
|
||||
"Fluid Inbound"
|
||||
],
|
||||
[
|
||||
"MCM03",
|
||||
"Fluid Inbound"
|
||||
],
|
||||
[
|
||||
"MCM05",
|
||||
"Sorter Destination and Chutes"
|
||||
],
|
||||
[
|
||||
"MCM04",
|
||||
"Sorter Destination, Chutes and Bypass"
|
||||
]
|
||||
],
|
||||
"count": "value",
|
||||
"delay": 2000,
|
||||
@ -1,46 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Information": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Information": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Markdown"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.source": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"bidirectional": true,
|
||||
"path": "view.params.Information"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "ia.display.markdown"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"justify": "space-evenly"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -8,14 +8,6 @@
|
||||
"title": "",
|
||||
"viewPath": "Main-Views/CommandControl"
|
||||
},
|
||||
"/CustomView/:customView": {
|
||||
"title": "",
|
||||
"viewPath": "Custom-Views/Detail"
|
||||
},
|
||||
"/DetailedView/:detailedView/:plcTagPath": {
|
||||
"title": "DetailedView",
|
||||
"viewPath": "Detailed-Views/Detail"
|
||||
},
|
||||
"/Device-manager": {
|
||||
"viewPath": "Main-Views/Device-Manager/DeviceManager"
|
||||
},
|
||||
@ -34,6 +26,7 @@
|
||||
"viewPath": "Main-Views/OilMonitoring"
|
||||
},
|
||||
"/Real-Time": {
|
||||
"title": "",
|
||||
"viewPath": "Alarm-Views/RealTime"
|
||||
},
|
||||
"/Temperature": {
|
||||
@ -51,10 +44,6 @@
|
||||
"/Windows/Status": {
|
||||
"title": "",
|
||||
"viewPath": ""
|
||||
},
|
||||
"/config": {
|
||||
"title": "",
|
||||
"viewPath": "CommissioningTool/PageConfig"
|
||||
}
|
||||
},
|
||||
"sharedDocks": {
|
||||
@ -98,13 +87,13 @@
|
||||
"content": "cover",
|
||||
"handle": "hide",
|
||||
"iconUrl": "",
|
||||
"id": "Docked-East",
|
||||
"id": "Docked-Eas-TPR",
|
||||
"modal": false,
|
||||
"resizable": false,
|
||||
"show": "onDemand",
|
||||
"size": 400,
|
||||
"viewParams": {},
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East"
|
||||
"viewPath": "PopUp-Views/Controller-Equipment/Information-Tipper"
|
||||
},
|
||||
{
|
||||
"anchor": "fixed",
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#00FF00",
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Normal"
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
|
After Width: | Height: | Size: 96 KiB |
@ -5,9 +5,7 @@
|
||||
"MCM02",
|
||||
"MCM03",
|
||||
"MCM04",
|
||||
"MCM05",
|
||||
"MCM06",
|
||||
"MCM07"
|
||||
"MCM05"
|
||||
],
|
||||
"running_state": -1,
|
||||
"state": 0,
|
||||
@ -465,7 +463,7 @@
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Communication_Faulted"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
@ -483,6 +481,14 @@
|
||||
{
|
||||
"input": 0,
|
||||
"output": "NOT FAULTED"
|
||||
},
|
||||
{
|
||||
"input": true,
|
||||
"output": "FAULTED"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "NOT FAULTED"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
@ -577,7 +583,6 @@
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"currentTabIndex": 1,
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
@ -7,13 +7,11 @@ def handleClick(data):
|
||||
MCM = row.get("Location", "")
|
||||
|
||||
MCM_Pages_Map = {
|
||||
"MCM01": "Detailed-Views/MCM01 Fluid Inbound Merges 1-4",
|
||||
"MCM02": "Detailed-Views/MCM02 Fluid Inbound Merges 5-7",
|
||||
"MCM03": "Detailed-Views/MCM03 Non Con",
|
||||
"MCM04": "Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve",
|
||||
"MCM05": "Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve",
|
||||
"MCM06": "Detailed-Views/MCM06 Non Con",
|
||||
"MCM07": "Detailed-Views/MCM07 Bypass",
|
||||
"MCM01": "Detailed-Views/MCM01 Bulk Inbound",
|
||||
"MCM02": "Detailed-Views/MCM02 Fluid Inbound",
|
||||
"MCM03": "Detailed-Views/MCM03 Fluid Inbound",
|
||||
"MCM04": "Detailed-Views/MCM04 Sorter Destination, Chutes and Bypass",
|
||||
"MCM05": "Detailed-Views/MCM05 Sorter Destination and Chutes",
|
||||
}
|
||||
|
||||
|
||||
@ -1,710 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"font_size": ".57vmax"
|
||||
},
|
||||
"params": {},
|
||||
"propConfig": {
|
||||
"custom.font_size": {
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 149,
|
||||
"width": 423
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "160px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "Color Legend",
|
||||
"textStyle": {
|
||||
"paddingLeft": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_4"
|
||||
},
|
||||
"position": {
|
||||
"basis": "35px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#3B3B3B",
|
||||
"borderColor": "#CAC3C3",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "MHE Stopped"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "MHE is stopped (State2)"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state0"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 10,
|
||||
"marginRight": 5,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "MHE Running"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "MHE is running (State3)"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state5"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 10,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "45px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#3B3B3B",
|
||||
"borderColor": "#CAC3C3",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "Healthy"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state5"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 10,
|
||||
"marginRight": 5,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "Diagnostic"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "Diagnostic Information"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state4"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 10,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "Healthy, no active alarms"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "45px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#3B3B3B",
|
||||
"borderColor": "#CAC3C3",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "Low",
|
||||
"textStyle": {
|
||||
"color": "#000000"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "Running at reduced capacity"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state3"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 10,
|
||||
"marginRight": 5,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "Medium"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "Controlled stop"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state2"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 10,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "45px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#3B3B3B",
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderColor": "#CAC3C3",
|
||||
"borderStyle": "solid",
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"borderWidth": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 1
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "148px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"text": "High"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"sustain": 1500,
|
||||
"text": "Uncontrolled stop"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.backgroundColor": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.colours.state1"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 4,
|
||||
"borderBottomRightRadius": 4,
|
||||
"borderTopLeftRadius": 4,
|
||||
"borderTopRightRadius": 4,
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 10,
|
||||
"marginRight": 5,
|
||||
"marginTop": 1,
|
||||
"overflow": "hidden",
|
||||
"paddingLeft": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"draggable": true,
|
||||
"id": "K1uUHAix",
|
||||
"modal": true,
|
||||
"overlayDismiss": true,
|
||||
"resizable": true,
|
||||
"showCloseIcon": true,
|
||||
"title": "Legend",
|
||||
"type": "open",
|
||||
"viewPath": "PopUp-Views/Legend",
|
||||
"viewportBound": false
|
||||
},
|
||||
"scope": "C",
|
||||
"type": "popup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Button"
|
||||
},
|
||||
"position": {
|
||||
"basis": "168px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.textStyle.fontSize": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.font_size"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"image": {
|
||||
"icon": {
|
||||
"path": "material/legend_toggle"
|
||||
},
|
||||
"style": {
|
||||
"backgroundColor": "#555555"
|
||||
}
|
||||
},
|
||||
"justify": "start",
|
||||
"style": {
|
||||
"backgroundColor": "#555555",
|
||||
"paddingLeft": 8
|
||||
},
|
||||
"text": "DETAILS"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#555555",
|
||||
"marginBottom": 0,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 10,
|
||||
"marginTop": 1
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "45px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "#3B3B3B",
|
||||
"borderColor": "#CAC3C3",
|
||||
"borderStyle": "solid",
|
||||
"borderWidth": 1,
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer_6"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "Background-Styles/Controller"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 116 B |
@ -1,99 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"styleClass": "",
|
||||
"text": ""
|
||||
},
|
||||
"propConfig": {
|
||||
"params.styleClass": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.stylePath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.text}"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 40,
|
||||
"width": 210
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "TextInput"
|
||||
},
|
||||
"position": {
|
||||
"basis": "10px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.styleClass}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Input/Label/Valid_Entry",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "Input/Label/Invalid_Entry"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "Input/Label/Valid_Entry"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.text"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"placeholder": "Enter Value",
|
||||
"resize": "both",
|
||||
"style": {}
|
||||
},
|
||||
"type": "ia.input.text-area"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
@ -1,8 +1,8 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#FF0000",
|
||||
"priority": "High",
|
||||
"state": "EStopped"
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"directionLeft": false,
|
||||
|
Before Width: | Height: | Size: 78 B |
|
Before Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 67 KiB |
@ -1,687 +0,0 @@
|
||||
{
|
||||
"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": "LIFT_Symbol"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[1].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.elements[4].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.elements[4].elements[1].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,\n{view.custom.state} + 100 + {view.custom.isMatch},\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"
|
||||
},
|
||||
{
|
||||
"d": "M 2.5706316,14.829176 A 8.6886292,8.8029537 0 0 1 3.7045976,2.4348857 8.6886292,8.8029537 0 0 1 15.938255,3.5801235 8.6886292,8.8029537 0 0 1 14.811492,15.975088 8.6886292,8.8029537 0 0 1 2.5771713,14.837148",
|
||||
"fill": {},
|
||||
"id": "path392",
|
||||
"name": "path392",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"miterlimit": "4",
|
||||
"paint": "#000000",
|
||||
"width": "0.301"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 9.5390129,4.6864138 v 4.054911",
|
||||
"fill": {
|
||||
"paint": "#ffffff"
|
||||
},
|
||||
"id": "path5019",
|
||||
"name": "path5019",
|
||||
"stroke": {
|
||||
"width": "0.995"
|
||||
},
|
||||
"style": {
|
||||
"InkscapeStroke": "none",
|
||||
"color": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 9.4725388,4.3208071 V 10.203752",
|
||||
"fill": {
|
||||
"paint": "#ffffff"
|
||||
},
|
||||
"id": "path5287",
|
||||
"name": "path5287",
|
||||
"stroke": {
|
||||
"width": "0.264583"
|
||||
},
|
||||
"style": {
|
||||
"InkscapeStroke": "none",
|
||||
"color": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 5.5505752,8.3092441 H 12.962422 L 9.2349587,2.4863396 Z",
|
||||
"fill": {
|
||||
"opacity": "1"
|
||||
},
|
||||
"id": "path5305",
|
||||
"name": "path5305",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"linecap": "butt",
|
||||
"miterlimit": "4",
|
||||
"opacity": "1",
|
||||
"paint": "#000000",
|
||||
"width": "0.656167"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 5.5653282,10.042435 H 12.977175 L 9.2497117,15.865339 Z",
|
||||
"fill": {
|
||||
"opacity": "1"
|
||||
},
|
||||
"id": "path5305-1",
|
||||
"name": "path5305-1",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"linecap": "butt",
|
||||
"miterlimit": "4",
|
||||
"opacity": "1",
|
||||
"paint": "#000000",
|
||||
"width": "0.656167"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"id": "g5310",
|
||||
"name": "g5310",
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"style": {},
|
||||
"viewBox": "0 0 18.520832 18.520834"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@ -1,598 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"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.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": "SLAM"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].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": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 50.120001,25 C 50.827803,42.132141 31.110082,55.307098 15.552912,48.096988 -0.54598581,42.194727 -5.1724173,18.93609 7.4423281,7.3223305 18.432808,-4.6472699 39.878022,-1.2374264 47.061975,13.018775 49.062621,16.67345 50.124426,20.833557 50.120001,25 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1.5
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 18.74,8 c 4.25,0 8.5,0 12.75,0 0,0.5666667 0,1.1333333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.5666667 0,-1.1333333 0,-1.7 z m 0,2.68 c 4.25,0 8.5,0 12.75,0 0,0.566667 0,1.133333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.566667 0,-1.133333 0,-1.7 z m 0,2.69 c 4.25,0 8.5,0 12.75,0 0,0.566667 0,1.133333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.566667 0,-1.133333 0,-1.7 z m 0,2.679999 c 4.25,0 8.5,0 12.75,0 0,0.566667 0,1.133333 0,1.7 -4.25,0 -8.5,0 -12.75,0 0,-0.566667 0,-1.133333 0,-1.7 z M 31.5,18.73 c -0.426667,3.296667 -0.853333,6.593333 -1.28,9.89 -3.4,0 -6.8,0 -10.2,0 -0.423333,-3.296667 -0.846667,-6.593333 -1.27,-9.89 4.25,0 8.5,0 12.75,0 z m 0,13.39 c -0.426667,3.296667 -0.853333,6.593333 -1.28,9.89 -3.4,0 -6.8,0 -10.2,0 -0.423333,-3.296667 -0.846667,-6.593333 -1.27,-9.89 4.25,0 8.5,0 12.75,0 z",
|
||||
"fill": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 0.5
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 10.24,8 c 1.416667,0 2.833333,0 4.25,0 0,11.333333 0,22.666667 0,34 -1.416667,0 -2.833333,0 -4.25,0 0,-11.333333 0,-22.666667 0,-34 z m 4.25,12.75 c 7.083333,0 14.166667,0 21.25,0 0,0.566667 0,1.133333 0,1.7 -7.083333,0 -14.166667,0 -21.25,0 0,-0.566667 0,-1.133333 0,-1.7 z M 35.740002,8 c 1.416667,0 2.833333,0 4.25,0 0,11.333333 0,22.666667 0,34 -1.416667,0 -2.833333,0 -4.25,0 0,-11.333333 0,-22.666667 0,-34 z",
|
||||
"fill": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 0.5
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"transform": "matrix(0.98146771,0,0,0.97925914,0.29387469,0.4508585)",
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 51 51"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 793 B |
|
After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 81 B |
|
After Width: | Height: | Size: 153 KiB |
@ -80,7 +80,7 @@ def reset_highlights(self):
|
||||
|
||||
# 2. Close popup and docks
|
||||
system.perspective.closePopup(id="TagSearch")
|
||||
for dock_id in ["Docked-East-VFD", "Docked-East-MCM", "Docked-East-SNP", "Docked-East-EPC", "Docked-East-DS", "Docked-East-Extendo", "Docked-East-BTN", "Docked-East-SS-BTN"]:
|
||||
for dock_id in ["Docked-East-VFD", "Docked-East-MCM", "Docked-East-SNP"]:
|
||||
system.perspective.closeDock(dock_id)
|
||||
|
||||
# 3. Trigger CLEAR state via navigate to same view
|
||||
@ -149,4 +149,4 @@ def get_child_scada_projects():
|
||||
"""
|
||||
pattern = '[A-Z]{3}[0-9]|K[A-Z]{3}_SCADA'
|
||||
all_projects = system.project.getProjectNames()
|
||||
return sorted([x for x in all_projects if re.match(pattern, x)])
|
||||
return sorted([x for x in all_projects if re.match(pattern, x)])
|
||||
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 97 KiB |
@ -0,0 +1,280 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Dataset": [
|
||||
{
|
||||
"path": "Symbol-Views/Device-Views/DeviceStatus"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Device-Views/DeviceStatus_old"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Device-Views/Estop"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/ARSAW"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/AUS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Camera"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/ControlCabinet"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Estop"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/GoodsLift"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/JAM"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Light_Curtain"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Main_Panel"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Network"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Pointer"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PressureSwitch"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord_End"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord_Line"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/PullChord_Line_Vertical"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/RFID"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Robot"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SLAMs"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/SafetyGate"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Stacker_Destacker"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Status"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/StatusNonPowered"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/StatusNonPowered_NS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Status_NS"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/THEA"
|
||||
},
|
||||
{
|
||||
"path": "Symbol-Views/Equipment-Views/Test"
|
||||
}
|
||||
],
|
||||
"FilteredViews": [
|
||||
{
|
||||
"Name": "DeviceStatus",
|
||||
"Path": "Symbol-Views/Equipment-Views/DeviceStatus",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Button",
|
||||
"Path": "Symbol-Views/Equipment-Views/Button",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Camera",
|
||||
"Path": "Symbol-Views/Equipment-Views/Camera",
|
||||
"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": "THEA",
|
||||
"Path": "Symbol-Views/Equipment-Views/THEA",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Status",
|
||||
"Path": "Symbol-Views/Equipment-Views/Status",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "StatusNonPowered",
|
||||
"Path": "Symbol-Views/Equipment-Views/StatusNonPowered",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"custom": {
|
||||
"color": "#00FF00",
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Normal"
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
@ -1,503 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"disconnected": false,
|
||||
"plc": "value",
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"searchId": "PLC01",
|
||||
"state": 0,
|
||||
"state_string": "Normal"
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"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.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": 1,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Unknown",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "High"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "No active alarms"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.searchId": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.searchId"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": 1
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": 0
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.state_string": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\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": 10
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "PullChord_Line"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[0].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].visibility": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].stroke.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "#800000",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 1,
|
||||
"output": "#FF0000"
|
||||
},
|
||||
{
|
||||
"input": 0,
|
||||
"output": "#000000"
|
||||
}
|
||||
],
|
||||
"outputType": "color",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})"
|
||||
},
|
||||
"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": [
|
||||
{
|
||||
"d": "m 0.22819265,-0.5 c 0,33.992373 0,67.984747 0,101.97712",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 10.792046,-0.5 c 0,33.992373 0,67.984747 0,101.97712",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 5.5101192,-0.5 c 0,33.992373 0,67.984747 0,101.97712",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"opacity": 1,
|
||||
"stroke": {
|
||||
"dasharray": "8, 8, 8",
|
||||
"dashoffset": "\"20\"",
|
||||
"key": "\"2.15848\"",
|
||||
"miterlimit": "\"10\"",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"preserveAspectRatio": "none",
|
||||
"style": {},
|
||||
"viewBox": "-0.5 -0.5 12 102"
|
||||
},
|
||||
"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.state5},\r\n1,{session.custom.colours.state1},\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/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#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\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},\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}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.alarm_filter.show_safety"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"mode": "percent",
|
||||
"style": {
|
||||
"cursor": "pointer",
|
||||
"overflow": "visible"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,887 @@
|
||||
{
|
||||
"custom": {
|
||||
"dpm1-dpm2": false,
|
||||
"dpm2-dpm3": false,
|
||||
"dpm3-dpm4": false,
|
||||
"dpm4-dpm5": false,
|
||||
"dpm5-dpm6": false,
|
||||
"dpm6-mcm": false,
|
||||
"mcm-dpm1": false
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"DPM0_TAG",
|
||||
"DPM1_TAG",
|
||||
"DPM2_TAG",
|
||||
"DPM3_TAG",
|
||||
"DPM4_TAG",
|
||||
"DPM5_TAG",
|
||||
"DPM6_TAG"
|
||||
]
|
||||
},
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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}/STATE"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": false,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": true
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"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 = self.props.params.view\n\tself.session.custom.show_dpm_device_view = 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 = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "DPM01_VS01A"
|
||||
},
|
||||
"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/DPM01_VS01A"
|
||||
},
|
||||
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "DPM02_VS01A"
|
||||
},
|
||||
"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/DPM02_VS01A"
|
||||
},
|
||||
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "DPM03_VS01A"
|
||||
},
|
||||
"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/DPM03_VS01A"
|
||||
},
|
||||
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "DPM04_VS01A"
|
||||
},
|
||||
"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/DPM04_VS01A"
|
||||
},
|
||||
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "DPM05_VS01A"
|
||||
},
|
||||
"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/DPM05_VS01A"
|
||||
},
|
||||
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "DPM02_VS01C"
|
||||
},
|
||||
"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/DPM02_VS01C"
|
||||
},
|
||||
"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": "DPM01_VS01A 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": "DPM02_VS01A 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": "DPM03_VS01A 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": "DPM04_VS01A 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": "DPM05_VS01A 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": "DPM02_VS01C 11.200.1.7",
|
||||
"textStyle": {
|
||||
"fontSize": "1vmin"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = 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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 288 B |
@ -1,84 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"Hidden": true,
|
||||
"Name": "Planned_Stop_Or_Not_Used"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.Hidden": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
},
|
||||
"params.Name": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 37,
|
||||
"width": 200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ColumnSelect"
|
||||
},
|
||||
"position": {
|
||||
"basis": "36px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.selected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"bidirectional": true,
|
||||
"path": "view.params.Hidden"
|
||||
},
|
||||
"type": "property"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\t#Use previous value. If you\u0027re clicking -, you want to remove then toggle to +. Vice versa with clicking +.\n\tif getattr(previousValue, \u0027value\u0027, None) is not None:\n\t\tsystem.perspective.sendMessage(\u0027column-visibility\u0027, {str(self.view.params.Name): previousValue.value}, scope\u003d\u0027page\u0027)"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Name"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"checkedIcon": {
|
||||
"path": "material/add"
|
||||
},
|
||||
"indeterminateIcon": {
|
||||
"path": "material/add"
|
||||
},
|
||||
"style": {
|
||||
"fontSize": 12,
|
||||
"overflow": "visible"
|
||||
},
|
||||
"uncheckedIcon": {
|
||||
"path": "material/remove"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.checkbox"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 76 B |
@ -1,628 +0,0 @@
|
||||
{
|
||||
"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": "SLAM"
|
||||
},
|
||||
"position": {
|
||||
"height": 1,
|
||||
"width": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.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": [
|
||||
{
|
||||
"d": "M 25.072251,49.491677 C 8.305025,50.18642 -4.5893078,30.832553 2.4672281,15.562464 8.2437711,-0.23935905 31.006999,-4.7804171 42.373386,7.6015452 54.088036,18.389216 50.750821,39.438697 36.798277,46.490083 33.221446,48.453809 29.149949,49.49602 25.072251,49.491677 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 1.5
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 25.27,19.376563 c -3.799453,0.197118 -4.03784,-6.218759 0,-6.053125 3.946982,-0.08033 3.946979,6.133451 0,6.053125 z m 7,0 c -3.799453,0.197118 -4.03784,-6.218759 0,-6.053125 3.946982,-0.08033 3.946979,6.133451 0,6.053125 z m -0.240001,-0.316562 c 0,2.383333 0,4.766667 0,7.15 -2.173333,0 -4.346667,0 -6.52,0 0,-2.383333 0,-4.766667 0,-7.15 2.173333,0 4.346667,0 6.52,0 z M 17.07,23.24 c 0,4.116667 0,8.233333 0,12.35 -0.666667,0 -1.333333,0 -2,0 0,-4.116667 0,-8.233333 0,-12.35 0.666667,0 1.333333,0 2,0 z m 25.119999,4.220001 c 0,1.3 0,2.6 0,3.9 -8.69,0 -17.38,0 -26.07,0 0,-1.3 0,-2.6 0,-3.9 8.69,0 17.38,0 26.07,0 z M 12.079999,8.75 c 0,10.833333 0,21.666667 0,32.5 -1.086667,0 -2.173333,0 -3.26,0 0,-10.833333 0,-21.666667 0,-32.5 1.086667,0 2.173333,0 3.26,0 z",
|
||||
"fill": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 0.5
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 51 51"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "SLAMs"
|
||||
},
|
||||
"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/SLAMs"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 223 B |
@ -1,227 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[0]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[1]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[2]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[3]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[4]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[5]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[6]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[7]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[8]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps[9]": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 40,
|
||||
"width": 40
|
||||
},
|
||||
"styles": "value"
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Icon"
|
||||
},
|
||||
"position": {
|
||||
"basis": "264px"
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({parent.custom.state}\u003d1||{parent.custom.covert_mode}||{parent.custom.isMatch}\u003e0,true,false)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.custom.ref_state}"
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "EmergencyStop-Styles/EstopDeactivated",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": 0,
|
||||
"output": "EmergencyStop-Styles/EstopDeactivated"
|
||||
},
|
||||
{
|
||||
"input": 1,
|
||||
"output": "EmergencyStop-Styles/EstopActivated"
|
||||
},
|
||||
{
|
||||
"input": 101,
|
||||
"output": "EmergencyStop-Styles/EstopActivated101"
|
||||
},
|
||||
{
|
||||
"input": 100,
|
||||
"output": "EmergencyStop-Styles/EstopDeactivated100"
|
||||
}
|
||||
],
|
||||
"outputType": "style-list",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "material/lens"
|
||||
},
|
||||
"type": "ia.display.icon"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"status": "value"
|
||||
},
|
||||
"events": {
|
||||
"dom": {
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"DevicePopUP\", \"PopUp-Views/Device/Information-Device\", params \u003d{\"tagProps\":tagProps},resizable \u003d 1)\n\t"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.alarm_active": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.IsActive"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.alarm_shelved": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"1": "{view.params.tagProps[1]}"
|
||||
},
|
||||
"tagPath": "{0}/Alarms/{1}.IsShelved"
|
||||
},
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.covert_mode": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "session.custom.covert"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"custom.isMatch": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.deviceSearchId} \u003d {this.custom.search_path},1,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tif currentValue.value \u003d\u003d 1:\n\t\tself.print(self.custom.search_path)\n\t\tself.session.custom.searchId \u003d \"\""
|
||||
},
|
||||
"persistent": false
|
||||
},
|
||||
"custom.ref_state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d1,101,\nif({this.custom.state}\u003d1 \u0026\u0026 {this.custom.isMatch}\u003d0,1,\nif({this.custom.state}\u003d0 \u0026\u0026 {this.custom.isMatch}\u003d1,100,0)))"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.search_path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.tagProps[0]}+\"/\"+{view.params.tagProps[1]}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"custom.state": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({this.custom.alarm_shelved}\u003dTrue,0,\nif({this.custom.alarm_active}\u003dTrue,1,0))"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 327 B |
|
After Width: | Height: | Size: 45 KiB |
@ -1,147 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"SelectAll": null
|
||||
},
|
||||
"params": {
|
||||
"Columns": {
|
||||
"ETag": false,
|
||||
"Filename": true,
|
||||
"Key": false,
|
||||
"Last Updated": true,
|
||||
"Size (bytes)": true,
|
||||
"Storage Class": false
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.SelectAll": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Columns"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tshow_all \u003d True\n\tif len(value) \u003e 0:\n\t\thidden_count \u003d 0\t\t\n\t\tfor column in value:\n\t\t\tif not column[\u0027Hidden\u0027]:\n\t\t\t\tshow_all \u003d False\n\t\t\t\thidden_count +\u003d 1\n\t\tif show_all and hidden_count !\u003d len(value):\n\t\t\tshow_all \u003d None\n\treturn show_all",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.Columns": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 224,
|
||||
"width": 450
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Title"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"marginTop": 5,
|
||||
"textAlign": "center",
|
||||
"textDecoration": "underline"
|
||||
},
|
||||
"text": "Hide/Unhide Columns"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "SelectAllCheck"
|
||||
},
|
||||
"position": {
|
||||
"basis": "36px",
|
||||
"display": false
|
||||
},
|
||||
"propConfig": {
|
||||
"props.selected": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.SelectAll"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "IF(!isNull({view.custom.SelectAll}), IF({view.custom.SelectAll}, \u0027Hide All\u0027, \u0027Show All\u0027), \u0027Hide/Show All\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.input.checkbox"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ColumnTiles"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.Columns"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tcolumns \u003d []\n\tif len(value.keys()) \u003e 0:\n\t\tfor column in value:\n\t\t\tnew_instance \u003d {\n\t\t\t\t\u0027Name\u0027: column,\n\t\t\t\t#If not hidden, show Add (+) sign\n\t\t\t\t\u0027Hidden\u0027: not value[column]\n\t\t\t}\n\t\t\tcolumns.append(new_instance)\n\treturn columns",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"alignContent": "flex-start",
|
||||
"alignItems": "flex-start",
|
||||
"justify": "center",
|
||||
"path": "Objects/PowerTable/ColumnSelectionTile",
|
||||
"style": {
|
||||
"marginBottom": 5,
|
||||
"marginLeft": 5,
|
||||
"marginRight": 5,
|
||||
"marginTop": 5
|
||||
},
|
||||
"wrap": "wrap"
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"borderBottomLeftRadius": 20,
|
||||
"borderBottomRightRadius": 20,
|
||||
"borderTopRightRadius": 20
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -1,571 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"covert_mode": true,
|
||||
"display_icon": true,
|
||||
"error": false,
|
||||
"isMatch": 0,
|
||||
"priority": 0,
|
||||
"priority_string": "No active alarms",
|
||||
"running": false,
|
||||
"searchId": "value",
|
||||
"show_error": false,
|
||||
"show_running": true,
|
||||
"state": 5,
|
||||
"state_string": "Unknown",
|
||||
"visible_status": false
|
||||
},
|
||||
"params": {
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"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.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.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"
|
||||
}
|
||||
},
|
||||
"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} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\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
|
||||
},
|
||||
"custom.visible_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.state} !\u003d 5"
|
||||
},
|
||||
"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": 79,
|
||||
"width": 49
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "pointer_symbol_3"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.elements[1].elements[0].elements[0].elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \n{session.custom.colours}[\"Fallback\"],\n{session.custom.colours}[\"state\"+{value}])",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"id": "defs2",
|
||||
"name": "defs2",
|
||||
"type": "defs"
|
||||
},
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"d": "m 10.648338,6.5392075 c 0,2.2076808 -1.7019291,4.4141715 -3.90961,4.4141715 -2.2076807,0 -4.0851094,-2.2064908 -4.0851094,-4.4141715 -1e-7,-2.2076807 1.7896788,-3.9973596 3.9973595,-3.9973596 2.2076809,-2e-7 3.9973599,1.7896787 3.9973599,3.9973596 z",
|
||||
"fill": {
|
||||
"opacity": "1",
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path7858",
|
||||
"name": "path7858",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"opacity": "1",
|
||||
"paint": "#000000",
|
||||
"width": "0.523875"
|
||||
},
|
||||
"style": {
|
||||
"color": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "m 6.6503906,0.5703125 c -3.2732983,0 -5.96874998,2.6954516 -5.96874998,5.96875 0,3.2732984 6.23199968,11.0143705 6.23199968,11.0143705 0,0 5.7055007,-7.7410721 5.7055007,-11.0143705 0,-3.2732984 -2.695452,-5.96875 -5.9687504,-5.96875 z m 0,3.9433594 c 1.1420587,0 2.0253907,0.883332 2.0253907,2.0253906 0,1.1420586 -0.883332,2.0253906 -2.0253907,2.0253906 C 5.508332,8.5644531 4.625,7.6811211 4.625,6.5390625 4.625,5.3970039 5.508332,4.5136719 6.6503906,4.5136719 Z",
|
||||
"fill": {
|
||||
"opacity": "1"
|
||||
},
|
||||
"id": "path7860",
|
||||
"name": "path7860",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"opacity": "1",
|
||||
"paint": "#000000",
|
||||
"width": "0.523875"
|
||||
},
|
||||
"style": {
|
||||
"color": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"fill": {
|
||||
"opacity": "1",
|
||||
"paint": "transparent"
|
||||
},
|
||||
"id": "path7854",
|
||||
"name": "path7854",
|
||||
"stroke": {
|
||||
"dasharray": "none",
|
||||
"opacity": "1",
|
||||
"paint": "#000000",
|
||||
"width": "0.523875"
|
||||
},
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"id": "path4106",
|
||||
"name": "path4106",
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"id": "layer1",
|
||||
"name": "layer1",
|
||||
"type": "group"
|
||||
}
|
||||
],
|
||||
"viewBox": "0 0 13.229166 18.520834"
|
||||
},
|
||||
"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(isNull({view.custom.alarm_message}),\n\"Source Id: \" + {view.params.tagProps[0]} + \n\", Priority: \" + {view.custom.priority_string} + \n\", State: \" + {view.custom.state_string},\n\"Source Id: \" + {view.params.tagProps[0]} + \n\", Alarm: \" + {view.custom.alarm_message} +\n\", Priority: \" + {view.custom.priority_string} + \n\", State: \" + {view.custom.state_string})"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
},
|
||||
"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": {
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"color": "#90EE90",
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Enabled Not Running"
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"angle": 0,
|
||||
|
Before Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
@ -1,888 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"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,
|
||||
"searchId": "value",
|
||||
"show_error": false,
|
||||
"show_running": true,
|
||||
"state": 5,
|
||||
"state_string": "Unknown",
|
||||
"visible_status": false
|
||||
},
|
||||
"params": {
|
||||
"directionDown": false,
|
||||
"forceFaultStatus": null,
|
||||
"forceRunningStatus": null,
|
||||
"tagProps": [
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"propConfig": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"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} || {view.custom.isMatch}\u003e0,\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic} || {view.custom.isMatch}\u003e0,\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
|
||||
},
|
||||
"custom.visible_status": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.state} !\u003d 5"
|
||||
},
|
||||
"type": "expr"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.directionDown": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceFaultStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.forceRunningStatus": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 29,
|
||||
"width": 20
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ErrorStatus",
|
||||
"tooltip": {
|
||||
"style": {
|
||||
"fontSize": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionDown}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026! {view.params.directionDown} \u0026\u0026 {view.custom.show_error}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].stroke.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.alarm_filter.show_running},2,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\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\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.priority"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 31,26 C 41,36 51,46 61,56 51,66 41,76 31,86 21,76 11,66 1,56 11,46 21,36 31,26 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 61,50 C 61,43.346667 61,36.693333 61,30.04 51,20.026667 41,10.013333 31,0 21,10.013333 11,20.026667 1,30.04 1,36.693333 1,43.346667 1,50 11,40.013333 21,30.026667 31,20.04 41,30.026667 51,40.013333 61,50 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": 42,
|
||||
"fontWeight": "bolder"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 20,
|
||||
"y": 70
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 64 89"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ErrorStatus_Down"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionDown}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.display_icon} \u0026\u0026 {view.custom.error} \u0026\u0026 {view.params.directionDown} \u0026\u0026 {view.custom.show_error}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours}[\"state\"+{value}] \u003d null, \r\n{session.custom.colours}[\"Fallback\"],\r\n{session.custom.colours}[\"state\"+{value}])",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[1].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({view.custom.show_running}, \"#FFFFFF\", \"#00000000\")"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[1].stroke.width": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if({session.custom.alarm_filter.show_running},2,0)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[2].fill": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.state"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({session.custom.colours.colour_impaired}, \r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#FFFFFF\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#000000\u0027,\r\n\t\t\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\t\u0027#000000\u0027)\r\n\t)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.elements[2].text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.priority"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 32,2 C 42,12 52,22 62,32 52,42 42,52 32,62 22,52 12,42 2,32 12,22 22,12 32,2 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000",
|
||||
"width": 2
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"d": "M 2,38 C 2,44.653333 2,51.306667 2,57.96 12,67.973333 22,77.986667 32,88 42,77.986667 52,67.973333 62,57.96 62,51.306667 62,44.653333 62,38 52,47.986667 42,57.973333 32,67.96 22,57.973333 12,47.986667 2,38 Z",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#000000"
|
||||
},
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"style": {
|
||||
"classes": "",
|
||||
"fontSize": 42,
|
||||
"fontWeight": "bolder",
|
||||
"textOrientation": "upright",
|
||||
"writingMode": "horizontal-tb"
|
||||
},
|
||||
"type": "text",
|
||||
"x": 20,
|
||||
"y": 44.5
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 65 89"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026! {view.params.directionDown},True,False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 0,70 C 0,56.666667 0,43.333333 0,30 10,20 20,10 30,0 40,10 50,20 60,30 60,43.333333 60,56.666667 60,70 50,60 40,50 30,40 20,50 10,60 0,70 Z",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 3
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 61 71"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus_Down"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if((({view.custom.display_icon} \u0026\u0026 !{view.custom.error}) || ({view.custom.show_running} \u0026! {view.custom.show_error})) \u0026\u0026 {view.params.directionDown},True,False)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"position.rotate.angle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.directionLeft"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "m 60,0 c 0,13.333333 0,26.666667 0,40 C 50,50 40,60 30,70 20,60 10,50 0,40 0,26.666667 0,13.333333 0,0 10,10 20,20 30,30 40,20 50,10 60,0 Z",
|
||||
"fill": {
|
||||
"paint": "#FFFFFF"
|
||||
},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": 3
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-0.5 -0.5 61 71"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"meta.visible": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.display_icon"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "solid"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "none"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"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": {
|
||||
"direction": "column",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"borderColor": "#FF0000",
|
||||
"borderWidth": "2px",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@ -7,9 +7,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1754654771271
|
||||
1754393666432
|
||||
],
|
||||
"$ts": 1754654771271
|
||||
"$ts": 1754393666432
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -289,7 +289,7 @@
|
||||
"$": [
|
||||
"ds",
|
||||
192,
|
||||
1754654771334
|
||||
1754393747032
|
||||
],
|
||||
"$columns": [
|
||||
{
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 737 B |
@ -9,8 +9,8 @@
|
||||
"MCM06",
|
||||
"MCM07"
|
||||
],
|
||||
"color": "#00FF00",
|
||||
"state": "Running"
|
||||
"color": "#C2C2C2",
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"tagProps": [
|
||||
@ -2602,7 +2602,6 @@
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"currentTabIndex": 2,
|
||||
"menuType": "modern",
|
||||
"tabSize": {
|
||||
"width": 1000
|
||||
@ -0,0 +1,644 @@
|
||||
{
|
||||
"custom": {
|
||||
"alarm_message": null,
|
||||
"color": "#C2C2C2",
|
||||
"priority": "No Active Alarms",
|
||||
"state": "Closed"
|
||||
},
|
||||
"params": {
|
||||
"angle": 0,
|
||||
"directionLeft": false,
|
||||
"tagProps": [
|
||||
"System/MCM01/Conveyor/VFD/UL1_3_VFD1",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"input": 49,
|
||||
"output": "Tipper Faulted"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"params.angle": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.directionLeft": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagProps": {
|
||||
"paramDirection": "inout",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 20,
|
||||
"width": 29
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "RunningStatus"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)"
|
||||
},
|
||||
"enabled": false,
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.elements[0].fill.paint": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.style.transform": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"0": "{view.params.tagProps[0]}",
|
||||
"fc": "{session.custom.fc}"
|
||||
},
|
||||
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},{view.params.forceFaultStatus},\"\")",
|
||||
"type": "expression"
|
||||
},
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "scaleX(-1)"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"elements": [
|
||||
{
|
||||
"d": "M 5 15 L 45 15 L 60 25 L 60 55 L 20 55 L 5 45 Z M 5 15 L 15 5 L 55 5 L 60 25 M 45 15 L 55 5",
|
||||
"fill": {},
|
||||
"name": "path",
|
||||
"stroke": {
|
||||
"paint": "#4c4c4c",
|
||||
"width": "2"
|
||||
},
|
||||
"type": "path"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"viewBox": "-1.5 -1.5 73 63"
|
||||
},
|
||||
"type": "ia.shapes.svg"
|
||||
}
|
||||
],
|
||||
"events": {
|
||||
"dom": {
|
||||
"onClick": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openDock(\u0027Docked-Eas-TPR\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onDoubleClick": {
|
||||
"config": {
|
||||
"script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t"
|
||||
},
|
||||
"enabled": false,
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
},
|
||||
"onMouseEnter": {
|
||||
"config": {
|
||||
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root",
|
||||
"tooltip": {
|
||||
"enabled": true,
|
||||
"location": "top-left",
|
||||
"style": {}
|
||||
}
|
||||
},
|
||||
"propConfig": {
|
||||
"meta.tooltip.style.classes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.priority}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "Alarms-Styles/NoAlarm",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "High",
|
||||
"output": "Alarms-Styles/High"
|
||||
},
|
||||
{
|
||||
"input": "Medium",
|
||||
"output": "Alarms-Styles/Medium"
|
||||
},
|
||||
{
|
||||
"input": "Low",
|
||||
"output": "Alarms-Styles/Low"
|
||||
},
|
||||
{
|
||||
"input": "Diagnostic",
|
||||
"output": "Alarms-Styles/Diagnostic"
|
||||
}
|
||||
],
|
||||
"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_running"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.style.borderStyle": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.disconnected"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": "",
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": true,
|
||||
"output": "solid"
|
||||
},
|
||||
{
|
||||
"input": false,
|
||||
"output": "none"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"borderColor": "#FF0000",
|
||||
"borderStyle": "none",
|
||||
"borderWidth": "2px",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
@ -1,228 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"custom": {
|
||||
"Devices": [
|
||||
"PLC01",
|
||||
"PLC02",
|
||||
"PLC03",
|
||||
"PLC06",
|
||||
"PLC07",
|
||||
"PLC08",
|
||||
"PLC09",
|
||||
"PLC13",
|
||||
"PLC14",
|
||||
"PLC15",
|
||||
"PLC16",
|
||||
"PLC20",
|
||||
"PLC21",
|
||||
"PLC22",
|
||||
"PLC23",
|
||||
"PLC25",
|
||||
"PLC26",
|
||||
"PLC27",
|
||||
"PLC28",
|
||||
"PLC29",
|
||||
"PLC30",
|
||||
"PLC31",
|
||||
"PLC32",
|
||||
"PLC40",
|
||||
"PLC41",
|
||||
"PLC42",
|
||||
"PLC43",
|
||||
"PLC47",
|
||||
"PLC48",
|
||||
"PLC49",
|
||||
"PLC51",
|
||||
"PLC52",
|
||||
"PLC60",
|
||||
"PLC64",
|
||||
"PLC65",
|
||||
"PLC66",
|
||||
"PLC69",
|
||||
"PLC70",
|
||||
"PLC71",
|
||||
"PLC80",
|
||||
"PLC96",
|
||||
"PLC97",
|
||||
"PLC99",
|
||||
"ARSAW1301",
|
||||
"ARSAW1302",
|
||||
"ARSAW1303",
|
||||
"ARSAW1304",
|
||||
"ARSAW1305",
|
||||
"ARSAW1306",
|
||||
"ARSAW1307",
|
||||
"ARSAW1401",
|
||||
"ARSAW1402",
|
||||
"ARSAW1403",
|
||||
"ARSAW1404",
|
||||
"ARSAW1405",
|
||||
"ARSAW1406",
|
||||
"ARSAW1407",
|
||||
"ARSAW1501",
|
||||
"ARSAW1502",
|
||||
"ARSAW1503",
|
||||
"ARSAW1504",
|
||||
"ARSAW1505",
|
||||
"ARSAW1506",
|
||||
"ARSAW1507",
|
||||
"ARSAW1601",
|
||||
"ARSAW1602",
|
||||
"ARSAW1603",
|
||||
"ARSAW1604",
|
||||
"ARSAW1605",
|
||||
"ARSAW1606",
|
||||
"ARSAW1607",
|
||||
"FSC10",
|
||||
"SLAM301",
|
||||
"SLAM302",
|
||||
"SLAM303",
|
||||
"SLAM304",
|
||||
"SLAM305",
|
||||
"SLAM306",
|
||||
"SLAM307",
|
||||
"SLAM402",
|
||||
"SLAM401",
|
||||
"RWC4"
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"position": {
|
||||
"basis": "1080px"
|
||||
},
|
||||
"props": {
|
||||
"alignContent": "flex-start",
|
||||
"alignItems": "flex-start",
|
||||
"elementPosition": {
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"tagProps": [
|
||||
"PLC01",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"tagProps": [
|
||||
"PLC02",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"tagProps": [
|
||||
"PLC03",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": "",
|
||||
"margin": "5px"
|
||||
},
|
||||
"tagProps": [
|
||||
"PLC09",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
],
|
||||
"path": "Symbol-Views/Controller-Views/CommandControl",
|
||||
"style": {
|
||||
"overflow": "visible"
|
||||
},
|
||||
"wrap": "wrap"
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"Devices": [
|
||||
"PLC01",
|
||||
"PLC02",
|
||||
"PLC03",
|
||||
"PLC09"
|
||||
],
|
||||
"count": "value",
|
||||
"delay": 4000
|
||||
},
|
||||
"events": {
|
||||
"system": {
|
||||
"onStartup": {
|
||||
"config": {
|
||||
"script": "\tfc \u003d system.tag.readBlocking([\"Configuration/FC\"])\n\ttag_provider \u003d \"[%s_SCADA_TAG_PROVIDER]\" % (fc[0].value)\n\ttags_to_read \u003d system.tag.readBlocking([tag_provider+\"Configuration/DetailedViews\"])\n\tdevices \u003d system.util.jsonDecode(tags_to_read[0].value)\n\tif devices:\n\t\tinstances \u003d []\n\t\tdashboard_devices \u003d []\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\tdashboard_devices.append(i)\n\t\t\t\tinstances.append({\n\t\t\t\t \"instanceStyle\": {\n\t\t\t\t \"classes\": \"\",\n\t\t\t\t \"margin\": \"5px\"\n\t\t\t\t },\n\t\t\t\t \"instancePosition\": {},\n\t\t\t\t \"tagProps\": [\n\t\t\t\t i,\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\",\n\t\t\t\t \"value\"\n\t\t\t\t ]\n\t\t\t\t })\n\t\tsystem.perspective.print(instances)\n\t\tself.custom.Devices \u003d dashboard_devices\n\t\tself.getChild(\"FlexRepeater\").props.instances \u003d instances"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 59 KiB |