{ "custom": {}, "params": { "tab": "Active Alarms" }, "propConfig": { "params.tab": { "paramDirection": "input", "persistent": true } }, "props": { "defaultSize": { "height": 400, "width": 1600 } }, "root": { "children": [ { "meta": { "name": "Label" }, "position": { "height": 40, "width": "100%" }, "propConfig": { "props.text": { "binding": { "config": { "expression": " property(\"../TabContainer.props.tabs[\"+{../TabContainer.props.currentTabIndex}+\"]\")\r\n+if(len({../EmbeddedView.props.params.titleExtra})\u003e0,\r\n\t\" (\" + {../EmbeddedView.props.params.titleExtra} + \")\",\r\n\t\"\"\r\n)" }, "type": "expr" } } }, "props": { "style": { "backgroundColor": "#1A4A5E", "borderBottomColor": "#000000", "borderBottomStyle": "solid", "borderBottomWidth": "2px", "color": "#fff", "fontFamily": "Helvetica", "fontSize": "20px", "fontWeight": "bold", "textAlign": "center" } }, "type": "ia.display.label" }, { "meta": { "name": "Dropdown" }, "position": { "height": 20, "width": 120, "x": "calc(100% - 230px)", "y": 10 }, "props": { "options": [ { "label": "Error", "value": [ "Error" ] }, { "label": "Warning", "value": [ "Warning", "Error" ] }, { "label": "Message", "value": [ "Message", "Warning", "Error" ] } ], "search": { "enabled": false }, "style": { "fontSize": "14px" }, "value": [ "Error" ] }, "type": "ia.input.dropdown" }, { "meta": { "name": "Label_0" }, "position": { "height": 20, "width": 100, "x": "calc(100% - 335px)", "y": 10 }, "props": { "style": { "color": "#fff", "fontSize": "14px", "textAlign": "right" }, "text": "Min Class:" }, "type": "ia.display.label" }, { "events": { "component": { "onActionPerformed": { "config": { "script": "\tsystem.perspective.sendMessage(\"export-data\")" }, "scope": "G", "type": "script" } } }, "meta": { "name": "Button" }, "position": { "height": 30, "width": 100, "x": "calc(100% - 105px)", "y": 5 }, "props": { "style": { "classes": "Buttons/Grey" }, "text": "Export" }, "type": "ia.input.button" }, { "custom": { "pages": [ "Active", "History", "HitList" ] }, "meta": { "name": "TabContainer" }, "position": { "height": "calc(100% - 40px)", "width": "100%", "y": 40 }, "propConfig": { "props.currentTabIndex": { "binding": { "config": { "path": "page.props.path" }, "transforms": [ { "code": "\ttab \u003d self.page.props.path.split(\"/\")[-1]\n\t# Search for tab:\n\tfor i, page in enumerate(self.custom.pages):\n\t\tif page.lower() \u003d\u003d tab:\n\t\t\treturn i\n\t# Default value in case of not finding the tab\n\treturn 0", "type": "script" } ], "type": "property" }, "onChange": { "enabled": null, "script": "\tpage \u003d \"/alarms/\"+self.custom.pages[self.props.currentTabIndex].lower()\n\tif previousValue \u003c\u003e currentValue and self.page.props.path.lower() \u003c\u003e page.lower():\n\t\tsystem.perspective.navigate(page)" }, "persistent": true } }, "props": { "menuStyle": { "backgroundColor": "#225E77" }, "tabSize": { "width": 130 }, "tabStyle": { "active": { "backgroundColor": "#2D7D9F", "color": "#FFF", "fontWeight": "bold" }, "inactive": { "backgroundColor": "#389CC7", "color": "#FFF" } }, "tabs": [ "Active Alarms", "Alarm History", "Alarm Hit List" ] }, "type": "ia.container.tab" }, { "meta": { "name": "EmbeddedView" }, "position": { "height": "calc(100% - 76px)", "width": "100%", "y": 76 }, "propConfig": { "props.params.classDropdownValue": { "binding": { "config": { "path": "../Dropdown.props.value" }, "type": "property" }, "persistent": true }, "props.path": { "binding": { "config": { "expression": " \"Windows/Alarms/\"\r\n+property(\"../TabContainer.custom.pages[\"+{../TabContainer.props.currentTabIndex}+\"]\")" }, "transforms": [ { "code": "\t# Reset the titleExtra whenever the view is changed to prevent the numbers from showing while loading the new view:\n\tif value \u003c\u003e self.props.path:\n\t\tself.props.params.titleExtra \u003d \"\"\n\t# Return new view path:\n\treturn value", "type": "script" } ], "type": "expr" }, "persistent": true } }, "props": { "params": { "classDropdownValue": [ "Error" ], "titleExtra": "24 rows" }, "path": "Windows/Alarms/Active" }, "type": "ia.display.view" }, { "meta": { "name": "TimeWidget" }, "position": { "height": 40, "width": 600 }, "propConfig": { "meta.visible": { "binding": { "config": { "path": "../TabContainer.props.currentTabIndex" }, "transforms": [ { "fallback": false, "inputType": "scalar", "mappings": [ { "input": 1, "output": true }, { "input": 2, "output": true } ], "outputType": "scalar", "type": "map" } ], "type": "property" } } }, "props": { "params": { "endDate": "2021-02-13 00:00:00", "startDate": "2021-02-12 00:00:00" }, "path": "Templates/Widget/TimeWidget" }, "type": "ia.display.view" } ], "meta": { "name": "root" }, "props": { "style": { "min-width": "1000px" } }, "type": "ia.container.coord" } }