299 lines
13 KiB
Plaintext
299 lines
13 KiB
Plaintext
{
|
|
"custom": {
|
|
"AlarmSeverity": {
|
|
"prov": 3
|
|
},
|
|
"CRAH_tagPaths": [],
|
|
"data": [
|
|
"[Ignition_SATB1_IO1_default]ER1242/SATB1_P1_1_ER1242_CRAH_01",
|
|
"[Ignition_SATB1_IO1_default]ER1242/SATB1_P1_1_ER1242_CRAH_02",
|
|
"[Ignition_SATB1_IO1_default]ER1243/SATB1_P1_2_ER1243_CRAH_01",
|
|
"[Ignition_SATB1_IO1_default]ER1243/SATB1_P1_2_ER1243_CRAH_02",
|
|
"[Ignition_SATB1_IO1_default]ER1244/SATB1_P1_3_ER1244_CRAH_01",
|
|
"[Ignition_SATB1_IO1_default]ER1244/SATB1_P1_3_ER1244_CRAH_02",
|
|
"[Ignition_SATB1_IO1_default]ER1245/SATB1_P1_4_ER1245_CRAH_01",
|
|
"[Ignition_SATB1_IO1_default]ER1245/SATB1_P1_4_ER1245_CRAH_02",
|
|
"[Ignition_SATB1_IO1_default]ER1246/SATB1_P1_5_ER1246_CRAH_01",
|
|
"[Ignition_SATB1_IO1_default]ER1246/SATB1_P1_5_ER1246_CRAH_02",
|
|
"[Ignition_SATB1_IO2_default]ER1248/SATB1_P2_1_ER1248_CRAH_01",
|
|
"[Ignition_SATB1_IO2_default]ER1248/SATB1_P2_1_ER1248_CRAH_02",
|
|
"[Ignition_SATB1_IO2_default]ER1249/SATB1_P2_2_ER1249_CRAH_01",
|
|
"[Ignition_SATB1_IO2_default]ER1249/SATB1_P2_2_ER1249_CRAH_02",
|
|
"[Ignition_SATB1_IO2_default]ER1250/SATB1_P2_3_ER1250_CRAH_01",
|
|
"[Ignition_SATB1_IO2_default]ER1250/SATB1_P2_3_ER1250_CRAH_02",
|
|
"[Ignition_SATB1_IO2_default]ER1251/SATB1_P2_4_ER1251_CRAH_01",
|
|
"[Ignition_SATB1_IO2_default]ER1251/SATB1_P2_4_ER1251_CRAH_02",
|
|
"[Ignition_SATB1_IO2_default]ER1252/SATB1_P2_5_ER1252_CRAH_01",
|
|
"[Ignition_SATB1_IO2_default]ER1252/SATB1_P2_5_ER1252_CRAH_02",
|
|
"[Ignition_SATB1_IO3_default]ER1155/SATB1_P3_1_ER1155_CRAH_01",
|
|
"[Ignition_SATB1_IO3_default]ER1155/SATB1_P3_1_ER1155_CRAH_02",
|
|
"[Ignition_SATB1_IO3_default]ER1156/SATB1_P3_2_ER1156_CRAH_01",
|
|
"[Ignition_SATB1_IO3_default]ER1156/SATB1_P3_2_ER1156_CRAH_02",
|
|
"[Ignition_SATB1_IO3_default]ER1157/SATB1_P3_3_ER1157_CRAH_01",
|
|
"[Ignition_SATB1_IO3_default]ER1157/SATB1_P3_3_ER1157_CRAH_02",
|
|
"[Ignition_SATB1_IO3_default]ER1158/SATB1_P3_4_ER1158_CRAH_01",
|
|
"[Ignition_SATB1_IO3_default]ER1158/SATB1_P3_4_ER1158_CRAH_02",
|
|
"[Ignition_SATB1_IO3_default]ER1159/SATB1_P3_5_ER1159_CRAH_01",
|
|
"[Ignition_SATB1_IO3_default]ER1159/SATB1_P3_5_ER1159_CRAH_02",
|
|
"[Ignition_SATB1_IO4_default]ER1254/SATB1_P4_1_ER1254_CRAH_01",
|
|
"[Ignition_SATB1_IO4_default]ER1254/SATB1_P4_1_ER1254_CRAH_02",
|
|
"[Ignition_SATB1_IO4_default]ER1255/SATB1_P4_2_ER1255_CRAH_01",
|
|
"[Ignition_SATB1_IO4_default]ER1255/SATB1_P4_2_ER1255_CRAH_02",
|
|
"[Ignition_SATB1_IO4_default]ER1256/SATB1_P4_3_ER1256_CRAH_01",
|
|
"[Ignition_SATB1_IO4_default]ER1256/SATB1_P4_3_ER1256_CRAH_02",
|
|
"[Ignition_SATB1_IO4_default]ER1257/SATB1_P4_4_ER1257_CRAH_01",
|
|
"[Ignition_SATB1_IO4_default]ER1257/SATB1_P4_4_ER1257_CRAH_02",
|
|
"[Ignition_SATB1_IO4_default]ER1258/SATB1_P4_5_ER1258_CRAH_01",
|
|
"[Ignition_SATB1_IO4_default]ER1258/SATB1_P4_5_ER1258_CRAH_02",
|
|
"[Ignition_SATB1_IO5_default]ER1161/SATB1_P5_1_ER1161_CRAH_01",
|
|
"[Ignition_SATB1_IO5_default]ER1161/SATB1_P5_1_ER1161_CRAH_02",
|
|
"[Ignition_SATB1_IO5_default]ER1162/SATB1_P5_2_ER1162_CRAH_01",
|
|
"[Ignition_SATB1_IO5_default]ER1162/SATB1_P5_2_ER1162_CRAH_02",
|
|
"[Ignition_SATB1_IO5_default]ER1163/SATB1_P5_3_ER1163_CRAH_01",
|
|
"[Ignition_SATB1_IO5_default]ER1163/SATB1_P5_3_ER1163_CRAH_02",
|
|
"[Ignition_SATB1_IO5_default]ER1164/SATB1_P5_4_EL1164_CRAH_01",
|
|
"[Ignition_SATB1_IO5_default]ER1164/SATB1_P5_4_EL1164_CRAH_02",
|
|
"[Ignition_SATB1_IO5_default]ER1165/SATB1_P5_5_EL1165_CRAH_01",
|
|
"[Ignition_SATB1_IO5_default]ER1165/SATB1_P5_5_EL1165_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]ER1151/SATB1_HS1_ER1151_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]ER1151/SATB1_HS1_ER1151_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]IDF1263/SATB1_IDF1263_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]IDF1263/SATB1_IDF1263_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]IDF1273/SATB1_IDF1273_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]IDF1273/SATB1_IDF1273_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]MPR1150/SATB1_M5_6_MPR1150_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]MPR1150/SATB1_M5_6_MPR1150_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]MPR1240/SATB1_M1_2_MPR1240_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]MPR1240/SATB1_M1_2_MPR1240_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]MPR1241/SATB1_M3_4_MPR1241_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]MPR1241/SATB1_M3_4_MPR1241_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]MPR1247/SATB1_M7_8_MPR1247_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]MPR1247/SATB1_M7_8_MPR1247_CRAH_02",
|
|
"[Ignition_Common_IO_Gtwy]MR1253/SATB1_HS2_MR1253_CRAH_01",
|
|
"[Ignition_Common_IO_Gtwy]MR1253/SATB1_HS2_MR1253_CRAH_02"
|
|
],
|
|
"key": "[Ignition_SATB1_IO1_default]ER1242/SATB1_P1_1_ER1242_CRAH_01",
|
|
"key_1": null,
|
|
"selectedRoom": "MPR1150",
|
|
"tagPath": [
|
|
"[Ignition_SATB1_IO1_default]",
|
|
"[Ignition_SATB1_IO2_default]",
|
|
"[Ignition_SATB1_IO3_default]",
|
|
"[Ignition_SATB1_IO4_default]",
|
|
"[Ignition_SATB1_IO5_default]",
|
|
"[Ignition_Common_IO_Gtwy]"
|
|
]
|
|
},
|
|
"params": {},
|
|
"propConfig": {
|
|
"custom.AlarmSeverity": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"paths": "{view.custom.data}",
|
|
"time": "now(5000)"
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\toutput \u003d []\n\ttags \u003d value[\u0027paths\u0027]\n\tfor tag in tags:\n\t\taggAlarmStatus \u003d system.tag.readBlocking([tag+\"/AlarmSummary/ActiveAlarms\"])[0].value\n\t\treturn aggAlarmStatus\n\t\tmaxState \u003d 0\n\t\tfor v in aggAlarmStatus:\n\t\t\tmaxState \u003d v if v \u003e maxState else maxState\n\t\toutput.append(maxState)\n\treturn output",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.CRAH_tagPaths": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"selected": "{view.custom.selectedRoom}"
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\tselected \u003d value[\"selected\"]\n\tproviders \u003d {\n\t\t\t\t\"MPR1240\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"MPR1241\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"MPR1247\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"MPR1150\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"ER1151\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"MR1253\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"IDF1263\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\"IDF1273\":\"[Ignition_Common_IO_Gtwy]\",\n\t\t\t\t\n\t\t\t\t\"ER1242\":\"[Ignition_SATB1_IO1_default]\",\n\t\t\t\t\"ER1243\":\"[Ignition_SATB1_IO1_default]\",\n\t\t\t\t\"ER1244\":\"[Ignition_SATB1_IO1_default]\",\n\t\t\t\t\"ER1245\":\"[Ignition_SATB1_IO1_default]\",\n\t\t\t\t\"ER1246\":\"[Ignition_SATB1_IO1_default]\",\n\t\t\t\t\n\t\t\t\t\"ER1248\":\"[Ignition_SATB1_IO2_default]\",\n\t\t\t\t\"ER1249\":\"[Ignition_SATB1_IO2_default]\",\n\t\t\t\t\"ER1250\":\"[Ignition_SATB1_IO2_default]\",\n\t\t\t\t\"ER1251\":\"[Ignition_SATB1_IO2_default]\",\n\t\t\t\t\"ER1252\":\"[Ignition_SATB1_IO2_default]\",\n\t\t\t\t\n\t\t\t\t\"ER1155\":\"[Ignition_SATB1_IO3_default]\",\n\t\t\t\t\"ER1156\":\"[Ignition_SATB1_IO3_default]\",\n\t\t\t\t\"ER1157\":\"[Ignition_SATB1_IO3_default]\",\n\t\t\t\t\"ER1158\":\"[Ignition_SATB1_IO3_default]\",\n\t\t\t\t\"ER1159\":\"[Ignition_SATB1_IO3_default]\",\n\t\t\t\t\n\t\t\t\t\"ER1254\":\"[Ignition_SATB1_IO4_default]\",\n\t\t\t\t\"ER1255\":\"[Ignition_SATB1_IO4_default]\",\n\t\t\t\t\"ER1256\":\"[Ignition_SATB1_IO4_default]\",\n\t\t\t\t\"ER1257\":\"[Ignition_SATB1_IO4_default]\",\n\t\t\t\t\"ER1258\":\"[Ignition_SATB1_IO4_default]\",\n\t\t\t\t\n\t\t\t\t\"ER1161\":\"[Ignition_SATB1_IO5_default]\",\n\t\t\t\t\"ER1162\":\"[Ignition_SATB1_IO5_default]\",\n\t\t\t\t\"ER1163\":\"[Ignition_SATB1_IO5_default]\",\n\t\t\t\t\"ER1164\":\"[Ignition_SATB1_IO5_default]\",\n\t\t\t\t\"ER1165\":\"[Ignition_SATB1_IO5_default]\",\n\t\t\t\t}\n\t\n\tpath \u003d providers[selected] + \u0027/\u0027 + selected\n\ttags \u003d system.tag.browse(path,{\"typeId\":\"Objects/Air/CRAH v2\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\toutput \u003d []\n\tfor item in tags:\n\t\toutput.append(item[\"fullPath\"])\n\treturn output",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.data": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.time"
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\toutput \u003d []\n\tdata \u003d self.custom.tagPath\n\tfor item in data:\n\t\ttags \u003d system.tag.browse(item,{\"typeId\":\"Objects/Air/CRAH\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\t\tfor item in tags:\n\t\t\tCRAH_tagPath \u003d str(item[\"fullPath\"])\n\t\t\toutput.append(CRAH_tagPath)\n\toutput.append(value)\n\treturn output",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.key": {
|
|
"persistent": true
|
|
},
|
|
"custom.key_1": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.key"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\n\treturn alarm.summary.calcMaxPriority(value)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.selectedRoom": {
|
|
"persistent": true
|
|
},
|
|
"custom.tagPath": {
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 1000,
|
|
"width": 1276
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Label"
|
|
},
|
|
"position": {
|
|
"shrink": 0
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.CRAH_tagPaths[0]"
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\timport re\n\ttag_path \u003d value\n\tpattern \u003d r\"]([^/]+)\" # Matches any characters between \u0027]\u0027 and \u0027/\u0027\n\tmatch \u003d re.search(pattern, tag_path)\n\tif match:\n\t\textracted_value \u003d match.group(1)\n\treturn extracted_value",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"backgroundColor": "var(--container)",
|
|
"borderBottomLeftRadius": "var(--borderRadius)",
|
|
"borderBottomRightRadius": "var(--borderRadius)",
|
|
"borderTopLeftRadius": "var(--borderRadius)",
|
|
"borderTopRightRadius": "var(--borderRadius)",
|
|
"boxShadow": "var(--boxShadow2)",
|
|
"overflow": "visible",
|
|
"paddingBottom": 5,
|
|
"paddingLeft": 15,
|
|
"paddingRight": 15,
|
|
"paddingTop": 5
|
|
},
|
|
"text": "ER1242"
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "FlexRepeater"
|
|
},
|
|
"propConfig": {
|
|
"props.instances": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.CRAH_tagPaths"
|
|
},
|
|
"enabled": false,
|
|
"transforms": [
|
|
{
|
|
"code": "\toutput \u003d []\n\tfor item in value:\n\t\toutput.append({\"instanceStyle\":{\"classes\": \"\"},\n\t\t\t\t\t\t\"instancePosition\":{},\n\t\t\t\t\t\t\"embedded\": False,\n\t\t\t\t\t\t\"objectName\": \"CRAH\",\n\t\t\t\t\t\t\"tagPath\": item})\n\treturn output",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"direction": "row-reverse",
|
|
"instances": [
|
|
{
|
|
"embedded": false,
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"objectName": "CRAH",
|
|
"tagPath": "[Ignition_Common_IO_Gtwy]MPR1150/SATB1_M5_6_MPR1150_CRAH_01"
|
|
},
|
|
{
|
|
"embedded": false,
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"objectName": "CRAH",
|
|
"tagPath": "[Ignition_Common_IO_Gtwy]MPR1150/SATB1_M5_6_MPR1150_CRAH_02"
|
|
}
|
|
],
|
|
"path": "Library/Diagrams/HVAC/Dgrm_CRAH",
|
|
"style": {
|
|
"gap": 15,
|
|
"overflow": "visible"
|
|
}
|
|
},
|
|
"type": "ia.display.flex-repeater"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"alignContent": "center",
|
|
"alignItems": "center",
|
|
"direction": "column",
|
|
"justify": "center",
|
|
"style": {
|
|
"backgroundColor": "var(--containerRoot)",
|
|
"gap": "var(--space-xl)",
|
|
"overflow": "visible"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"customMethods": [],
|
|
"extensionFunctions": null,
|
|
"messageHandlers": [
|
|
{
|
|
"messageType": "roomUpdate",
|
|
"pageScope": true,
|
|
"script": "\t# implement your handler here\n\tself.view.custom.selectedRoom \u003d payload[\"Room\"]",
|
|
"sessionScope": false,
|
|
"viewScope": false
|
|
}
|
|
]
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |