260502 Backup
|
Before Width: | Height: | Size: 16 KiB |
@@ -1,480 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_SATB1_IO2_default]GAL1271/SATB1_GAL1271_PDU_P2-4-3"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747948194045
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747948194045
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 39 KiB |
@@ -1,480 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Chiller 1"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947762435
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947762435
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 17 KiB |
@@ -72,7 +72,7 @@
|
||||
"props": {
|
||||
"params": {
|
||||
"inputs": {
|
||||
"targetDetailedURL": "/Oneline-UT/37d94815"
|
||||
"targetDetailedURL": "/Oneline-UT/"
|
||||
}
|
||||
},
|
||||
"path": "Library/Layouts/iFrame/Pan Zoom iFrame/Pan Zoom iFrame"
|
||||
@@ -1,726 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"FCU_tagPath": [],
|
||||
"backupdata": [
|
||||
"[Ignition_Common_IO_Gtwy]ER1185/SATB1_HS2_EL1185_FCU01",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU02",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU03",
|
||||
"[Ignition_Common_IO_Gtwy]ER1160/SATB1_HS2_EL1160_FCU04",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1174/SATB1_HS2_IDF1174_FCU05",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1154/SATB1_HS2_IDF1154_FCU06",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU07",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU08",
|
||||
"[Ignition_Common_IO_Gtwy]FS1285/SATB1_HS2_FS1285_FCU09",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU10",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU11",
|
||||
"[Ignition_Common_IO_Gtwy]ER1287/SATB1_HS2_EL1287_FCU12",
|
||||
"[Ignition_Common_IO_Gtwy]ER1284/SATB1_HS2_EL1284_FCU13",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1274/SATB1_HS2_IDF1274_FCU14",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1264/SATB1_HS2_IDF1264_FCU15",
|
||||
"[Ignition_Common_IO_Gtwy]ER1128/SATB1_HS2_EL1128_FCU16",
|
||||
"[Ignition_Common_IO_Gtwy]MR1125/SATB1_HS2_ME1125_FCU17",
|
||||
"[Ignition_Common_IO_Gtwy]ER1229/SATB1_HS2_EL1229_FCU18",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1218/SATB1_HS2_IDF1218_FCU19",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1122/SATB1_HS2_IDF1122_FCU20",
|
||||
"[Ignition_Common_IO_Gtwy]FS1232/SATB1_HS2_FS1232_FCU21",
|
||||
"[Ignition_Common_IO_Gtwy]MR1132/SATB1_HS2_ME1132_FCU22",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU23",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU24",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU25",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU26",
|
||||
"[Ignition_Common_IO_Gtwy]RM1219/SATB1_HS2_RM1219_FCU27",
|
||||
"[Ignition_Common_IO_Gtwy]RM1193/SATB1_HS2_RM1193_FCU28",
|
||||
"[Ignition_Common_IO_Gtwy]RM1234/SATB1_HS2_RM1234_FCU29"
|
||||
],
|
||||
"data": [
|
||||
"[Ignition_Common_IO_Gtwy]ER1185/SATB1_HS2_EL1185_FCU01",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU02",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU03",
|
||||
"[Ignition_Common_IO_Gtwy]ER1160/SATB1_HS2_EL1160_FCU04",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1174/SATB1_HS2_IDF1174_FCU05",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1154/SATB1_HS2_IDF1154_FCU06",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU07",
|
||||
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU08",
|
||||
"[Ignition_Common_IO_Gtwy]FS1285/SATB1_HS2_FS1285_FCU09",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU10",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU11",
|
||||
"[Ignition_Common_IO_Gtwy]ER1287/SATB1_HS2_EL1287_FCU12",
|
||||
"[Ignition_Common_IO_Gtwy]ER1284/SATB1_HS2_EL1284_FCU13",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1274/SATB1_HS2_IDF1274_FCU14",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1264/SATB1_HS2_IDF1264_FCU15",
|
||||
"[Ignition_Common_IO_Gtwy]ER1128/SATB1_HS2_EL1128_FCU16",
|
||||
"[Ignition_Common_IO_Gtwy]MR1125/SATB1_HS2_ME1125_FCU17",
|
||||
"[Ignition_Common_IO_Gtwy]ER1229/SATB1_HS2_EL1229_FCU18",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1218/SATB1_HS2_IDF1218_FCU19",
|
||||
"[Ignition_Common_IO_Gtwy]IDF1122/SATB1_HS2_IDF1122_FCU20",
|
||||
"[Ignition_Common_IO_Gtwy]FS1232/SATB1_HS2_FS1232_FCU21",
|
||||
"[Ignition_Common_IO_Gtwy]MR1132/SATB1_HS2_ME1132_FCU22",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU23",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU24",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU25",
|
||||
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU26",
|
||||
"[Ignition_Common_IO_Gtwy]RM1219/SATB1_HS2_RM1219_FCU27",
|
||||
"[Ignition_Common_IO_Gtwy]RM1193/SATB1_HS2_RM1193_FCU28",
|
||||
"[Ignition_Common_IO_Gtwy]RM1234/SATB1_HS2_RM1234_FCU29"
|
||||
],
|
||||
"selectedRoom": "MDF1187",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]"
|
||||
},
|
||||
"params": {},
|
||||
"propConfig": {
|
||||
"custom.FCU_tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"selected": "{view.custom.selectedRoom}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tselected \u003d value[\"selected\"]\n\tpath \u003d str(self.view.custom.tagPath) + selected\n\ttags \u003d system.tag.browse(path,{\"typeId\":\"Objects/Air/FCU\", \"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.backupdata": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.data": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.selectedRoom": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.tagPath": {
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.FCU_tagPath"
|
||||
},
|
||||
"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\": \"FCU\",\n\t\t\t\t\t\t\"tagPath\": item})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"instances": [
|
||||
{
|
||||
"embedded": false,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"objectName": "FCU",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU02"
|
||||
},
|
||||
{
|
||||
"embedded": false,
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"objectName": "FCU",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU03"
|
||||
}
|
||||
],
|
||||
"path": "Library/Diagrams/HVAC/Dgrm_FCU",
|
||||
"style": {
|
||||
"overflow": "visible"
|
||||
},
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Diagram"
|
||||
},
|
||||
"position": {
|
||||
"basis": "70%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"alignContent": "center",
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"backgroundColor": "var(--container)"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "Second Floor"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FirstFloor Percent"
|
||||
},
|
||||
"position": {
|
||||
"basis": "15%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Widgets/Layouts/RTU_SecondFloor",
|
||||
"style": {
|
||||
"overflow": "visible"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"props": {
|
||||
"text": "First Floor"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FirstFloor Percent_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "15%",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Widgets/Layouts/RTU_FirstFloor",
|
||||
"style": {
|
||||
"overflow": "visible"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_1"
|
||||
},
|
||||
"props": {
|
||||
"text": "List of devices"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onRowClick": {
|
||||
"config": {
|
||||
"script": "\tpayload \u003d {\"Room\":self.props.selection.data[0].Room}\n\tmessageType \u003d \"updateRoom\"\n\tsystem.perspective.sendMessage(messageType, payload)\n\tmessageType \u003d \"layout_01_Update\"\n\tsystem.perspective.sendMessage(messageType, payload)\n\tmessageType \u003d \"layout_02_Update\"\n\tsystem.perspective.sendMessage(messageType, payload)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "Table"
|
||||
},
|
||||
"position": {
|
||||
"basis": "55%"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.selectedData": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "this.props.selection.selectedRow"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\tif value is None:\n\t\tvalue \u003d 0\n\ttagPath \u003d self.props.data[value][\"tagPath\"]\n\ttagPath \u003d tagPath.split(\"/\")\n\ttags \u003d system.tag.browse(tagPath[0],{\"typeId\":\"Objects/Air/FCU\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\treturn tags",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"paths": "{view.custom.data}",
|
||||
"time": "now(3000)"
|
||||
},
|
||||
"waitOnAll": false
|
||||
},
|
||||
"overlayOptOut": true,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tdata \u003d value[\"paths\"]\n\t\n\tAlarmSeverity \u003d \"\"\n\tfor item in data:\n\t\t\n\t\t\"\"\"\n\t\tAlmS \u003d alarm.summary.calcMaxPriority(item)\n\t\t\n\t\tif(AlmS \u003d\u003d 1):\n\t\t\tAlarmSeverity \u003d \"Controller\"\n\t\telif(AlmS \u003d\u003d 2):\n\t\t\tAlarmSeverity \u003d \"Info\"\n\t\telif(AlmS \u003d\u003d 3):\n\t\t\tAlarmSeverity \u003d \"Warning\"\n\t\telif(AlmS \u003d\u003d 4):\n\t\t\tAlarmSeverity \u003d \"Critical\"\n\t\telse:\n\t\t\tAlarmSeverity \u003d \" \"\n\t\t\"\"\"\n\t\tST \u003d system.tag.readBlocking(item + \"/Space Temperature\")[0].value\n\t\t#Name \u003d system.tag.readBlocking(item + \"/Meta/EqName\",1000)[0].value\n\t\t#Room \u003d system.tag.readBlocking(item + \"/Meta/Room\",1000)[0].value\n\t\tRoom \u003d item.split(\u0027/\u0027)[0].split(\u0027]\u0027)[1]\n\t\tName \u003d item.split(\u0027_\u0027)[6]\n\t\tpath \u003d item\n\t\toutput.append({ \"ST\": ST,\n\t\t\t\t\t\t\"Name\": Name,\n\t\t\t\t\t\t\"Room\": Room,\n\t\t\t\t\t\t\"AlarmSeverity\": AlarmSeverity,\n\t\t\t\t\t\t\"tagPath\": path})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"columns": [
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "Name",
|
||||
"filter": {
|
||||
"boolean": {
|
||||
"condition": ""
|
||||
},
|
||||
"date": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"enabled": false,
|
||||
"number": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"string": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"visible": "on-hover"
|
||||
},
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": "Name"
|
||||
},
|
||||
"justify": "auto",
|
||||
"nullFormat": {
|
||||
"includeNullStrings": false,
|
||||
"nullFormatValue": "",
|
||||
"strict": false
|
||||
},
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"track": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"enabled": true,
|
||||
"format": "0,0.##",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": "flex grow"
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "Room",
|
||||
"filter": {
|
||||
"boolean": {
|
||||
"condition": ""
|
||||
},
|
||||
"date": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"enabled": false,
|
||||
"number": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"string": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"visible": "on-hover"
|
||||
},
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"justify": "auto",
|
||||
"nullFormat": {
|
||||
"includeNullStrings": false,
|
||||
"nullFormatValue": "",
|
||||
"strict": false
|
||||
},
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"track": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"enabled": true,
|
||||
"format": "0,0.##",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "ST",
|
||||
"filter": {
|
||||
"boolean": {
|
||||
"condition": ""
|
||||
},
|
||||
"date": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"enabled": false,
|
||||
"number": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"string": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"visible": "on-hover"
|
||||
},
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": "Space Temp"
|
||||
},
|
||||
"justify": "auto",
|
||||
"nullFormat": {
|
||||
"includeNullStrings": false,
|
||||
"nullFormatValue": "",
|
||||
"strict": false
|
||||
},
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"track": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"enabled": true,
|
||||
"format": "0,0.##",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "AlarmSeverity",
|
||||
"filter": {
|
||||
"boolean": {
|
||||
"condition": ""
|
||||
},
|
||||
"date": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"enabled": false,
|
||||
"number": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"string": {
|
||||
"condition": "",
|
||||
"value": ""
|
||||
},
|
||||
"visible": "on-hover"
|
||||
},
|
||||
"footer": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"header": {
|
||||
"align": "center",
|
||||
"justify": "left",
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": "Alarm Severity"
|
||||
},
|
||||
"justify": "auto",
|
||||
"nullFormat": {
|
||||
"includeNullStrings": false,
|
||||
"nullFormatValue": "",
|
||||
"strict": false
|
||||
},
|
||||
"number": "value",
|
||||
"numberFormat": "0,0.##",
|
||||
"progressBar": {
|
||||
"bar": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"track": {
|
||||
"color": "",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"enabled": true,
|
||||
"format": "0,0.##",
|
||||
"justify": "center",
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"render": "auto",
|
||||
"resizable": true,
|
||||
"sort": "none",
|
||||
"sortable": true,
|
||||
"strictWidth": false,
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"toggleSwitch": {
|
||||
"color": {
|
||||
"selected": "",
|
||||
"unselected": ""
|
||||
}
|
||||
},
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
}
|
||||
],
|
||||
"filter": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]"
|
||||
},
|
||||
"meta": {
|
||||
"name": "Location"
|
||||
},
|
||||
"position": {
|
||||
"basis": "450px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"justify": "space-evenly",
|
||||
"style": {
|
||||
"backgroundColor": "var(--container)",
|
||||
"borderBottomLeftRadius": "var(--borderRadius)",
|
||||
"borderBottomRightRadius": "var(--borderRadius)",
|
||||
"borderTopLeftRadius": "var(--borderRadius)",
|
||||
"borderTopRightRadius": "var(--borderRadius)",
|
||||
"boxShadow": "var(--boxShadow2)",
|
||||
"overflow": "visible",
|
||||
"padding": 10
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-evenly",
|
||||
"style": {
|
||||
"backgroundColor": "var(--containerRoot)",
|
||||
"overflow": "visible",
|
||||
"padding": 15
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "updateRoom",
|
||||
"pageScope": true,
|
||||
"script": "\t# implement your handler here\n\tself.view.custom.selectedRoom \u003d payload[\"Room\"]",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 500,
|
||||
"width": 767
|
||||
"width": 1376
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
@@ -14,10 +14,10 @@
|
||||
"name": "Sym_Chiller"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.3,
|
||||
"width": 0.25,
|
||||
"x": 0.0648,
|
||||
"y": 0.054
|
||||
"height": 150,
|
||||
"width": 230,
|
||||
"x": 124.16,
|
||||
"y": 27
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -33,10 +33,10 @@
|
||||
"name": "Sym_ValveC"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.164,
|
||||
"width": 0.1493,
|
||||
"x": 0.4062,
|
||||
"y": 0.376
|
||||
"height": 82,
|
||||
"width": 152,
|
||||
"x": 577.93,
|
||||
"y": 188
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -53,10 +53,10 @@
|
||||
"name": "Sym_ValveC_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.162,
|
||||
"width": 0.1627,
|
||||
"x": 0.4036,
|
||||
"y": 0.641
|
||||
"height": 81,
|
||||
"width": 223.88,
|
||||
"x": 555.35,
|
||||
"y": 320.5
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -73,10 +73,10 @@
|
||||
"name": "Sym_ValveM"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.218,
|
||||
"width": 0.1707,
|
||||
"x": 0.6572,
|
||||
"y": 0.17
|
||||
"height": 109,
|
||||
"width": 81,
|
||||
"x": 908.31,
|
||||
"y": 75
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -93,10 +93,10 @@
|
||||
"name": "Sym_TES"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.254,
|
||||
"width": 0.1213,
|
||||
"x": 0.6328,
|
||||
"y": 0.453
|
||||
"height": 127,
|
||||
"width": 166.91,
|
||||
"x": 870.73,
|
||||
"y": 226.5
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -112,10 +112,10 @@
|
||||
"name": "Sym_CHWPump"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.178,
|
||||
"width": 0.17,
|
||||
"x": 0.1271,
|
||||
"y": 0.486
|
||||
"height": 89,
|
||||
"width": 233.92,
|
||||
"x": 174.89,
|
||||
"y": 243
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -134,13 +134,13 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.086,
|
||||
"height": 43,
|
||||
"rotate": {
|
||||
"anchor": "-30% 25%"
|
||||
},
|
||||
"width": 0.0887,
|
||||
"x": 0.8786,
|
||||
"y": 0.23
|
||||
"width": 122.05,
|
||||
"x": 1208.95,
|
||||
"y": 115
|
||||
},
|
||||
"props": {
|
||||
"text": "To CHWS Header"
|
||||
@@ -152,13 +152,13 @@
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.086,
|
||||
"height": 43,
|
||||
"rotate": {
|
||||
"anchor": "-30% 25%"
|
||||
},
|
||||
"width": 0.0939,
|
||||
"x": 0.8787,
|
||||
"y": 0.8578
|
||||
"width": 129.21,
|
||||
"x": 1209.09,
|
||||
"y": 428.9
|
||||
},
|
||||
"props": {
|
||||
"text": "From CHWS Header"
|
||||
@@ -170,10 +170,10 @@
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.07,
|
||||
"width": 0.1121,
|
||||
"x": 0.7276,
|
||||
"y": 0.52
|
||||
"height": 35,
|
||||
"width": 154.25,
|
||||
"x": 1001.18,
|
||||
"y": 260
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -192,10 +192,10 @@
|
||||
"name": "EmbeddedView_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.07,
|
||||
"width": 0.1121,
|
||||
"x": 0.5085,
|
||||
"y": 0.52
|
||||
"height": 35,
|
||||
"width": 154.25,
|
||||
"x": 699.7,
|
||||
"y": 260
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -214,10 +214,10 @@
|
||||
"name": "EmbeddedView_1"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.07,
|
||||
"width": 0.1121,
|
||||
"x": 0.2387,
|
||||
"y": 0.216
|
||||
"height": 35,
|
||||
"width": 154.25,
|
||||
"x": 328.45,
|
||||
"y": 108
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -236,10 +236,10 @@
|
||||
"name": "EmbeddedView_2"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.07,
|
||||
"width": 0.1121,
|
||||
"x": 0.2387,
|
||||
"y": 0.826
|
||||
"height": 35,
|
||||
"width": 154.25,
|
||||
"x": 328.45,
|
||||
"y": 413
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -258,10 +258,10 @@
|
||||
"name": "EmbeddedView_3"
|
||||
},
|
||||
"position": {
|
||||
"height": 0.07,
|
||||
"width": 0.1121,
|
||||
"x": 0.317,
|
||||
"y": 0.216
|
||||
"height": 35,
|
||||
"width": 154.25,
|
||||
"x": 436.19,
|
||||
"y": 108
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
@@ -280,7 +280,6 @@
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"mode": "percent",
|
||||
"pipes": [
|
||||
{
|
||||
"appearance": "auto",
|
||||
@@ -294,21 +293,21 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"x": 0.1726,
|
||||
"y": 0.278
|
||||
"x": 237.5,
|
||||
"y": 139
|
||||
},
|
||||
{
|
||||
"connections": [],
|
||||
"x": 0.6746,
|
||||
"y": 0.278
|
||||
"x": 928.25,
|
||||
"y": 139
|
||||
}
|
||||
],
|
||||
"x": 0.4663,
|
||||
"y": 0.278
|
||||
"x": 641.63,
|
||||
"y": 139
|
||||
}
|
||||
],
|
||||
"x": 0.4663,
|
||||
"y": 0.432
|
||||
"x": 641.63,
|
||||
"y": 216
|
||||
},
|
||||
"start": "none",
|
||||
"stroke": "",
|
||||
@@ -327,26 +326,26 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"x": 0.8688,
|
||||
"y": 0.9114
|
||||
"x": 1195.47,
|
||||
"y": 455.7
|
||||
},
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"x": 0.1726,
|
||||
"y": 0.564
|
||||
"x": 237.5,
|
||||
"y": 282
|
||||
}
|
||||
],
|
||||
"x": 0.1726,
|
||||
"y": 0.9114
|
||||
"x": 237.5,
|
||||
"y": 455.7
|
||||
}
|
||||
],
|
||||
"x": 0.4651,
|
||||
"y": 0.9114
|
||||
"x": 639.98,
|
||||
"y": 455.7
|
||||
}
|
||||
],
|
||||
"x": 0.4651,
|
||||
"y": 0.744
|
||||
"x": 639.98,
|
||||
"y": 372
|
||||
},
|
||||
"start": "none",
|
||||
"stroke": "",
|
||||
@@ -363,16 +362,16 @@
|
||||
"origin": {
|
||||
"connections": [
|
||||
{
|
||||
"x": 0.1726,
|
||||
"y": 0.292
|
||||
"x": 237.5,
|
||||
"y": 146
|
||||
},
|
||||
{
|
||||
"x": 0.1726,
|
||||
"y": 0.54
|
||||
"x": 237.5,
|
||||
"y": 270
|
||||
}
|
||||
],
|
||||
"x": 0.1726,
|
||||
"y": 0.418
|
||||
"x": 237.5,
|
||||
"y": 209
|
||||
},
|
||||
"start": "none",
|
||||
"stroke": "",
|
||||
@@ -391,20 +390,20 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"x": 0.4663,
|
||||
"y": 0.486
|
||||
"x": 641.63,
|
||||
"y": 243
|
||||
},
|
||||
{
|
||||
"x": 0.6746,
|
||||
"y": 0.588
|
||||
"x": 928.25,
|
||||
"y": 294
|
||||
}
|
||||
],
|
||||
"x": 0.4663,
|
||||
"y": 0.588
|
||||
"x": 641.63,
|
||||
"y": 294
|
||||
}
|
||||
],
|
||||
"x": 0.4663,
|
||||
"y": 0.694
|
||||
"x": 641.63,
|
||||
"y": 347
|
||||
},
|
||||
"start": "none",
|
||||
"stroke": "",
|
||||
@@ -425,25 +424,25 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"x": 0.8688,
|
||||
"y": 0.278
|
||||
"x": 1195.47,
|
||||
"y": 139
|
||||
},
|
||||
{
|
||||
"connections": [],
|
||||
"x": 0.7,
|
||||
"y": 0.278
|
||||
"x": 963.2,
|
||||
"y": 139
|
||||
}
|
||||
],
|
||||
"x": 0.7876,
|
||||
"y": 0.278
|
||||
"x": 1083.74,
|
||||
"y": 139
|
||||
}
|
||||
],
|
||||
"x": 0.7876,
|
||||
"y": 0.588
|
||||
"x": 1083.74,
|
||||
"y": 294
|
||||
}
|
||||
],
|
||||
"x": 0.6895,
|
||||
"y": 0.588
|
||||
"x": 948.75,
|
||||
"y": 294
|
||||
},
|
||||
"start": "none",
|
||||
"stroke": "",
|
||||
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"custom": {
|
||||
"STU_tagPath": "[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU01",
|
||||
"data": [
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU01",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU03",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU05",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU07",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU09",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU11",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU13",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU15",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU17",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1171/SATB1_GAL1171_DH3_STU19",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU02",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU04",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU06",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU08",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU10",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU12",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU14",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU16",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU18",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1172/SATB1_GAL1172_DH3_STU20",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU01",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU03",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU05",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU07",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU09",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU11",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU13",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU15",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU17",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1181/SATB1_GAL1181_DH5_STU19",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU02",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU04",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU06",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU08",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU10",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU12",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU14",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU16",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU18",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1182/SATB1_GAL1182_DH5_STU20",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU01",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU03",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU05",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU07",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU09",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU11",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU13",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU15",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU17",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU19",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU02",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU04",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU06",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU08",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU10",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU12",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU14",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU16",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU18",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_DH1_STU20",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU01",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU03",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU05",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU07",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU09",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU11",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU13",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU15",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU17",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1271/SATB1_GAL1271_DH2_STU19",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU02",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU04",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU06",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU08",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU10",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU12",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU14",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU16",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU18",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1272/SATB1_GAL1272_DH2_STU20",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU01",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU03",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU05",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU07",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU09",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU11",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU13",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU15",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU17",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1281/SATB1_GAL1281_DH4_STU19",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU02",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU04",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU08",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU10",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU12",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU14",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU16",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU18",
|
||||
"[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU20"
|
||||
],
|
||||
"room": "GAL1172",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]"
|
||||
},
|
||||
"params": {},
|
||||
"propConfig": {
|
||||
"custom.STU_tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.selected"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d \"\"\n\tif(value is None):\n\t\toutput \u003d \"[Ignition_Common_IO_Gtwy]GAL1261/SATB1_GAL1261_DH1_STU01\"\n\telse:\n\t\toutput \u003d value\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.data": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tagPath": "{view.custom.tagPath}",
|
||||
"time": "now(3000)"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\ttags \u003d system.tag.browse(value[\"tagPath\"],{\"typeId\":\"Objects/Air/STU\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\tfor item in tags:\n\t\ttagPath \u003d str(item[\"fullPath\"])\n\t\toutput.append(tagPath)\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.room": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.tagPath": {
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1000,
|
||||
"width": 1276
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "STU diagram"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.STU_tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"embedded": false,
|
||||
"objectName": "STU"
|
||||
},
|
||||
"path": "Library/Diagrams/HVAC/Dgrm_STU",
|
||||
"style": {
|
||||
"backgroundColor": "var(--container)",
|
||||
"borderBottomLeftRadius": "var(--borderRadius)",
|
||||
"borderBottomRightRadius": "var(--borderRadius)",
|
||||
"borderTopLeftRadius": "var(--borderRadius)",
|
||||
"borderTopRightRadius": "var(--borderRadius)",
|
||||
"boxShadow": "var(--boxShadow2)",
|
||||
"overflow": "visible",
|
||||
"padding": 5
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-evenly",
|
||||
"style": {
|
||||
"backgroundColor": "var(--containerRoot)",
|
||||
"padding": 15
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "roomUpdate",
|
||||
"pageScope": true,
|
||||
"script": "\t# implement your handler here\n\tself.view.custom.room \u003d payload[\"Room\"]",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
},
|
||||
{
|
||||
"messageType": "equipmentUpdate",
|
||||
"pageScope": true,
|
||||
"script": "\t# implement your handler here\n\tself.view.custom.STU_tagPath \u003d payload[\"Tag\"]",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 70 KiB |
@@ -1,480 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_UT-M1/Source 1 Switch"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947747922
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947747922
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 20 KiB |
@@ -1,428 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]RM1109/SATB1_HS1_RM1109_VAV06"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 92 KiB |
@@ -0,0 +1,419 @@
|
||||
{
|
||||
"custom": {
|
||||
"tabsConfig": {
|
||||
"showConfig": false,
|
||||
"showControl": false,
|
||||
"tabs": [
|
||||
"Status",
|
||||
"Control",
|
||||
"Config",
|
||||
"Trend",
|
||||
"Meta",
|
||||
"Wiki"
|
||||
]
|
||||
},
|
||||
"trendConfig": {
|
||||
"selectedPens": []
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"auth": {
|
||||
"almAck": true,
|
||||
"almShelve": true,
|
||||
"config": true,
|
||||
"control": true
|
||||
},
|
||||
"objectName": "Motor",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH01_MOTOR"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.tabsConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.tabsConfig.showConfig": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"1": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{1}/Config"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},false) !\u003d false",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.tabsConfig.showControl": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"1": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{1}/Control"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},false) !\u003d false",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.auth": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.objectName": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Status"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Info\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Trend"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.trendConfig.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Config"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Config\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Meta"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Wiki"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Framework/Tag Notes/View Notes"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Control"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Control\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "TabContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "300px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.tabs": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.tabsConfig}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttabs \u003d value[\u0027tabs\u0027]\n\tshowConfig \u003d value[\u0027showConfig\u0027]\n\tshowControl \u003d value[\u0027showControl\u0027]\n\tif not showConfig:\n\t\ttabs.pop(tabs.indexOf(\u0027Config\u0027))\n\tif not showControl:\n\t\ttabs.pop(tabs.indexOf(\u0027Control\u0027))\n\t\n\treturn tabs",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "enableDisablePen",
|
||||
"pageScope": true,
|
||||
"script": "\t# When a pen is selected or de-selected on the trends page, this handler is\n\t# responsible for appending or removing the pen name from the proper trend\n\t# config list.\n\t\n\tname \u003d payload[\u0027name\u0027]\n\tenabledOrDisabled \u003d payload[\u0027enabledOrDisabled\u0027]\n\tgroup \u003d payload[\u0027group\u0027]\n\t\n\tif enabledOrDisabled \u003d\u003d True:\n\t\tif name not in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].append(name)\n\telse:\n\t\tif name in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].remove(name)",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -164,20 +164,13 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -266,16 +259,11 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
@@ -397,7 +385,8 @@
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
}
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
@@ -33,8 +33,8 @@
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1000,
|
||||
"width": 350
|
||||
"height": 900,
|
||||
"width": 260
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
@@ -43,6 +43,9 @@
|
||||
"meta": {
|
||||
"name": "Title"
|
||||
},
|
||||
"position": {
|
||||
"basis": "19px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
@@ -61,7 +64,7 @@
|
||||
},
|
||||
"props": {
|
||||
"textStyle": {
|
||||
"fontSize": 24
|
||||
"fontSize": 14
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
@@ -71,7 +74,7 @@
|
||||
"name": "SLA"
|
||||
},
|
||||
"position": {
|
||||
"basis": "93px"
|
||||
"basis": "75px"
|
||||
},
|
||||
"props": {
|
||||
"columns": [
|
||||
@@ -166,14 +169,14 @@
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
"width": 80
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "Minimum",
|
||||
"field": "Min",
|
||||
"filter": {
|
||||
"boolean": {
|
||||
"condition": ""
|
||||
@@ -207,7 +210,7 @@
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
"title": "Min"
|
||||
},
|
||||
"justify": "auto",
|
||||
"nullFormat": {
|
||||
@@ -258,14 +261,14 @@
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
"width": 40
|
||||
},
|
||||
{
|
||||
"align": "center",
|
||||
"boolean": "checkbox",
|
||||
"dateFormat": "MM/DD/YYYY",
|
||||
"editable": false,
|
||||
"field": "Maximum",
|
||||
"field": "Max",
|
||||
"filter": {
|
||||
"boolean": {
|
||||
"condition": ""
|
||||
@@ -299,7 +302,7 @@
|
||||
"style": {
|
||||
"classes": ""
|
||||
},
|
||||
"title": ""
|
||||
"title": "Max"
|
||||
},
|
||||
"justify": "auto",
|
||||
"nullFormat": {
|
||||
@@ -350,13 +353,13 @@
|
||||
"viewParams": {},
|
||||
"viewPath": "",
|
||||
"visible": true,
|
||||
"width": ""
|
||||
"width": 40
|
||||
}
|
||||
],
|
||||
"data": [
|
||||
{
|
||||
"Maximum": "95 degF",
|
||||
"Minimum": "50 degF",
|
||||
"Max": "95 degF",
|
||||
"Min": "50 degF",
|
||||
"Variable": {
|
||||
"align": "center",
|
||||
"editable": false,
|
||||
@@ -369,8 +372,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"Maximum": "80%",
|
||||
"Minimum": "5%",
|
||||
"Max": "80%",
|
||||
"Min": "5%",
|
||||
"Variable": {
|
||||
"align": "center",
|
||||
"editable": false,
|
||||
@@ -387,11 +390,18 @@
|
||||
"pager": {
|
||||
"bottom": false
|
||||
},
|
||||
"rows": {
|
||||
"height": "20px",
|
||||
"style": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"selection": {
|
||||
"enableRowSelection": false
|
||||
},
|
||||
"style": {
|
||||
"fontSize": 16
|
||||
"fontSize": 12,
|
||||
"overflow": "visible"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
@@ -403,7 +413,10 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "Humidifier Disable Setpoint"
|
||||
"text": "Humidifier Disable Setpoint",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -463,9 +476,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_1"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -475,6 +485,28 @@
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "25px"
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"dataType": "Int4",
|
||||
"enabled": true,
|
||||
"max": 9999,
|
||||
"min": -9999,
|
||||
"name": "Int",
|
||||
"options": [],
|
||||
"tagPath": "[Ignition_SATB1_IO2_default]Yard/SATB1_YARD_UT-P2-4/Vacuum Fault Interrupter2 Tripped/Config/Target",
|
||||
"visible": true
|
||||
},
|
||||
"path": "Library/Framework/Tag ConfigShort"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
@@ -482,7 +514,10 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "Humidifier Enable Setpoint"
|
||||
"text": "Humidifier Enable Setpoint",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -542,9 +577,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -561,7 +593,10 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "Dewpoint Hi Limit"
|
||||
"text": "Dewpoint Hi Limit",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -621,9 +656,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_9"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -640,7 +672,10 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "Dewpoint Lo Limit"
|
||||
"text": "Dewpoint Lo Limit",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -700,9 +735,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_10"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -722,7 +754,10 @@
|
||||
"basis": "100%"
|
||||
},
|
||||
"props": {
|
||||
"text": "STU Demand"
|
||||
"text": "STU Demand",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -782,9 +817,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_4"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -901,7 +933,10 @@
|
||||
"basis": "190px"
|
||||
},
|
||||
"props": {
|
||||
"text": "DP PID Setpoint"
|
||||
"text": "DP PID Setpoint",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -961,9 +996,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_3"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -980,7 +1012,10 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "STU PID RA Temperature Setpoint"
|
||||
"text": "STU PID RA Temperature Setpoint",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -1040,9 +1075,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_2"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -1059,7 +1091,10 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"props": {
|
||||
"text": "Global Discharge Temp Setpoint"
|
||||
"text": "Global Discharge Temp Setpoint",
|
||||
"textStyle": {
|
||||
"fontSize": 12
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
@@ -1119,9 +1154,6 @@
|
||||
"meta": {
|
||||
"name": "FlexContainer_8"
|
||||
},
|
||||
"position": {
|
||||
"basis": "50px"
|
||||
},
|
||||
"props": {
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
@@ -1339,9 +1371,9 @@
|
||||
"direction": "column",
|
||||
"justify": "space-between",
|
||||
"style": {
|
||||
"gap": "10px",
|
||||
"gap": "var(--space-sm)",
|
||||
"overflow": "visible",
|
||||
"padding": "10px"
|
||||
"padding": "var(--space-sm)"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"custom": {
|
||||
"global": 75
|
||||
"global": null
|
||||
},
|
||||
"params": {
|
||||
"pageId": ""
|
||||
@@ -0,0 +1,415 @@
|
||||
{
|
||||
"custom": {
|
||||
"tabsConfig": {
|
||||
"tabs": [
|
||||
"Status",
|
||||
"Control",
|
||||
"Config",
|
||||
"Trend",
|
||||
"Meta",
|
||||
"Wiki"
|
||||
]
|
||||
},
|
||||
"trendConfig": {
|
||||
"selectedPens": []
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"auth": {
|
||||
"almAck": true,
|
||||
"almShelve": true,
|
||||
"config": true,
|
||||
"control": true
|
||||
},
|
||||
"objectName": "PID_Loop",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/PID_Loop"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.tabsConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.tabsConfig.showConfig": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"1": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{1}/Config"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},false) !\u003d false",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.tabsConfig.showControl": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"1": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{1}/Control"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},false) !\u003d false",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.auth": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.objectName": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Status"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Info\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Trend"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.trendConfig.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Config"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Config\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Meta"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Wiki"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Framework/Tag Notes/View Notes"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Control"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Control\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "TabContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "300px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.tabs": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.tabsConfig}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttabs \u003d value[\u0027tabs\u0027]\n\tshowConfig \u003d value[\u0027showConfig\u0027]\n\tshowControl \u003d value[\u0027showControl\u0027]\n\tif not showConfig:\n\t\ttabs.pop(tabs.indexOf(\u0027Config\u0027))\n\tif not showControl:\n\t\ttabs.pop(tabs.indexOf(\u0027Control\u0027))\n\t\n\treturn tabs",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "enableDisablePen",
|
||||
"pageScope": true,
|
||||
"script": "\t# When a pen is selected or de-selected on the trends page, this handler is\n\t# responsible for appending or removing the pen name from the proper trend\n\t# config list.\n\t\n\tname \u003d payload[\u0027name\u0027]\n\tenabledOrDisabled \u003d payload[\u0027enabledOrDisabled\u0027]\n\tgroup \u003d payload[\u0027group\u0027]\n\t\n\tif enabledOrDisabled \u003d\u003d True:\n\t\tif name not in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].append(name)\n\telse:\n\t\tif name in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].remove(name)",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 30 KiB |
@@ -1,430 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_DS-1A1"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t#histprov:MSSQL_Server:/drv:ignition-satb1-io6:default:/tag:yard/satb1_yard_ds-1b1/breaker open way 01\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1744233841621
|
||||
],
|
||||
"$ts": 1744271940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:MSSQL_Server:/drv:ignition-satb1-io6:default:/tag:yard/satb1_yard_ds-1b1/breaker open way 01",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1744233827719
|
||||
],
|
||||
"$ts": 1744039359000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
}
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947885209
|
||||
],
|
||||
"$ts": 1744271940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:MSSQL_Server:/drv:ignition-satb1-io6:default:/tag:yard/satb1_yard_ds-1b1/breaker open way 01",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947885209
|
||||
],
|
||||
"$ts": 1744039359000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
@@ -82,7 +82,8 @@
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
"height": 1000,
|
||||
"width": 1276
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
|
After Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 43 KiB |
@@ -1,555 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {
|
||||
"allPens": [
|
||||
{
|
||||
"group": "misc",
|
||||
"penList": [
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Cold Aisle Space Humidity",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall/Cold Aisle Space Humidity"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Cold Aisle Space Temperature",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall/Cold Aisle Space Temperature"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Hot Aisle Differential Pressure",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall/Hot Aisle Differential Pressure"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Hot Aisle Space Temperature",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall/Hot Aisle Space Temperature"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Space Dew Point Setpoint",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall/Space Dew Point Setpoint"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Space Differential Pressure",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall/Space Differential Pressure"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Data Hall"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947899741
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947899741
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 17 KiB |
@@ -169,20 +169,13 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -271,16 +264,11 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
@@ -471,7 +459,7 @@
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
"currentTabIndex": 3
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
@@ -1,480 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \"\",\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747948474968
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747948474968
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,8 @@
|
||||
"config": true,
|
||||
"control": true
|
||||
},
|
||||
"objectName": "ATS",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/ATS"
|
||||
"objectName": "VAV",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/VAV"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.tabsConfig": {
|
||||
@@ -164,20 +164,13 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -200,6 +193,14 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@@ -258,16 +259,11 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
@@ -330,6 +326,14 @@
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@@ -381,7 +385,8 @@
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
}
|
||||
},
|
||||
"currentTabIndex": 1
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"custom": {
|
||||
"target": "/DH201",
|
||||
"zoom": 100
|
||||
},
|
||||
"params": {
|
||||
"pageId": "value"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.target": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.zoom": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.pageId": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1000,
|
||||
"width": 1700
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "IFrame"
|
||||
},
|
||||
"position": {
|
||||
"height": 984,
|
||||
"width": 1400
|
||||
},
|
||||
"propConfig": {
|
||||
"props.src": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pageId": "{page.props.pageId}",
|
||||
"target": "{view.custom.target}",
|
||||
"zoom": "{view.custom.zoom}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn \"http://172.30.47.21:8088/system/webdev/SDC_PHX_A7/pan-zoom-iframe/html?gatewayAddress\u003dhttp://172.30.47.21:8088\u0026projectName\u003dSDC_PHX_A7\u0026targetURL\u003d\" + value[\u0027target\u0027] + \"\u0026targetDetailedURL\u003d\" + value[\u0027target\u0027] + \"\u0026height\u003d175%25\u0026width\u003d175%25\u0026pageId\u003d\" + value[\u0027pageId\u0027]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"allowFullScreen": true,
|
||||
"style": {
|
||||
"flex": "1 1 auto",
|
||||
"minHeight": "100%",
|
||||
"minWidth": "100%"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.iframe"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "CoordinateContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "820px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "280px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Cards/Card_DH_Control",
|
||||
"style": {
|
||||
"classes": "containers/card"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"gap": "var(--space-md)",
|
||||
"padding": "var(--space-md)"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "eqPopup",
|
||||
"pageScope": true,
|
||||
"script": "\ttagPath \u003d payload.get(\u0027tagPath\u0027)\n\tobjectName \u003d payload.get(\u0027objectName\u0027)\n\t\n\tparams \u003d {\n\t\t\"tagPath\": tagPath,\n\t\t\"objectName\": objectName\n\t}\n\t\n\tsystem.perspective.openPopup(\n\t\tid \u003d \"Popup_\" + objectName.replace(\" \", \"_\"),\n\t\tview \u003d \"Library/Templates/Base\",\n\t\tparams \u003d params,\n\t\tshowCloseIcon \u003d True,\n\t\tresizable \u003d True,\n\t\tdraggable \u003d True,\n\t\tmodal \u003d False,\n\t\twidth \u003d 800,\n\t\theight \u003d 835\n\t)",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
@@ -179,7 +179,8 @@
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
}
|
||||
},
|
||||
"currentTabIndex": 4
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1,418 @@
|
||||
{
|
||||
"custom": {
|
||||
"tabsConfig": {
|
||||
"tabs": [
|
||||
"Status",
|
||||
"Control",
|
||||
"Config",
|
||||
"Trend",
|
||||
"Meta",
|
||||
"Wiki"
|
||||
]
|
||||
},
|
||||
"trendConfig": {
|
||||
"selectedPens": []
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"auth": {
|
||||
"almAck": true,
|
||||
"almShelve": true,
|
||||
"config": true,
|
||||
"control": true
|
||||
},
|
||||
"objectName": "HUM",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1262/SATB1_GAL1262_HUM_02"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.tabsConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.tabsConfig.showConfig": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"1": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{1}/Config"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},false) !\u003d false",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.tabsConfig.showControl": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"fallbackDelay": 2.5,
|
||||
"mode": "indirect",
|
||||
"references": {
|
||||
"1": "{view.params.tagPath}"
|
||||
},
|
||||
"tagPath": "{1}/Control"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "coalesce({value},false) !\u003d false",
|
||||
"type": "expression"
|
||||
}
|
||||
],
|
||||
"type": "tag"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"params.auth": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.objectName": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Status"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Info\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Trend"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.custom.trendConfig.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Config"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Config\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"params": {
|
||||
"tagPath_2": "[Ignition_Common_IO_Gtwy]GAL1182/SATB1_DH5_HS1_GA1182_HUM2"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Meta"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Wiki"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Framework/Tag Notes/View Notes"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Control"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.tabIndex": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{parent.props.tabs}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn value.indexOf(self.meta.name)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.params.auth": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.auth"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.tagPath": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.tagPath"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Control\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "TabContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "300px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.tabs": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.custom.tabsConfig}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttabs \u003d value[\u0027tabs\u0027]\n\tshowConfig \u003d value[\u0027showConfig\u0027]\n\tshowControl \u003d value[\u0027showControl\u0027]\n\tif not showConfig:\n\t\ttabs.pop(tabs.indexOf(\u0027Config\u0027))\n\tif not showControl:\n\t\ttabs.pop(tabs.indexOf(\u0027Control\u0027))\n\t\n\treturn tabs",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"scripts": {
|
||||
"customMethods": [],
|
||||
"extensionFunctions": null,
|
||||
"messageHandlers": [
|
||||
{
|
||||
"messageType": "enableDisablePen",
|
||||
"pageScope": true,
|
||||
"script": "\t# When a pen is selected or de-selected on the trends page, this handler is\n\t# responsible for appending or removing the pen name from the proper trend\n\t# config list.\n\t\n\tname \u003d payload[\u0027name\u0027]\n\tenabledOrDisabled \u003d payload[\u0027enabledOrDisabled\u0027]\n\tgroup \u003d payload[\u0027group\u0027]\n\t\n\tif enabledOrDisabled \u003d\u003d True:\n\t\tif name not in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].append(name)\n\telse:\n\t\tif name in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].remove(name)",
|
||||
"sessionScope": false,
|
||||
"viewScope": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,16 @@
|
||||
"custom": {
|
||||
"Alarm": false,
|
||||
"AlarmSevery": 0,
|
||||
"ModeSts": 5,
|
||||
"RunStatus": 1,
|
||||
"Status": 1,
|
||||
"Tag": "CH01",
|
||||
"ModeSts": 0,
|
||||
"RunStatus": 0,
|
||||
"Status": 3,
|
||||
"Tag": "CH02",
|
||||
"available": 1,
|
||||
"maintenance": "value",
|
||||
"priority": 0
|
||||
},
|
||||
"params": {
|
||||
"CH": "01",
|
||||
"CH": "02",
|
||||
"LLS_tagPath": "[Ignition_Common_IO_Gtwy]CHWS/Chiller_LLS/Reference Devices",
|
||||
"MTR_tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH27_MOTOR",
|
||||
"SYS_tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH27_SYSTEM",
|
||||
@@ -22,7 +23,6 @@
|
||||
"config": {
|
||||
"path": "view.custom.AlarmSevery"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"expression": "if({value}\u003e0, True, False)",
|
||||
@@ -156,6 +156,9 @@
|
||||
},
|
||||
"persistent": true
|
||||
},
|
||||
"custom.maintenance": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.priority": {
|
||||
"binding": {
|
||||
"config": {
|
||||
@@ -201,7 +204,7 @@
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 65,
|
||||
"height": 60,
|
||||
"width": 50
|
||||
}
|
||||
},
|
||||
@@ -214,7 +217,7 @@
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"height": 65,
|
||||
"height": 60,
|
||||
"width": 50
|
||||
},
|
||||
"propConfig": {
|
||||
@@ -304,9 +307,6 @@
|
||||
"borderTopRightRadius": 5,
|
||||
"boxShadow": "var(--boxShadow2)",
|
||||
"classes": "containers/HoverOver",
|
||||
"outlineColor": "#000000",
|
||||
"outlineStyle": "none",
|
||||
"outlineWidth": "1",
|
||||
"paddingLeft": 2
|
||||
},
|
||||
"textStyle": {
|
||||
@@ -321,7 +321,7 @@
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"height": 28,
|
||||
"height": 26,
|
||||
"width": 42.98,
|
||||
"x": 4.07,
|
||||
"y": 12.72
|
||||
@@ -395,11 +395,10 @@
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"height": 20,
|
||||
"width": 20,
|
||||
"x": 4,
|
||||
"y": 42
|
||||
"y": 40
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Framework/Frwk_Badge_XS",
|
||||
@@ -419,7 +418,7 @@
|
||||
"height": 20,
|
||||
"width": 20,
|
||||
"x": 26,
|
||||
"y": 42
|
||||
"y": 40
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 122 KiB |
@@ -168,20 +168,13 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -270,16 +263,11 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
@@ -401,6 +389,7 @@
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
},
|
||||
"currentTabIndex": 3,
|
||||
"tabs": [
|
||||
"Status",
|
||||
"Config",
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 240
|
||||
"width": 220
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
@@ -344,7 +344,7 @@
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "/CHW_System",
|
||||
"target": "Library/Layouts/iFrame/Main",
|
||||
"target": "Pages/Mechanical/CHW_System",
|
||||
"zoom": "130%"
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -364,9 +364,9 @@
|
||||
"items": [
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "/DH101",
|
||||
"target": "Library/Layouts/iFrame/Main",
|
||||
"zoom": "143%"
|
||||
"GoTo": "",
|
||||
"target": "Development/testiframe",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
@@ -384,9 +384,9 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "/DH201",
|
||||
"target": "Library/Layouts/iFrame/Main",
|
||||
"zoom": "150%"
|
||||
"GoTo": "DH201",
|
||||
"target": "Library/Layouts/DH_L2",
|
||||
"zoom": 100
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
@@ -433,8 +433,8 @@
|
||||
"items": [
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/DOAS",
|
||||
"GoTo": "DOAS",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -443,8 +443,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/RTU",
|
||||
"GoTo": "RTU",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -453,8 +453,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/CRAH",
|
||||
"GoTo": "CRAH",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -463,8 +463,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/STU",
|
||||
"GoTo": "STU",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -473,8 +473,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/HUM",
|
||||
"GoTo": "HUM",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -483,8 +483,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/VAV",
|
||||
"GoTo": "VAV",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -493,8 +493,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/FCU",
|
||||
"GoTo": "FCU",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -503,8 +503,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/HVAC/EF",
|
||||
"GoTo": "EF",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": "value"
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -513,8 +513,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "value",
|
||||
"target": "Pages/HVAC/SP",
|
||||
"GoTo": "SP",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": "value"
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -522,7 +522,7 @@
|
||||
"label": "ESP"
|
||||
}
|
||||
],
|
||||
"label": "HVAC"
|
||||
"label": "Mechanical"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@@ -557,8 +557,8 @@
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/FireSystem/FireSystem",
|
||||
"GoTo": "FS",
|
||||
"target": "Library/Layouts/Equipment_L3",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
@@ -1123,7 +1123,88 @@
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"items": [
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "Frontend"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "IO1"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "IO2"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "IO3"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "IO4"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "IO5"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "Common IO"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"GoTo": "",
|
||||
"target": "Pages/Diagnostics/Connections",
|
||||
"zoom": ""
|
||||
},
|
||||
"expanded": false,
|
||||
"items": [],
|
||||
"label": "MQTT Gtwy"
|
||||
}
|
||||
],
|
||||
"label": "Gateways"
|
||||
},
|
||||
{
|
||||
@@ -1137,7 +1218,7 @@
|
||||
"label": "Connections"
|
||||
}
|
||||
],
|
||||
"label": "Diagnotics \u0026 Tools"
|
||||
"label": "Diagnostics \u0026 Tools"
|
||||
}
|
||||
],
|
||||
"selection": [
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 942,
|
||||
"width": 1668
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "IFrame"
|
||||
},
|
||||
"position": {
|
||||
"height": 928,
|
||||
"width": 1356
|
||||
},
|
||||
"propConfig": {
|
||||
"props.src": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pageId": "{page.props.pageId}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\treturn \"http://172.30.47.21:8088/system/webdev/SDC_PHX_A7/pan-zoom-iframe/html?gatewayAddress\u003dhttp://172.30.47.21:8088\u0026projectName\u003dSDC_PHX_A7\u0026targetURL\u003d/DH201\u0026targetDetailedURL\u003d/DH201\u0026height\u003d175%25\u0026width\u003d175%25\u0026pageId\u003d\" + value[\u0027pageId\u0027]",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"allowFullScreen": true
|
||||
},
|
||||
"type": "ia.display.iframe"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "EmbeddedView"
|
||||
},
|
||||
"position": {
|
||||
"height": 938,
|
||||
"width": 320,
|
||||
"x": 1330
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Cards/Card_DH_Control",
|
||||
"style": {
|
||||
"classes": "containers/card"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"position": {
|
||||
"x": -90,
|
||||
"y": -170
|
||||
},
|
||||
"type": "ia.container.coord"
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,8 @@
|
||||
"config": true,
|
||||
"control": true
|
||||
},
|
||||
"objectName": "Breaker",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]ER1151/SATB1_MPR1151_HS1_FE1"
|
||||
"objectName": "SWBDPQM",
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]ER1242_P1-1/SWBD/SATB1_ER1242_PQM1"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.tabsConfig": {
|
||||
@@ -113,13 +113,20 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Info\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Breaker E/Info"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -157,20 +164,13 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -251,16 +251,11 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
@@ -374,7 +369,8 @@
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
}
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 28 KiB |
@@ -67,8 +67,8 @@ def doGet(request, session):
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
#content {
|
||||
@@ -78,8 +78,8 @@ def doGet(request, session):
|
||||
top: 62px;
|
||||
width: 100%; /*replace-width*/
|
||||
height: 100%; /*replace-height*/
|
||||
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
#overlay {
|
||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1,480 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_SATB1_IO2_default]ER1248/SATB1_P2_1_ER1248_CRAH_01"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947747922
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747947747922
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.5 KiB |
@@ -1,773 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {
|
||||
"allPens": [
|
||||
{
|
||||
"group": "%",
|
||||
"penList": [
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "%",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "CHW Valve Feedback",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/CHW Valve Feedback"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "%",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Comm Percentage",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Comm Percentage"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "% Full Speed",
|
||||
"penList": [
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "% Full Speed",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Speed Feedback",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Speed Feedback"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Hrs",
|
||||
"penList": [
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "Hrs",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Runtime",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Runtime"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "misc",
|
||||
"penList": [
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "CMD_Out",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/CMD_Out"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "EquipCounts",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/EquipCounts"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Status Available",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Status Available"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Status Running",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Status Running"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1A",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1A"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1B",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1B"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1C",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1C"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1D",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1D"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1E",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1E"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1F",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1F"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1G",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1G"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1H",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1H"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Fan Status 1I",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Fan Status 1I"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "misc",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Unit Status",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Unit Status"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "°F",
|
||||
"penList": [
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "°F",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Discharge Air Temperature A",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Discharge Air Temperature A"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "°F",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Discharge Air Temperature B",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Discharge Air Temperature B"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "°F",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Discharge Air Temperature C",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Discharge Air Temperature C"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "°F",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Return Air Temperature",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Return Air Temperature"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "°F",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Return Water Temperature",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Return Water Temperature"
|
||||
},
|
||||
{
|
||||
"color": "",
|
||||
"enabled": false,
|
||||
"engUnit": "°F",
|
||||
"instancePosition": {},
|
||||
"instanceStyle": {
|
||||
"classes": ""
|
||||
},
|
||||
"name": "Supply Water Temperature",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06/Supply Water Temperature"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]GAL1282/SATB1_GAL1282_DH4_STU06"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"custom": {
|
||||
"historianSettings": {
|
||||
"dateFormat": "YYYY/MM/DD",
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747948508092
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"export": {
|
||||
"dateFormat": "None",
|
||||
"timeFormat": "x"
|
||||
},
|
||||
"measureOfTime": "hours",
|
||||
"mode": "realtime",
|
||||
"penNamePathDepth": 1,
|
||||
"pointCount": 300,
|
||||
"rangeEndDate": null,
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"rangeStartDate": null,
|
||||
"refreshRate": 1000,
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1747948508092
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"tagBrowserStartPath": "",
|
||||
"timeFormat": "h:mm A",
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showFullscreenButton": true,
|
||||
"showMoreButton": true,
|
||||
"showPanZoomButton": true,
|
||||
"showRangeBrushButton": true,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false,
|
||||
"showXTraceButton": true
|
||||
},
|
||||
"showDateRangeSelector": true,
|
||||
"showPenControlDisplay": true,
|
||||
"showTagBrowser": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
@@ -1,428 +0,0 @@
|
||||
{
|
||||
"custom": {
|
||||
"trendConfig": {}
|
||||
},
|
||||
"params": {
|
||||
"selectedPens": [],
|
||||
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/VSD 1"
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.trendConfig": {
|
||||
"persistent": true
|
||||
},
|
||||
"custom.trendConfig.allPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"custom.trendConfig.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.selectedPens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"params.selectedPens": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.tagPath": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ToggleSwitch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "34px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"label": {
|
||||
"text": "Table View"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.toggle-switch"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "FlexRepeater"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.instances": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"allPens": "{view.custom.trendConfig.allPens}",
|
||||
"selectedPens": "{view.custom.trendConfig.selectedPens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"elementPosition": {
|
||||
"basis": "auto",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
},
|
||||
"path": "Library/Templates/Framework/Pen List",
|
||||
"useDefaultViewHeight": false,
|
||||
"useDefaultViewWidth": false
|
||||
},
|
||||
"type": "ia.display.flex-repeater"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Lists"
|
||||
},
|
||||
"position": {
|
||||
"basis": "250px"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"border": "1px solid var(--border)",
|
||||
"border-right": "none"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"domId": "CustomPowerChart",
|
||||
"name": "Power Chart"
|
||||
},
|
||||
"position": {
|
||||
"basis": "800px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"axes": "{this.props.axes}",
|
||||
"pens": "{view.custom.trendConfig.selectedPens}",
|
||||
"tagPath": "{view.params.tagPath}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
|
||||
"type": "script"
|
||||
},
|
||||
{
|
||||
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"props.axes": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
},
|
||||
"props.config": {
|
||||
"onChange": {
|
||||
"enabled": null,
|
||||
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
|
||||
}
|
||||
},
|
||||
"props.pens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"struct": {
|
||||
"enabledPens": "{view.custom.trendConfig.selectedPens}",
|
||||
"pens": "{this.custom.pens}"
|
||||
},
|
||||
"waitOnAll": true
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr-struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"config": {
|
||||
"endDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730879940000
|
||||
},
|
||||
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
|
||||
"responsiveDesignWidth": 100,
|
||||
"startDate": {
|
||||
"$": [
|
||||
"ts",
|
||||
0,
|
||||
1731972292627
|
||||
],
|
||||
"$ts": 1730733759000
|
||||
},
|
||||
"unitOfTime": 2,
|
||||
"visibility": {
|
||||
"buttons": {
|
||||
"showAnnotationButton": false,
|
||||
"showSettingsButton": false,
|
||||
"showTagBrowserButton": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"interaction": {
|
||||
"chartZoomLevel": 1,
|
||||
"rangeZoomLevel": 1
|
||||
},
|
||||
"plots": [
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 3,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 2,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"color": "transparent",
|
||||
"markers": [],
|
||||
"relativeWeight": 1,
|
||||
"style": {
|
||||
"classes": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "ia.chart.powerchart"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label",
|
||||
"visible": false
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px"
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Power Chart.props.pens"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"color": "--neutral-80",
|
||||
"fontSize": "14px",
|
||||
"marginTop": "-143px",
|
||||
"minHeight": "-143px"
|
||||
},
|
||||
"text": "Please select a tag."
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Pens Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "0px"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"overflow": "visible",
|
||||
"zIndex": 0
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "TrendTable"
|
||||
},
|
||||
"position": {
|
||||
"basis": "320px",
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"position.display": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": ".../Pens Lists/ToggleSwitch.props.selected"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.historianSettings": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "..../FlexContainer.custom.historianSettings"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.params.selectedPens": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "../Power Chart.props.pens"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Framework/TrendTable"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "Chart Cont"
|
||||
},
|
||||
"position": {
|
||||
"basis": "200px",
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"basis": "100%"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "containers/padded-container"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -157,20 +157,13 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"loading": {
|
||||
"order": "with-parent"
|
||||
}
|
||||
},
|
||||
"path": "Library/Templates/Trends"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -251,16 +244,11 @@
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
},
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Templates/Meta"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
@@ -374,7 +362,8 @@
|
||||
"props": {
|
||||
"contentStyle": {
|
||||
"backgroundColor": "var(--container)"
|
||||
}
|
||||
},
|
||||
"currentTabIndex": 2
|
||||
},
|
||||
"type": "ia.container.tab"
|
||||
}
|
||||
@@ -71,7 +71,8 @@
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"width": 1200
|
||||
"height": 1000,
|
||||
"width": 1276
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
|
Before Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,207 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"GoTo": "DOAS",
|
||||
"Zoom": "value"
|
||||
},
|
||||
"propConfig": {
|
||||
"params.GoTo": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
},
|
||||
"params.Zoom": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 1000,
|
||||
"width": 1700
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label"
|
||||
},
|
||||
"position": {
|
||||
"basis": "32px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.GoTo} + \" Details Page.\""
|
||||
},
|
||||
"type": "expr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"textStyle": {
|
||||
"classes": "labels/H2"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Label_0"
|
||||
},
|
||||
"position": {
|
||||
"basis": "1px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"backgroundColor": "var(--text-muted)"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Details"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.GoTo"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "CRAH",
|
||||
"output": "Pages/HVAC/CRAH"
|
||||
},
|
||||
{
|
||||
"input": "DOAS",
|
||||
"output": "Pages/HVAC/DOAS"
|
||||
},
|
||||
{
|
||||
"input": "EF",
|
||||
"output": "Pages/HVAC/EF"
|
||||
},
|
||||
{
|
||||
"input": "FCU",
|
||||
"output": "Pages/HVAC/FCU"
|
||||
},
|
||||
{
|
||||
"input": "HUM",
|
||||
"output": "Pages/HVAC/HUM"
|
||||
},
|
||||
{
|
||||
"input": "RTU",
|
||||
"output": "Pages/HVAC/RTU"
|
||||
},
|
||||
{
|
||||
"input": "SP",
|
||||
"output": "Pages/HVAC/SP"
|
||||
},
|
||||
{
|
||||
"input": "STU",
|
||||
"output": "Pages/HVAC/STU"
|
||||
},
|
||||
{
|
||||
"input": "VAV",
|
||||
"output": "Pages/HVAC/VAV"
|
||||
},
|
||||
{
|
||||
"input": "FS",
|
||||
"output": "Pages/FireSystem/FireSystem"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"embedded": false,
|
||||
"objectName": "DOAS",
|
||||
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_DOAS01"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "FlexContainer"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"path": "value"
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "Details"
|
||||
},
|
||||
"position": {
|
||||
"basis": "400px"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.path": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.type"
|
||||
},
|
||||
"enabled": false,
|
||||
"transforms": [
|
||||
{
|
||||
"fallback": null,
|
||||
"inputType": "scalar",
|
||||
"mappings": [
|
||||
{
|
||||
"input": "DOAS",
|
||||
"output": "Library/Cards/Card_DOAS"
|
||||
}
|
||||
],
|
||||
"outputType": "scalar",
|
||||
"type": "map"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"path": "Library/Cards/Card_L3_Navigation",
|
||||
"style": {
|
||||
"classes": "containers/card"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"gap": "var(--space-md)",
|
||||
"padding": "var(--space-md)"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 19 KiB |