{ "custom": { "allTags": [ { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Avg Cell Voltage", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Current", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Max Cell Temperature", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Max Cell Voltage", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Max Cell Voltage Position", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Max Cell temperature Position", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Min Cell Temperature", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Min Cell Voltage", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Min Cell Voltage Position", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Min Cell temperature Position", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Rack Alm Summary", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Rack Charge Percent", "options": [] }, { "dataType": "", "displaySelection": 0, "format": "0.0", "instancePosition": 999, "instanceStyle": { "classes": "" }, "name": "Rack Health Percent", "options": [] } ] }, "params": { "tagPath": "[Ignition_SATB1_IO1_default]ER1242/SATB1_ER1242_UPS-1/Batteries/Rack 2" }, "propConfig": { "custom.allTags": { "binding": { "config": { "struct": { "tagPath": "{view.params.tagPath}" }, "waitOnAll": true }, "transforms": [ { "code": "\toutput \u003d []\n\t# Simulate fetching tag configurations and sorting by name\n\tnodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n\tfor item in nodes:\n\t if \u0027tags\u0027 in item:\n\t \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n\t \t#sortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027) if x.get(\u0027engUnit\u0027, \u0027misc\u0027) !\u003d \"\" else \u0027misc\u0027)\n for tagConfig in sortedTags:\n if str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n name \u003d tagConfig.get(\"name\", \"\")\n dataType \u003d tagConfig.get(\"dataType\", \"\")\n tagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n if dataType \u003d\u003d \u0027Boolean\u0027:\n \tdisplaySel \u003d 1\n else:\n \tdisplaySel \u003d 0\n instance \u003d {\n \"instanceStyle\": {\n \"classes\": \"\"\n },\n \"instancePosition\": 999,\n \"name\": name,\n \"dataType\": dataType,\n \"displaySelection\": displaySel,\n \"format\": \"0.0\",\n \"options\": []\n }\n output.append(instance)\n\t# Return or process the sorted output\n\treturn output", "type": "script" } ], "type": "expr-struct" }, "persistent": true }, "params.tagPath": { "paramDirection": "input", "persistent": true } }, "props": { "defaultSize": { "width": 1200 } }, "root": { "children": [ { "meta": { "name": "FlexRepeater" }, "position": { "basis": "100%" }, "propConfig": { "props.instances": { "binding": { "config": { "struct": { "allTags": "{view.custom.allTags}", "tagPath": "{view.params.tagPath}" }, "waitOnAll": true }, "transforms": [ { "code": "\toutput \u003d []\n\tallTags \u003d system.util.jsonDecode(system.util.jsonEncode(value[\u0027allTags\u0027]))\n\tfor tag in allTags:\n\t\ttagName \u003d tag[\"name\"]\n\t\ttag[\"tagPath\"] \u003d value[\"tagPath\"] + \"/\" +tagName\n\t\toutput.append(tag)\n\toutput_sorted \u003d sorted(output, key\u003dlambda item: item[\"instancePosition\"])\n\treturn output_sorted", "type": "script" } ], "type": "expr-struct" } } }, "props": { "alignContent": "flex-start", "elementPosition": { "basis": "33%", "grow": 0 }, "loading": { "order": "with-parent" }, "path": "Library/Framework/Tag Info", "style": { "border": "1px solid var(--border)", "gap": "10px 0", "padding": "10px" }, "useDefaultViewHeight": false, "useDefaultViewWidth": false, "wrap": "wrap" }, "type": "ia.display.flex-repeater" } ], "meta": { "name": "root" }, "props": { "direction": "column", "style": { "classes": "containers/padded-container" } }, "type": "ia.container.flex" } }