SAT9/.resources/46644d07a912b1e90730d28b170a8e2c644db7cd75c205dba0b18f21c9e8f7b7

7467 lines
299 KiB
Plaintext

{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 1080,
"width": 1920
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "FlexContainer_0"
},
"position": {
"height": 0.9124,
"width": 0.2638,
"x": 0.0026,
"y": 0.0626
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "FlexContainer_2"
},
"position": {
"height": 0.0529,
"width": 0.9791,
"x": 0.0025,
"y": -0.002
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "FlexContainer_1",
"visible": false
},
"position": {
"height": 0.1482,
"width": 0.3717,
"x": 0.2761,
"y": 0.8209
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"events": {
"component": {
"onEditCellCommit": {
"config": {
"script": "\tpayload \u003d {\n\t\t\"Msg\":\"Event is %s\"%str(event)\n\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tsystem.perspective.sendMessage(\"updateAlarmNote\", event, \"page\")"
},
"scope": "G",
"type": "script"
},
"onRowDoubleClick": {
"config": {
"script": "\tselectedRowValue\u003devent[\"value\"]\n\tpayload\u003d{\"ID\":selectedRowValue[\"ID\"],\"Name\":selectedRowValue[\"Name\"],\"Priority\":selectedRowValue[\"Priority\"]}\n\tsystem.perspective.sendMessage(\"alarmsTab_selectAlarm\",payload)\n"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "tableAlarms"
},
"position": {
"height": 0.7411,
"width": 0.708,
"x": 0.2749,
"y": 0.0632
},
"propConfig": {
"props.data": {
"binding": {
"config": {
"bidirectional": true,
"path": "session.custom.alarms"
},
"type": "property"
}
}
},
"props": {
"cells": {
"style": {
"overflow": "hidden"
}
},
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Row",
"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": "center",
"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": false,
"width": ""
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "ID",
"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": "center",
"style": {
"classes": ""
},
"title": ""
},
"justify": "center",
"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": true,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 80
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Name",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": true,
"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",
"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": "string",
"resizable": true,
"sort": "none",
"sortable": true,
"strictWidth": true,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 400
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Priority",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": true,
"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",
"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": "string",
"resizable": true,
"sort": "none",
"sortable": true,
"strictWidth": true,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 150
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Type",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": true,
"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",
"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": "string",
"resizable": false,
"sort": "none",
"sortable": false,
"strictWidth": false,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": false,
"width": ""
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Tested_date_UTC",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": true,
"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",
"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": "string",
"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": "Result",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": true,
"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",
"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": "string",
"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": true,
"field": "Notes",
"filter": {
"boolean": {
"condition": ""
},
"date": {
"condition": "",
"value": ""
},
"enabled": true,
"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",
"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": "string",
"resizable": true,
"sort": "none",
"sortable": true,
"strictWidth": false,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": ""
}
],
"dragOrderable": false,
"pager": {
"bottom": false,
"initialOption": 1000
},
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10,
"overflow": "auto"
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "updateAlarmNote",
"pageScope": true,
"script": "\t# implement your handler here\n\trow_index \u003d payload[\"rowIndex\"]\n\tcolumn \u003d payload[\"column\"]\n\t\n\tself.props.data[row_index][column] \u003d payload[\"value\"]",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.display.table"
},
{
"meta": {
"name": "Label_7"
},
"position": {
"height": 0.0318,
"width": 0.0626,
"x": -0.0988,
"y": 0.3665
},
"props": {
"text": "Timestamp ms"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_4",
"visible": false
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.1666,
"x": 0.2988,
"y": 0.8376
},
"props": {
"style": {
"fontWeight": "bolder"
},
"text": "Information"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{}\n\tpayload[\"containerName\"]\u003dself.parent.meta.name\n\tpayload[\"targetTable\"]\u003d\"tableAlarms\"\n\tsystem.perspective.sendMessage(\"exportFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_18",
"tooltip": {
"enabled": true,
"text": "Exports Alarms Table Data"
}
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1933,
"y": 0.9258
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/import_export"
}
},
"primary": false,
"text": "Export"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"alarmsTab_init\")\n\tself.session.custom.alarms \u003d[]"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit",
"tooltip": {
"enabled": true,
"text": "Reset Alarm List and User Inputs"
}
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1224,
"y": 0.9258
},
"props": {
"image": {
"height": 32,
"icon": {
"color": "#000000",
"path": "material/refresh"
}
},
"primary": false,
"text": "Reset"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.view.getChild(\"root\").custom.displayUpload \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Uploads"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.0193,
"y": 0.0173
},
"props": {
"image": {
"icon": {
"path": "material/import_export"
}
},
"primary": false,
"text": "Uploads"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"status\":1,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_12",
"tooltip": {
"enabled": true,
"text": "Send Alarm Active Message"
}
},
"position": {
"height": 0.0385,
"width": 0.1408,
"x": 0.1223,
"y": 0.3082
},
"props": {
"image": {
"icon": {
"color": "#FFFFFF",
"path": "material/power_settings_new"
}
},
"text": "Activate"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"status\":0,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_13",
"tooltip": {
"enabled": true,
"text": "Send Alarm De-active Message"
}
},
"position": {
"height": 0.0385,
"width": 0.1408,
"x": 0.1223,
"y": 0.3515
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/not_interested"
}
},
"primary": false,
"text": "De-activate"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "textFieldEventsCommandParams_Timestamp",
"visible": false
},
"position": {
"height": 0.0318,
"width": 0.1079,
"x": 0.1223,
"y": 0.2716
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "toStr(toMillis({../DateTimeInput.props.value}))"
},
"type": "expr"
}
}
},
"props": {
"style": {
"textAlign": "right"
},
"tex": ""
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_10"
},
"position": {
"height": 0.0318,
"width": 0.0803,
"x": 0.0287,
"y": 0.1251
},
"props": {
"text": "Controller"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "dropdownEventsCommandParams_Target"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.142,
"x": 0.1223,
"y": 0.0886
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": "session.custom.sources"
},
"transforms": [
{
"code": "\toptions \u003d []\n\tfor source in value :\n\t\topt \u003d {\n\t\t \"value\":source[\"Source\"],\n\t\t \"label\":source[\"Source\"]\n\t\t}\n\t\toptions.append(opt)\n\t\t\n\treturn options ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"showClearIcon": true,
"value": null
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "textFieldEventsCommandParams_EventDescription"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "375% -109%"
},
"width": 0.1418,
"x": 0.1223,
"y": 0.1617
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"tex": ""
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_8"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.0803,
"x": 0.0287,
"y": 0.0886
},
"props": {
"text": "Source ID"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_14"
},
"position": {
"height": 0.0318,
"width": 0.0803,
"x": 0.0287,
"y": 0.1617
},
"props": {
"text": "Alarm Description"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"testResult\":\"PASSED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_14",
"tooltip": {
"enabled": true,
"text": "Scada State Matches Alarms State "
}
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1223,
"y": 0.4429
},
"props": {
"image": {
"icon": {
"color": "#323232",
"path": "material/check_circle_outline"
}
},
"primary": false,
"text": "Passed"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"testResult\":\"FAILED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_15",
"tooltip": {
"enabled": true,
"text": "Scada State Does Not Matche Alarms State "
}
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1932,
"y": 0.4429
},
"props": {
"image": {
"icon": {
"color": "#323232",
"path": "material/highlight_off"
}
},
"primary": false,
"text": "Failed"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_6"
},
"position": {
"height": 0.0318,
"width": 0.0803,
"x": 0.0287,
"y": 0.1983
},
"props": {
"text": "ID"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldEventsCommandParams_EventID"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "375% -109%"
},
"width": 0.1418,
"x": 0.1223,
"y": 0.1983
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"tex": ""
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_13"
},
"position": {
"height": 0.0318,
"width": 0.0803,
"x": 0.0287,
"y": 0.2348
},
"props": {
"text": "Priority"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textField_alarmPriority",
"tooltip": {
"style": {
"classes": "Alarms-Styles/Critical"
}
}
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "375% -109%"
},
"width": 0.1418,
"x": 0.1223,
"y": 0.2348
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"tex": ""
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_20"
},
"position": {
"height": 0.0318,
"width": 0.0803,
"x": 0.0287,
"y": 0.2714
},
"props": {
"text": "Date and time"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DateTimeInput"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "-58% 268%"
},
"width": 0.1079,
"x": 0.1223,
"y": 0.2714
},
"props": {
"format": "YYYY-MM-DD hh:mm:ss",
"formattedValue": "2023-08-29 12:11:39",
"tex": "",
"text": "",
"value": 1693311099006
},
"type": "ia.input.date-time-input"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\t\n\tnow \u003d system.date.now()\n\t\n\ttimeNow\u003dsystem.date.toMillis(now)\n\tself.getSibling(\"DateTimeInput\").props.value \u003d timeNow\n\t\n\t\n\tMsg \u003d \"Setting time of message to %s\"%now\n\tpayload \u003d {\n\t\t\"Msg\":Msg\n\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit_2"
},
"position": {
"height": 0.0318,
"width": 0.0308,
"x": 0.2328,
"y": 0.2727
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/access_time"
}
},
"primary": false,
"text": ""
},
"type": "ia.input.button"
},
{
"meta": {
"name": "textFieldTargetPLC"
},
"position": {
"height": 0.0318,
"width": 0.142,
"x": 0.1223,
"y": 0.1251
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "../dropdownEventsCommandParams_Target.props.value"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value.split(\"/\")[0]\n\texcept:\n\t\treturn \"\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"tex": ""
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "EmbeddedView",
"tooltip": {
"enabled": true,
"text": "User Feedback"
}
},
"position": {
"height": 0.153,
"width": 0.708,
"x": 0.2742,
"y": 0.82
},
"props": {
"path": "Main-Views/Commissioning Tool/UserFeedBack",
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10,
"overflow": "auto"
}
},
"type": "ia.display.view"
}
],
"custom": {
"dateTimeCommandSent": {
"$": [
"ts",
192,
1668596541256
],
"$ts": 1668596541109
},
"testingAlarmPriority1": "",
"testingAlarmPriority2": "",
"testingAlarmPriority3": "",
"testingAlarmPriority4": ""
},
"meta": {
"name": "ContainerAlarms"
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
},
{
"children": [
{
"meta": {
"name": "FlexContainer_3"
},
"position": {
"height": 0.9105,
"width": 0.2664,
"x": 0.0021,
"y": 0.0644
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "FlexContainer_2"
},
"position": {
"height": 0.0549,
"width": 0.9776,
"x": 0.0026,
"y": -0.001
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"events": {
"component": {
"onEditCellCommit": {
"config": {
"script": "\tpayload \u003d {\n\t\t\"Msg\":\"Event is %s\"%str(event)\n\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tsystem.perspective.sendMessage(\"updateSourceNote\", event, \"page\")"
},
"scope": "G",
"type": "script"
},
"onRowDoubleClick": {
"config": {
"script": "\tselectedRowValue\u003devent[\"value\"]\n\tpayload\u003d{\"Source\":selectedRowValue[\"Source\"]}\n\tsystem.perspective.sendMessage(\"sourcesTab_selectSource\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "tableSources"
},
"position": {
"height": 0.7382,
"width": 0.7049,
"x": 0.2751,
"y": 0.0649
},
"propConfig": {
"props.data": {
"binding": {
"config": {
"bidirectional": true,
"path": "session.custom.sources"
},
"type": "property"
}
}
},
"props": {
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Row",
"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",
"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": false,
"width": ""
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "ID",
"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": "center",
"style": {
"classes": ""
},
"title": ""
},
"justify": "center",
"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": true,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 80
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Source",
"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",
"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": "Tested_date_UTC",
"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",
"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": "Result",
"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",
"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": true,
"field": "Notes",
"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",
"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": ""
}
],
"pager": {
"initialOption": 1000
},
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10,
"overflow": "auto"
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "updateSourceNote",
"pageScope": true,
"script": "\t# implement your handler here\n\trow_index \u003d payload[\"rowIndex\"]\n\tcolumn \u003d payload[\"column\"]\n\t\n\tself.props.data[row_index][column] \u003d payload[\"value\"]",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.display.table"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"sourcesTab_init\")\n\tself.session.custom.sources \u003d []\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1286,
"y": 0.9241
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/refresh"
}
},
"primary": false,
"text": "Reset"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_8"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 133%"
},
"width": 0.0808,
"x": 0.0293,
"y": 0.0898
},
"props": {
"text": "Source ID"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldEventsCommandParams_Timestamp",
"visible": false
},
"position": {
"height": 0.0318,
"width": 0.1084,
"x": 0.1231,
"y": 0.2387
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "toStr(toMillis({../DateTimeInput.props.value}))"
},
"type": "expr"
}
}
},
"props": {
"style": {
"textAlign": "right"
}
},
"type": "ia.input.text-field"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\t\n\ttimeNow\u003dsystem.date.toMillis(system.date.now())\n\tself.getSibling(\"DateTimeInput\").props.value \u003d timeNow\n\tself.getSibling(\"textFieldEventsCommandParams_Timestamp\").props.text \u003d timeNow\n\t\n\tMsg \u003d \"Setting time of message to %s\"%system.date.now()\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit_1"
},
"position": {
"height": 0.0318,
"width": 0.0287,
"x": 0.2364,
"y": 0.2387
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/access_time"
}
},
"primary": false,
"text": ""
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_6"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0291,
"y": 0.3118
},
"props": {
"text": "ID"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldEventsCommandParams_EventID"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "375% -109%"
},
"width": 0.1403,
"x": 0.1246,
"y": 0.3118
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"text": "1"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_14"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0291,
"y": 0.2013
},
"props": {
"text": "Alarm Description"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldEventsCommandParams_EventDescription"
},
"position": {
"height": 0.0318,
"width": 0.1423,
"x": 0.124,
"y": 0.2013
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"text": "AccessDoorOpenedFault1"
},
"type": "ia.input.text-field"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"status\":1,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_12"
},
"position": {
"height": 0.0385,
"width": 0.1387,
"x": 0.1251,
"y": 0.3484
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/power_settings_new"
}
},
"text": "Activate"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"status\":0,\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"sendSimulationEvent\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_13"
},
"position": {
"height": 0.0385,
"width": 0.1387,
"x": 0.1251,
"y": 0.3917
},
"props": {
"image": {
"icon": {
"color": "000000",
"path": "material/not_interested"
}
},
"primary": false,
"text": "De-activate"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"testResult\":\"PASSED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_15"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1242,
"y": 0.5462
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/check_circle_outline"
}
},
"primary": false,
"text": "Passed"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"testResult\":\"FAILED\",\"containerName\":self.parent.meta.name}\n\tsystem.perspective.sendMessage(\"setTestResult\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_16"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1961,
"y": 0.5462
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/highlight_off"
}
},
"primary": false,
"text": "Failed"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{}\n\tpayload[\"containerName\"]\u003dself.parent.meta.name\n\tpayload[\"targetTable\"]\u003d\"tableSources\"\n\tsystem.perspective.sendMessage(\"exportFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_18"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.2007,
"y": 0.9243
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/import_export"
}
},
"primary": false,
"text": "Export"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\talarm \u003d self.parent.custom.testingAlarmPriority1\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_17"
},
"position": {
"height": 0.0318,
"width": 0.0261,
"x": 0.1254,
"y": 0.1631
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "if({parent.custom.testingAlarmPriority1}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority1}\u003d\u0027\u0027, False, True) "
},
"type": "expr"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "session.custom.colours.colour_impaired"
},
"transforms": [
{
"code": "\tif not value:\n\t\treturn \"Alarms-Styles/Diagnostic\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/Diagnostic\"\n\t\t ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"style": {},
"text": 1
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\talarm \u003d self.parent.custom.testingAlarmPriority2\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_19"
},
"position": {
"height": 0.0318,
"width": 0.0266,
"x": 0.1566,
"y": 0.1631
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "if({parent.custom.testingAlarmPriority2}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority2}\u003d\u0027\u0027, False, True) "
},
"type": "expr"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "session.custom.colours.colour_impaired"
},
"transforms": [
{
"code": "\tif not value:\n\t\treturn \"Alarms-Styles/Low\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/Low\"\n\t\t ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"style": {},
"text": 2
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\talarm \u003d self.parent.custom.testingAlarmPriority3\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_20"
},
"position": {
"height": 0.0318,
"width": 0.0261,
"x": 0.1879,
"y": 0.1631
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "if({parent.custom.testingAlarmPriority3}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority3}\u003d\u0027\u0027, False, True) "
},
"type": "expr"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "session.custom.colours.colour_impaired"
},
"transforms": [
{
"code": "\tif not value:\n\t\treturn \"Alarms-Styles/Medium\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/Medium\"\n\t\t ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"style": {},
"text": 3
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\talarm \u003d self.parent.custom.testingAlarmPriority4\n\tpayload\u003d{\"alarm\":alarm}\n\tsystem.perspective.sendMessage(\"sourcesTab_setAlarm\", payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_21"
},
"position": {
"height": 0.0318,
"width": 0.0261,
"x": 0.2192,
"y": 0.1631
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "if({parent.custom.testingAlarmPriority4}\u003d\u0027{}\u0027 || {parent.custom.testingAlarmPriority4}\u003d\u0027\u0027, False, True) "
},
"type": "expr"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "session.custom.colours.colour_impaired"
},
"transforms": [
{
"code": "\tif not value:\n\t\treturn \"Alarms-Styles/High\"\n\telse:\n\t\treturn \"Alarms-Styles/Alt-Colours/High\"\n\t\t ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"style": {},
"text": 4
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_13"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0291,
"y": 0.2752
},
"props": {
"text": "Priority"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textField_alarmPriority",
"tooltip": {
"style": {
"classes": "Alarms-Styles/Critical"
}
}
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "375% -109%"
},
"width": 0.1403,
"x": 0.1241,
"y": 0.2752
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"text": "High"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_20"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0291,
"y": 0.2361
},
"props": {
"text": "Date and time"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DateTimeInput"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 62%"
},
"width": 0.1074,
"x": 0.1242,
"y": 0.2377
},
"props": {
"format": "YYYY-MM-DD hh:mm:ss",
"formattedValue": "2023-08-30 12:28:29",
"text": "",
"value": 1693398509608
},
"type": "ia.input.date-time-input"
},
{
"meta": {
"name": "Label_11"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0291,
"y": 0.1264
},
"props": {
"text": "Controller"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldTargetPLC"
},
"position": {
"height": 0.0318,
"width": 0.1418,
"x": 0.1242,
"y": 0.1264
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "../textField_SelectedTarget.props.text"
},
"transforms": [
{
"code": "\treturn value.split(\"/\")[0]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"tex": ""
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_16"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0294,
"y": 0.1631
},
"props": {
"text": "Alarm Priority"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textField_SelectedTarget"
},
"position": {
"height": 0.0318,
"width": 0.1423,
"x": 0.124,
"y": 0.0898
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
},
"tex": "",
"text": "PLC01/UL5-2/ESTOP2"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "StatusIcon"
},
"position": {
"height": 0.0799,
"rotate": {
"anchor": "50% 40%"
},
"width": 0.0693,
"x": 0.1954,
"y": 0.4562
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({this.props.params.tagProps[0]}\u003d\u0027\u0027,False,True)"
},
"type": "expr"
}
},
"props.params.tagProps[0]": {
"binding": {
"config": {
"path": "../dropdownEventsCommandParams_Target.props.value"
},
"type": "property"
}
}
},
"props": {
"params": {
"tagProps": [
null,
"",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "Symbol-Views/Equipment-Views/ControlCabinet",
"useDefaultViewWidth": true
},
"type": "ia.display.view"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.view.getChild(\"root\").custom.displayUpload \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Uploads"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.0193,
"y": 0.0163
},
"props": {
"image": {
"icon": {
"path": "material/import_export"
}
},
"primary": false,
"text": "Uploads"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"height": 0.153,
"width": 0.7044,
"x": 0.2763,
"y": 0.8212
},
"props": {
"path": "Main-Views/Commissioning Tool/UserFeedBack",
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10,
"overflow": "auto"
}
},
"type": "ia.display.view"
}
],
"custom": {
"testingAlarmPriority1": {
"id": "3",
"message": "BufferBatteryErrorSystemWarning1",
"priority": "Diagnostic",
"type": "0"
},
"testingAlarmPriority2": "",
"testingAlarmPriority3": {
"id": "22",
"message": "ExternalUnitFault1",
"priority": "Medium",
"type": "0"
},
"testingAlarmPriority4": {
"id": "1",
"message": "AccessDoorOpenedFault1",
"priority": "High",
"type": "1"
}
},
"meta": {
"name": "ContainerSources"
},
"position": {
"tabIndex": 1
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
},
{
"children": [
{
"meta": {
"name": "FlexContainer_3"
},
"position": {
"height": 0.9192,
"width": 0.2534,
"x": 0.003,
"y": 0.0635
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "FlexContainer_5"
},
"position": {
"height": 0.0597,
"width": 0.9797,
"x": 0.0032,
"y": -0.0058
},
"props": {
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10
}
},
"type": "ia.container.flex"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"fileFormat\":\"csv\"}\n\tsystem.perspective.sendMessage(\"measurementTab_exportFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_18"
},
"position": {
"height": 0.0385,
"width": 0.0673,
"x": 0.1884,
"y": 0.9278
},
"props": {
"image": {
"height": 32,
"icon": {
"color": "#000000",
"path": "material/import_export"
}
},
"primary": false,
"text": "Export"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onFileReceived": {
"config": {
"script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileExtension\":event.file.name.split(\".\")[1]}\n\tsystem.perspective.sendMessage(\"measurementTab_importFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "FileUpload_0"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.0197,
"y": 0.0159
},
"props": {
"fileUploadIcon": {
"color": "#000000",
"path": "material/import_export",
"style": {
"borderStyle": "none"
}
},
"maxUploads": 1,
"style": {
"backgroundColor": "#FAFAFA",
"borderStyle": "solid",
"classes": ""
},
"supportedFileTypes": [
"csv"
]
},
"type": "ia.input.fileupload"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"measurementTab_changeSelectedPLC\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "dropdownTargetPLC"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.1413,
"x": 0.1141,
"y": 0.1304
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": "session.custom.sources"
},
"transforms": [
{
"code": "\toptions \u003d []\n\tlist_of_controllers \u003d []\n\tfor source in value :\n\t\ttry:\n\t\t\tcontroller \u003d source[\"Source\"].split(\"/\")[0]\n\t\texcept:\n\t\t\tcontinue\n\t\t\n\t\tif controller in list_of_controllers:\n\t\t\tcontinue\t\n\t\t\n\t\tlist_of_controllers.append(controller)\n\t\t\n\t\topt \u003d {\n\t\t \"value\":controller,\n\t\t \"label\": controller\n\t\t}\n\t\toptions.append(opt)\n\t\t\n\treturn options ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"placeholder": {
"text": "Select Controller..."
},
"showClearIcon": true,
"value": "PLC01"
},
"type": "ia.input.dropdown"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"measurementTab_init\")\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.1126,
"y": 0.9278
},
"props": {
"image": {
"height": 32,
"icon": {
"color": "#000000",
"path": "material/refresh"
}
},
"primary": false,
"text": "Reset"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_11"
},
"position": {
"height": 0.0318,
"width": 0.0933,
"x": 0.022,
"y": 0.1312
},
"props": {
"text": "Controller"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"measurementTab_sendEvent\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_17"
},
"position": {
"height": 0.0385,
"width": 0.1449,
"x": 0.1126,
"y": 0.8263
},
"props": {
"image": {
"icon": {
"color": "#FFFFFF",
"path": "material/power_settings_new"
}
},
"text": "Send Sequence"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "rowOfLastMessageSent",
"visible": false
},
"position": {
"height": 0.0308,
"rotate": {
"anchor": "50% 38%"
},
"width": 0.0313,
"x": 0.6155,
"y": 0.9464
},
"props": {
"enabled": false,
"value": 1
},
"type": "ia.input.numeric-entry-field"
},
{
"meta": {
"name": "Label_13"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.0933,
"x": 0.022,
"y": 0.0935
},
"props": {
"text": "Source ID"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "dropdownEventsCommandParams_Target"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.1413,
"x": 0.1141,
"y": 0.0928
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": "session.custom.sources"
},
"transforms": [
{
"code": "\toptions \u003d []\n\tfor source in value :\n\t\topt \u003d {\n\t\t \"value\":source[\"Source\"],\n\t\t \"label\": source[\"Source\"]\n\t\t}\n\t\toptions.append(opt)\n\t\t\n\treturn options ",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"placeholder": {
"text": "Select Source ID..."
},
"showClearIcon": true,
"value": "PLC01/UL5-1"
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "dropdownMeasurementName"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.1444,
"x": 0.1148,
"y": 0.3525
},
"props": {
"options": [
{
"label": "RESULT_NOREAD",
"value": "RESULT_NOREAD"
},
{
"label": "RESULT_MULTIREAD",
"value": "RESULT_MULTIREAD"
},
{
"label": "RESULT_SAL_CODE_AT_INFEED",
"value": "RESULT_SAL_CODE_AT_INFEED"
},
{
"label": "RESULT_INSUFFICIENT_GAP_AT_INFEED",
"value": "RESULT_INSUFFICIENT_GAP_AT_INFEED"
},
{
"label": "RESULT_NOT_ALIGNED",
"value": "RESULT_NOT_ALIGNED"
},
{
"label": "RESULT_WRONG_ORIENTATION",
"value": "RESULT_WRONG_ORIENTATION"
},
{
"label": "RESULT_OVER_LENGTH",
"value": "RESULT_OVER_LENGTH"
},
{
"label": "RESULT_NODATA",
"value": "RESULT_NODATA"
},
{
"label": "RESULT_BAD_REQUEST",
"value": "RESULT_BAD_REQUEST"
},
{
"label": "RESULT_AEG_ERROR",
"value": "RESULT_AEG_ERROR"
},
{
"label": "RESULT_VERIFY_SALNOREAD",
"value": "RESULT_VERIFY_SALNOREAD"
},
{
"label": "RESULT_VERIFY_SHIPNOREAD",
"value": "RESULT_VERIFY_SHIPNOREAD"
},
{
"label": "RESULT_VERIFY_SALMISMATCH",
"value": "RESULT_VERIFY_SALMISMATCH"
},
{
"label": "RESULT_SAFETY_STOP_FLUSH",
"value": "RESULT_SAFETY_STOP_FLUSH"
},
{
"label": "RESULT_VERIFY_SAL_MULTIREAD",
"value": "RESULT_VERIFY_SAL_MULTIREAD"
},
{
"label": "RESULT_MISMATCH_FLUSH",
"value": "RESULT_MISMATCH_FLUSH"
},
{
"label": "RESULT_PITCH_OR_TRACKING_ERROR",
"value": "RESULT_PITCH_OR_TRACKING_ERROR"
},
{
"label": "RESULT_CAMERA_ERROR_INDUCT",
"value": "RESULT_CAMERA_ERROR_INDUCT"
},
{
"label": "RESULT_CAMERA_ERROR_VERIFY",
"value": "RESULT_CAMERA_ERROR_VERIFY"
},
{
"label": "RESULT_TAMP_FAILED_TO_EXTEND",
"value": "RESULT_TAMP_FAILED_TO_EXTEND"
},
{
"label": "RESULT_MISC_ERROR_OPERATIONS",
"value": "RESULT_MISC_ERROR_OPERATIONS"
},
{
"label": "RESULT_MISC_ERROR_MACHINE",
"value": "RESULT_MISC_ERROR_MACHINE"
},
{
"label": "RESULT_UNKNOWN",
"value": "RESULT_UNKNOWN"
},
{
"label": "RESULT_SUCCESS_SIDELINE",
"value": "RESULT_SUCCESS_SIDELINE"
},
{
"label": "RESULT_SUCCESS",
"value": "RESULT_SUCCESS"
}
],
"showClearIcon": true,
"value": "RESULT_INSUFFICIENT_GAP_AT_INFEED"
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "delta"
},
"position": {
"height": 0.0318,
"width": 0.1444,
"x": 0.1143,
"y": 0.3891
},
"props": {
"inputBounds": {
"maximum": 10000,
"minimum": 1
},
"value": 100
},
"type": "ia.input.numeric-entry-field"
},
{
"meta": {
"name": "Label_16"
},
"position": {
"height": 0.0318,
"width": 0.0792,
"x": 0.0218,
"y": 0.3911
},
"props": {
"text": "Delta"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_17"
},
"position": {
"height": 0.0318,
"width": 0.0808,
"x": 0.0218,
"y": 0.3545
},
"props": {
"text": "Measurement name"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"measurementTab_setMeasurementInTable\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_29"
},
"position": {
"height": 0.0385,
"width": 0.1444,
"x": 0.1143,
"y": 0.4988
},
"props": {
"image": {
"icon": {
"color": "#323232",
"path": "material/control_point"
}
},
"primary": false,
"text": "Set Measurement"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_18"
},
"position": {
"height": 0.0318,
"width": 0.0792,
"x": 0.0218,
"y": 0.4276
},
"props": {
"text": "Unit"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_19"
},
"position": {
"height": 0.0318,
"width": 0.0792,
"x": 0.0218,
"y": 0.4642
},
"props": {
"text": "Sampling ms"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "sampling"
},
"position": {
"height": 0.0318,
"width": 0.1444,
"x": 0.1143,
"y": 0.4622
},
"props": {
"inputBounds": {
"minimum": 1
},
"value": 1
},
"type": "ia.input.numeric-entry-field"
},
{
"meta": {
"name": "textFieldUnit"
},
"position": {
"height": 0.0318,
"width": 0.1444,
"x": 0.1143,
"y": 0.4256
},
"props": {
"style": {
"textAlign": "right"
},
"text": "un"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_22"
},
"position": {
"height": 0.0318,
"width": 0.0975,
"x": 0.0222,
"y": 0.7102
},
"props": {
"text": "Current state"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetEventState\":\"1\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setEventState\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_30"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.115,
"y": 0.6
},
"props": {
"image": {
"height": 32,
"icon": {
"color": "#323232",
"path": "material/power_settings_new"
}
},
"primary": false,
"text": "Set On"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetEventState\":\"0\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setEventState\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_31"
},
"position": {
"height": 0.0385,
"width": 0.0683,
"x": 0.189,
"y": 0.6
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/not_interested"
}
},
"primary": false,
"text": "Set Off"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_24"
},
"position": {
"height": 0.0318,
"width": 0.0928,
"x": 0.022,
"y": 0.5628
},
"props": {
"text": "Alarm ID"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_23"
},
"position": {
"height": 0.0318,
"width": 0.0975,
"x": 0.022,
"y": 0.6
},
"props": {
"text": "Signal state"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetState\":\"1\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setState\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_33"
},
"position": {
"height": 0.0385,
"width": 0.0454,
"x": 0.1145,
"y": 0.7094
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/control_point"
}
},
"primary": false,
"text": "Fault"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetState\":\"2\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setState\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_34"
},
"position": {
"height": 0.0385,
"width": 0.0454,
"x": 0.1635,
"y": 0.7094
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/control_point"
}
},
"primary": false,
"text": "Stop"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetState\":\"3\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setState\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_35"
},
"position": {
"height": 0.0385,
"width": 0.0459,
"x": 0.2126,
"y": 0.7094
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/control_point"
}
},
"primary": false,
"text": "Run"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"height": 0.7584,
"width": 0.7226,
"x": 0.2591,
"y": 0.0641
},
"propConfig": {
"props.params.last_message_index": {
"binding": {
"config": {
"path": "../rowOfLastMessageSent.props.value"
},
"type": "property"
}
},
"props.params.tabledata": {
"binding": {
"config": {
"path": "../tableSequence.props.data"
},
"type": "property"
}
}
},
"props": {
"path": "Main-Views/Commissioning Tool/SequenceTester",
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10,
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"events": {
"component": {
"onRowDoubleClick": {
"config": {
"script": "\tselectedRowValue\u003devent[\"value\"]\n\t#payload\u003d{\"Source\":selectedRowValue[\"Source\"]}\n\t#system.perspective.sendMessage(\"sourcesTab_selectSource\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "tableSequence",
"visible": false
},
"position": {
"height": 0.5938,
"width": 0.6747,
"x": 0.3011,
"y": 0.2369
},
"propConfig": {
"props.selection.data": {
"onChange": {
"enabled": null,
"script": "\tsystem.perspective.sendMessage(\"tableSelectionData\", self.props.selection.data, \"page\")"
}
}
},
"props": {
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Seq",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": true,
"style": {
"classes": ""
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 100
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": "",
"footer": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"header": {
"align": "center",
"justify": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": ""
}
],
"dragOrderable": false,
"items": [],
"pager": {
"initialOption": 1000
},
"resizeMode": "fixed",
"selection": {
"mode": "multiple interval"
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "update_selectionData",
"pageScope": true,
"script": "\tself.props.data\n\t\n\t# implement your handler here\n\tseq\u003d payload[\"index\"]\n\tstate \u003d payload[\"state\"]\n\tsystem.perspective.print(seq)\n\tsystem.perspective.print(state)\n\t\n\tself.props.data[seq][\"Selected\"] \u003d state\n",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "ClearSelection",
"pageScope": true,
"script": "\tsystem.perspective.print(\"clearSelection\")\n\tfor item in self.props.data:\n\t\titem[\"Selected\"] \u003d False",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "ClearAll",
"pageScope": true,
"script": "\t# implement your handler here\n\tself.props.data \u003d []",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "SelectAll",
"pageScope": true,
"script": "\t# implement your handler here\n\t\n\tfor item in self.props.data:\n\t\titem[\"Selected\"] \u003d True",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.display.table"
},
{
"meta": {
"name": "Label_20"
},
"position": {
"height": 0.0318,
"width": 0.1251,
"x": 0.0185,
"y": 0.5318
},
"props": {
"text": "Events",
"textStyle": {
"fontSize": 12,
"fontStyle": "italic",
"fontWeight": "bolder",
"textDecoration": "underline"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_26"
},
"position": {
"height": 0.0318,
"width": 0.0912,
"x": 0.0185,
"y": 0.3163
},
"props": {
"text": "Measurement Event",
"textStyle": {
"fontSize": 12,
"fontStyle": "italic",
"fontWeight": "bolder",
"textDecoration": "underline"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_27"
},
"position": {
"height": 0.0318,
"width": 0.0912,
"x": 0.0185,
"y": 0.6356
},
"props": {
"text": "State Changed Event",
"textStyle": {
"fontSize": 12,
"fontStyle": "italic",
"fontWeight": "bolder",
"textDecoration": "underline"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_15"
},
"position": {
"height": 0.0318,
"width": 0.0813,
"x": 0.0208,
"y": 0.208
},
"props": {
"text": "Offset ms"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_25"
},
"position": {
"height": 0.0318,
"width": 0.0778,
"x": 0.0208,
"y": 0.1693
},
"props": {
"text": "Date and time"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_8"
},
"position": {
"height": 0.0318,
"width": 0.0892,
"x": 0.0206,
"y": 0.2433
},
"props": {
"text": "Delay between Msg"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldEventsCommandParams_Timestamp",
"visible": false
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "117% 50%"
},
"width": 0.109,
"x": 0.114,
"y": 0.1989
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "toStr(toMillis({../DateTimeInput_0.props.value}))"
},
"type": "expr"
}
}
},
"props": {
"style": {
"textAlign": "right"
}
},
"type": "ia.input.text-field"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttimeNow\u003dsystem.date.now()\n\ttimestamp \u003d system.date.toMillis(timeNow)\n\t\n\tself.getSibling(\"DateTimeInput_0\").props.value \u003d timestamp\n\tself.getSibling(\"textFieldEventsCommandParams_Timestamp\").props.text \u003d timestamp\n\t\n\tMsg \u003d \"Setting time of messages to %s\"%timeNow\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit_1"
},
"position": {
"height": 0.0318,
"width": 0.0292,
"x": 0.2262,
"y": 0.1675
},
"props": {
"image": {
"icon": {
"color": "#323232",
"path": "material/access_time"
}
},
"primary": false,
"text": ""
},
"type": "ia.input.button"
},
{
"meta": {
"name": "textFieldInterval"
},
"position": {
"height": 0.0318,
"width": 0.1413,
"x": 0.1142,
"y": 0.2414
},
"props": {
"inputBounds": {
"minimum": 1
},
"value": 100
},
"type": "ia.input.numeric-entry-field"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"measurementTab_setTimestampInTable\")\n"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_22"
},
"position": {
"height": 0.0385,
"width": 0.1413,
"x": 0.1143,
"y": 0.2798
},
"props": {
"image": {
"icon": {
"color": "#323232",
"path": "material/control_point"
}
},
"primary": false,
"text": "Set Sequence Data"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "timestampOffset"
},
"position": {
"height": 0.0318,
"width": 0.1408,
"x": 0.1143,
"y": 0.2061
},
"props": {
"inputBounds": {
"minimum": 1
},
"value": 1000
},
"type": "ia.input.numeric-entry-field"
},
{
"meta": {
"name": "DateTimeInput_0"
},
"position": {
"height": 0.0318,
"width": 0.109,
"x": 0.1128,
"y": 0.1674
},
"props": {
"format": "YYYY-MM-DD hh:mm:ss",
"formattedValue": "2023-08-29 12:18:17",
"value": 1693311497777
},
"type": "ia.input.date-time-input"
},
{
"meta": {
"name": "Label_28"
},
"position": {
"height": 0.0318,
"width": 0.0959,
"x": 0.0222,
"y": 0.6698
},
"props": {
"text": "Reason Code"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "dropdownReasonCode"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.1439,
"x": 0.1146,
"y": 0.6698
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": ".../ContainerAlarms/tableAlarms.props.data"
},
"transforms": [
{
"code": "\toptions \u003d []\n\t\n\tfor item in value:\n\t\topt \u003d{\n\t\t\"label\": item[\"Name\"],\n\t\t\"value\": item[\"ID\"]\n\t\t}\n\t\toptions.append(opt)\n\treturn options",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"placeholder": {
"text": "Select Reason Code..."
},
"showClearIcon": true,
"value": "2"
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "eventID"
},
"position": {
"height": 0.0318,
"width": 0.1444,
"x": 0.1135,
"y": 0.5624
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": ".../ContainerAlarms/tableAlarms.props.data"
},
"transforms": [
{
"code": "\toptions \u003d []\n\t\t\n\tfor item in value:\n\t\topt \u003d{\n\t\t\"label\": item[\"ID\"],\n\t\t\"value\": item[\"ID\"]\n\t\t}\n\t\toptions.append(opt)\n\treturn options",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"placeholder": {
"text": "Select Alarm ID..."
},
"value": "69"
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "Label_29"
},
"position": {
"height": 0.0318,
"width": 0.1,
"x": 0.0194,
"y": 0.7412
},
"props": {
"text": "Mode Changed Event",
"textStyle": {
"fontSize": 12,
"fontStyle": "italic",
"fontWeight": "bolder",
"textDecoration": "underline"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_30"
},
"position": {
"height": 0.0318,
"width": 0.0975,
"x": 0.0225,
"y": 0.7737
},
"props": {
"text": "Current Mode"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetState\":\"0\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setMode\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_36"
},
"position": {
"height": 0.0385,
"width": 0.0454,
"x": 0.1141,
"y": 0.7729
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/control_point"
}
},
"primary": false,
"text": "Auto"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetState\":\"1\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setMode\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_37"
},
"position": {
"height": 0.0385,
"width": 0.0454,
"x": 0.1627,
"y": 0.7729
},
"props": {
"image": {
"height": 32,
"icon": {
"color": "#000000",
"path": "material/control_point"
}
},
"primary": false,
"text": "Maint"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"targetState\":\"2\"}\n\tsystem.perspective.sendMessage(\"measurementTab_setMode\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_38"
},
"position": {
"height": 0.0385,
"width": 0.0459,
"x": 0.2114,
"y": 0.7729
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/control_point"
}
},
"primary": false,
"text": "Man"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "EmbeddedView_0"
},
"position": {
"height": 0.1482,
"width": 0.7226,
"x": 0.2592,
"y": 0.8335
},
"props": {
"path": "Main-Views/Commissioning Tool/UserFeedBack",
"style": {
"borderStyle": "solid",
"borderWidth": "1px",
"box-shadow": "5px 5px 5px grey",
"marginBottom": 10,
"marginLeft": 20,
"marginRight": 20,
"marginTop": 10,
"overflow": "auto"
}
},
"type": "ia.display.view"
}
],
"custom": {
"testingAlarmPriority1": "",
"testingAlarmPriority2": "",
"testingAlarmPriority3": "",
"testingAlarmPriority4": ""
},
"meta": {
"name": "ContainerMeasurement"
},
"position": {
"tabIndex": 2
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
},
{
"children": [
{
"events": {
"component": {
"onRowDoubleClick": {
"config": {
"script": "\tselectedRowValue\u003devent[\"value\"]\n\tself.getSibling(\"textFieldEventID\").props.text \u003d selectedRowValue[\"ID\"]"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "tableAlarms"
},
"position": {
"height": 0.8758,
"width": 0.7497,
"x": 0.2462,
"y": 0.0434
},
"props": {
"pager": {
"bottom": false,
"initialOption": 1000
},
"selection": {
"mode": "multiple interval"
}
},
"type": "ia.display.table"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"utilsTab_changeSelectedPLC\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "dropdownTargetPLC"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.1382,
"x": 0.1042,
"y": 0.0515
},
"props": {
"options": [
{
"label": "PLC01",
"value": "PLC01"
},
{
"label": "PLC02",
"value": "PLC02"
},
{
"label": "PLC03",
"value": "PLC03"
},
{
"label": "PLC09",
"value": "PLC09"
}
],
"showClearIcon": true,
"textAlign": "right",
"value": "PLC01"
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "Label_11"
},
"position": {
"height": 0.0318,
"width": 0.0975,
"x": 0.003,
"y": 0.0515
},
"props": {
"text": "Target PLC"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage(\"utilsTab_init\")\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit"
},
"position": {
"height": 0.0318,
"width": 0.1366,
"x": 0.1045,
"y": 0.8535
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"primary": false,
"text": "Reset"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onFileReceived": {
"config": {
"script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileExtension\":event.file.name.split(\".\")[1]}\n\tsystem.perspective.sendMessage(\"utilsTab_importFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "FileUpload_0"
},
"position": {
"height": 0.0318,
"width": 0.1137,
"x": 0.0027,
"y": 0.0062
},
"props": {
"maxUploads": 1
},
"type": "ia.input.fileupload"
},
{
"meta": {
"name": "dropdownCommandTarget"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "50% 169%"
},
"width": 0.1382,
"x": 0.1042,
"y": 0.1175
},
"props": {
"options": [
{
"label": "PLC01/10",
"value": "PLC01/10"
},
{
"label": "PLC01/30",
"value": "PLC01/30"
},
{
"label": "PLC01/40",
"value": "PLC01/40"
},
{
"label": "PLC01/50",
"value": "PLC01/50"
},
{
"label": "PLC01/60",
"value": "PLC01/60"
},
{
"label": "PLC01/210",
"value": "PLC01/210"
},
{
"label": "PLC01/220",
"value": "PLC01/220"
},
{
"label": "PLC01/AIR",
"value": "PLC01/AIR"
},
{
"label": "PLC01/P1",
"value": "PLC01/P1"
},
{
"label": "PLC01/S01",
"value": "PLC01/S01"
},
{
"label": "PLC01/State",
"value": "PLC01/State"
},
{
"label": "PLC01/ZM1",
"value": "PLC01/ZM1"
},
{
"label": "PLC01/ZM2",
"value": "PLC01/ZM2"
}
],
"placeholder": {
"text": "Select Target..."
},
"showClearIcon": true,
"textAlign": "right",
"value": "PLC01/30"
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "textFieldEventState",
"visible": false
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "0% 37%"
},
"width": 0.013,
"x": 0.2449,
"y": 0.6909
},
"props": {
"enabled": false,
"text": "0"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_8"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.097,
"x": 0.0036,
"y": 0.1175
},
"props": {
"text": "Command Target"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"command\":\"synchStatus\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_20"
},
"position": {
"height": 0.0318,
"width": 0.0652,
"x": 0.1054,
"y": 0.4845
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"primary": false,
"text": "Synch status"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"command\":\"synchAlarms\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_21"
},
"position": {
"height": 0.0318,
"width": 0.0693,
"x": 0.1732,
"y": 0.4845
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"primary": false,
"text": "Synch alarms"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"command\":\"restoreFromDisconnection\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_7"
},
"position": {
"height": 0.0318,
"width": 0.0688,
"x": 0.1735,
"y": 0.4078
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"primary": false,
"text": "Reconnect"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"command\":\"simulateDisconnection\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_6"
},
"position": {
"height": 0.0318,
"width": 0.0662,
"x": 0.1046,
"y": 0.4078
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"primary": false,
"text": "Disconnect"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "textFieldDisconnectionDuration"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.3694
},
"props": {
"text": "5000"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_15"
},
"position": {
"height": 0.0288,
"width": 0.1522,
"x": 0.5459,
"y": 0.0113
},
"props": {
"text": "Alarm list",
"textStyle": {
"fontWeight": "bolder",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_13"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.097,
"x": 0.0036,
"y": 0.1541
},
"props": {
"text": "Command Code"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldCommandCode",
"visible": false
},
"position": {
"height": 0.0298,
"width": 0.0141,
"x": 0.2438,
"y": 0.2227
},
"props": {
"enabled": false,
"text": "1"
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_14"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.097,
"x": 0.0036,
"y": 0.1907
},
"props": {
"text": "Command Params"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldCommandParameters"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.1907
},
"props": {
"enabled": false,
"style": {
"textAlign": "right"
}
},
"type": "ia.input.text-field"
},
{
"meta": {
"name": "Label_17"
},
"position": {
"height": 0.0318,
"width": 0.097,
"x": 0.0036,
"y": 0.2638
},
"props": {
"text": "Timestamp"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textFieldCommandTimestamp"
},
"position": {
"height": 0.0318,
"width": 0.1011,
"x": 0.1042,
"y": 0.2638
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "toStr(toMillis({../dateTimeInputCommandTime.props.value}))"
},
"type": "expr"
}
}
},
"props": {
"style": {
"textAlign": "right"
}
},
"type": "ia.input.text-field"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttimeNow\u003dsystem.date.now()\n\ttimestamp \u003d system.date.toMillis(timeNow)\n\tself.getSibling(\"textFieldCommandTimestamp\").props.text \u003d timestamp"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "buttonInit_2"
},
"position": {
"height": 0.0318,
"width": 0.0328,
"x": 0.2085,
"y": 0.2638
},
"props": {
"image": {
"icon": {
"color": "#000000",
"path": "material/access_time"
}
},
"primary": false,
"text": ""
},
"type": "ia.input.button"
},
{
"meta": {
"name": "dateTimeInputCommandTime"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.2273
},
"props": {
"format": "YYYY-MM-DD hh:mm:ss",
"formattedValue": "2022-12-23 04:14:00",
"value": {
"$": [
"ts",
0,
1691659021617
],
"$ts": 1671812040000
}
},
"type": "ia.input.date-time-input"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpayload\u003d{\"command\":\"sendCommand\"}\n\tsystem.perspective.sendMessage(\"utilsTab_handleCommands\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_15"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.3004
},
"props": {
"image": {
"icon": {
"color": "#AAAAAA"
}
},
"primary": false,
"text": "Send command"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "Label_4"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.097,
"x": 0.0036,
"y": 0.9033
},
"props": {
"text": "Information"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "textAreaResult"
},
"position": {
"height": 0.0616,
"width": 0.9619,
"x": 0.0039,
"y": 0.9324
},
"props": {
"enabled": false,
"text": "Init completed"
},
"type": "ia.input.text-area"
},
{
"meta": {
"name": "Label_19"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.0959,
"x": 0.004,
"y": 0.3694
},
"props": {
"text": "Disconnection duration"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_20"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.0959,
"x": 0.004,
"y": 0.4078
},
"props": {
"text": "Connection"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_21"
},
"position": {
"height": 0.0318,
"rotate": {
"anchor": "75% 137%"
},
"width": 0.0959,
"x": 0.004,
"y": 0.4845
},
"props": {
"text": "Sync"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_18"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.0839
},
"props": {
"text": "Commands",
"textStyle": {
"fontWeight": "bolder",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_22"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.3328
},
"props": {
"text": "Comms Connection",
"textStyle": {
"fontWeight": "bolder",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_23"
},
"position": {
"height": 0.0288,
"width": 0.1366,
"x": 0.1046,
"y": 0.4508
},
"props": {
"text": "Synchronisation",
"textStyle": {
"fontWeight": "bolder",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Dropdown"
},
"position": {
"height": 0.0318,
"width": 0.1382,
"x": 0.1042,
"y": 0.1541
},
"propConfig": {
"props.value": {
"onChange": {
"enabled": null,
"script": "\tself.getSibling(\"textFieldCommandCode\").props.text \u003d str(self.props.value)"
}
}
},
"props": {
"options": [
{
"label": "Start",
"value": 1
},
{
"label": "Stop",
"value": 2
},
{
"label": "Reset",
"value": 3
},
{
"label": "Get",
"value": 4
},
{
"label": "Set",
"value": 5
},
{
"label": "Enable",
"value": 6
},
{
"label": "Disable",
"value": 7
}
],
"placeholder": {
"text": "Select Command..."
},
"textAlign": "right",
"value": 1
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "Label_25"
},
"position": {
"height": 0.0318,
"width": 0.097,
"x": 0.0036,
"y": 0.2273
},
"props": {
"text": "Date and time"
},
"type": "ia.display.label"
}
],
"meta": {
"name": "ContainerUtils"
},
"position": {
"tabIndex": 3
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
],
"custom": {
"Admin": false,
"AdminTabs": [
"Alarms",
"Sources",
"Sequence",
"Utils"
],
"Default": [
"Alarms",
"Sources",
"Sequence"
]
},
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tindex \u003d self.props.currentTabIndex\n\tif index \u003d\u003d 4:\n\t\tsystem.perspective.navigate(url \u003d \"https://w.amazon.com/bin/view/EURME/MAP/Projects/Amazon_SCADA/SCADA/Manual/CommissioningTools/\" , newTab \u003d True)\t\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "TabContainer"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "parent.custom.displayUpload"
},
"transforms": [
{
"expression": "!{value}",
"type": "expression"
}
],
"type": "property"
}
},
"props.tabs": {
"binding": {
"config": {
"path": "this.custom.Admin"
},
"transforms": [
{
"code": "\t\n\tif value:\n\t\treturn self.custom.AdminTabs\n\telse:\n\t\treturn self.custom.Default",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"tabSize": {
"height": 40,
"width": 120
}
},
"type": "ia.container.tab"
},
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "75px"
},
"props": {
"style": {
"opacity": "0.73",
"overflow": "auto",
"textShadow": "#AAAAAA 1px 2px 2px"
},
"text": "Commissioning Tool",
"textStyle": {
"fontSize": 30,
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Start From Fresh ?",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Upload Alarms.csv",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onFileReceived": {
"config": {
"script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"alarmsTab_importFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "FileUpload"
},
"position": {
"grow": 1
},
"props": {
"style": {
"backgroundColor": "#F2F3F4",
"borderStyle": "none",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"max-height": "400px",
"overflow": "visible"
},
"supportedFileTypes": [
"csv"
]
},
"type": "ia.input.fileupload"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"margin": "10px",
"padding": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Upload Sources.csv",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onFileReceived": {
"config": {
"script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"sourcesTab_importFile\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "FileUpload"
},
"position": {
"grow": 1
},
"props": {
"style": {
"backgroundColor": "#F2F3F4",
"borderStyle": "none",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"max-height": "400px",
"overflow": "visible"
},
"supportedFileTypes": [
"csv"
]
},
"type": "ia.input.fileupload"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"margin": "10px",
"padding": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"grow": 1
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"borderBottomLeftRadius": "2px",
"borderBottomRightRadius": "2px",
"borderColor": "#D4D4D4",
"borderStyle": "dotted",
"borderTopLeftRadius": "2px",
"borderTopRightRadius": "2px",
"borderWidth": "1px",
"margin": "25px",
"max-height": "500px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Pick Up Where You Left Off ?",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Upload Alarms Export",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onFileReceived": {
"config": {
"script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"uploadBackup\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "FileUpload"
},
"position": {
"grow": 1
},
"props": {
"style": {
"backgroundColor": "#F2F3F4",
"borderStyle": "none",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"max-height": "400px",
"overflow": "visible"
},
"supportedFileTypes": [
"csv"
]
},
"type": "ia.input.fileupload"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"margin": "10px",
"padding": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Upload Sources Export",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onFileReceived": {
"config": {
"script": "\tpayload\u003d{\"fileContent\":event.file.getString(),\"fileName\":event.file.name}\n\tsystem.perspective.sendMessage(\"uploadBackup\",payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "FileUpload"
},
"position": {
"grow": 1
},
"props": {
"style": {
"backgroundColor": "#F2F3F4",
"borderStyle": "none",
"classes": "FadeInFast, background, background-none",
"cursor": "pointer",
"max-height": "400px",
"overflow": "visible"
},
"supportedFileTypes": [
"csv"
]
},
"type": "ia.input.fileupload"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"margin": "10px",
"padding": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"grow": 1
},
"props": {
"style": {
"max-height": "value"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"borderBottomLeftRadius": "2px",
"borderBottomRightRadius": "2px",
"borderColor": "#D4D4D4",
"borderStyle": "dotted",
"borderTopLeftRadius": "2px",
"borderTopRightRadius": "2px",
"borderWidth": "1px",
"margin": "25px",
"max-height": "500px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"style": {
"margin": "10px",
"padding": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Footer"
},
"props": {
"style": {
"margin": "10px",
"max-height": "75px",
"overflow": "visible"
},
"text": "Required Data ",
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "AlarmsData"
},
"position": {
"basis": "200px"
},
"propConfig": {
"props.selected": {
"binding": {
"config": {
"path": "session.custom.alarms"
},
"transforms": [
{
"code": "\tif value :\n\t\treturn True\n\telse:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"enabled": false,
"text": "Alarms Data",
"textPosition": "left"
},
"type": "ia.input.checkbox"
},
{
"meta": {
"name": "SourceData"
},
"position": {
"basis": "200px"
},
"propConfig": {
"props.selected": {
"binding": {
"config": {
"path": "session.custom.sources"
},
"transforms": [
{
"code": "\tif value :\n\t\treturn True\n\telse:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"enabled": false,
"text": "Source Data",
"textPosition": "left"
},
"type": "ia.input.checkbox"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"grow": 1
},
"props": {
"justify": "space-around",
"style": {
"margin": "10px",
"max-height": "75px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.session.custom.alarms \u003d []\n\tself.session.custom.sources \u003d []"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_0"
},
"position": {
"basis": "120px",
"grow": 1
},
"propConfig": {
"custom.Start": {
"binding": {
"config": {
"expression": "try(if(len({/root.custom.alarms})\u003e0 \u0026\u0026 len({/root.custom.sources})\u003e0, True,False),False)"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/delete_forever"
}
},
"primary": false,
"style": {
"margin": "5px",
"max-width": "120px"
},
"text": "Clear"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tself.view.getChild(\"root\").custom.displayUpload \u003d False"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button"
},
"position": {
"basis": "120px",
"grow": 1
},
"propConfig": {
"custom.Start": {
"binding": {
"config": {
"expression": "try(if(len({/root.custom.alarms})\u003e0 \u0026\u0026 len({/root.custom.sources})\u003e0, True,False),False)"
},
"type": "expr"
}
},
"props.enabled": {
"binding": {
"config": {
"path": "this.custom.Start"
},
"transforms": [
{
"code": "\treturn value",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/play_circle_outline"
}
},
"style": {
"margin": "5px",
"max-width": "120px"
},
"text": "Start"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FlexContainer_1"
},
"position": {
"grow": 1
},
"props": {
"justify": "flex-end",
"style": {
"margin": "20px",
"max-height": "75px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_1"
},
"position": {
"basis": "200px"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"basis": "150px"
},
"props": {
"path": "Main-Views/Commissioning Tool/UserFeedBack",
"style": {
"margin": "10px",
"overflow": "auto",
"padding": "10px"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "200px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "parent.custom.displayUpload"
},
"type": "property"
}
}
},
"props": {
"direction": "column",
"style": {
"margin": "10px",
"padding": "5-x"
}
},
"type": "ia.container.flex"
}
],
"custom": {
"displayUpload": true
},
"events": {
"system": {
"onStartup": {
"config": {
"script": "\t\n\tif not self.session.custom.sources or not self.session.custom.alarms:\n\t\tself.custom.displayUpload \u003d True \n\telse:\n\t\tself.custom.displayUpload \u003d False\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"position": {
"x": 0.0412,
"y": 0.001
},
"propConfig": {
"custom.alarms": {
"binding": {
"config": {
"path": "session.custom.alarms"
},
"type": "property"
}
},
"custom.sources": {
"binding": {
"config": {
"path": "session.custom.sources"
},
"type": "property"
}
}
},
"props": {
"direction": "column"
},
"scripts": {
"customMethods": [
{
"name": "sendConsoleMsg",
"params": [
"Msg"
],
"script": "\t# implement your method here\n\tpayload \u003d {\n\t\t\t\t\"Msg\":Msg\n\t\t\t}\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")"
}
],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "alarmsTab_init",
"pageScope": true,
"script": "\tresult\u003d \"Resetting Alarms Page ...\"\n\t\n\t\n\ttry:\n\t import sys\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\t #clearing all fields\n\t\n\t targetContainer.getChild(\"textFieldTargetPLC\").props.text \u003d \"\"\n\t targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value \u003d None\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textField_alarmPriority\").props.text \u003d \"\"\n\t targetContainer.getChild(\"DateTimeInput\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text\u003d \"\"\n\t \n\t targetContainer.getChild(\"tableAlarms\").props.data \u003d []\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\n\tself.sendConsoleMsg(result)\n\n\n",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "setTimeNow",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"Setting Time to current time\"\n\ttry:\n\t containerName \u003d payload[\"containerName\"]\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\t targetName\u003dpayload[\"targetName\"]\n\t timeNow\u003dsystem.date.now()\n\t timestamp \u003d system.date.toMillis(timeNow)\n\t targetContainer.getChild(targetName).props.value \u003d timeNow\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t \n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "setEventState",
"pageScope": true,
"script": "\t\n\tresult \u003d \"Setting Event State on %s to %s\"%(payload[\"containerName\"] , payload[\"status\"] )\n\tstatus \u003d payload[\"status\"]\n\tcontainerName \u003d payload[\"containerName\"]\n\t\n\tself.getChild(\"TabContainer\").getChild(containerName).getChild(\"textFieldEventsCommandParams_Status\").props.text \u003d status\n\t\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "sendSimulationEvent",
"pageScope": true,
"script": "\n\t\n\tself.sendConsoleMsg(\"Sending an Event ...\")\n\t\n\tcontainerName \u003d payload[\"containerName\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\tsimulationEventStatus\u003dpayload[\"status\"]\n\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\twhid \u003dstr(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\ttimestamp \u003d targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text \u003d timestamp\n\t\n\tplc\u003dstr(targetContainer.getChild(\"textFieldTargetPLC\").props.text)\n\teventParameters_target\u003d\"\"\n\tif containerName\u003d\u003d\"ContainerSources\":\n\t eventParameters_target \u003d str(targetContainer.getChild(\"textField_SelectedTarget\").props.text)#review\n\telse:\n\t eventParameters_target \u003d str(targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value)\n\tcommandTarget\u003dplc+\"/-1\"#-1 is used by E2C application to identify a simulation command\n\teventParameters_timestamp\u003dstr(targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text)\n\teventParameters_eventID\u003dstr(targetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text)\n\teventParameters_status\u003dstr(simulationEventStatus)\n\teventParametersString\u003deventParameters_target+\",\"+eventParameters_timestamp+\",\"+eventParameters_eventID+\",\"+eventParameters_status\n\tcommandParams \u003d \"EVENTS,\"+eventParametersString\n\tactionCode \u003d 5 #SET\n\tparameters\u003d{}\n\tparameters[\"commandTarget\"] \u003d commandTarget\n\tparameters[\"commandCode\"] \u003d actionCode\n\tparameters[\"commandParams\"] \u003d commandParams\n\n\tself.sendConsoleMsg(\"Event Parameters : %s\"%str(parameters))\n\t\n\tresponse \u003d Commands.button_commands.send_request(whid,actionCode,parameters)\n\t\n\tself.sendConsoleMsg(response)\n",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "setTestResult",
"pageScope": true,
"script": "\timport sys\n\t\n\tcontainerName \u003d payload[\"containerName\"]\n\ttargetTable\u003d\"tableAlarms\"\n\tif containerName\u003d\u003d\"ContainerSources\":\n\t\ttargetTable\u003d\"tableSources\"\n\ttestResult\u003dpayload[\"testResult\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\t\n\tresult\u003d\"Setting test results for %s\"%targetTable\n\t\n\ttry:\n\t\ttargetAlarmIDLastTest\u003dtargetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text\n\t\tcurrentDataJSON \u003d targetContainer.getChild(targetTable).props.data\n\t\tselectedRowsJSON\u003dtargetContainer.getChild(targetTable).props.selection.data\t\t\n\t\tfor indexSelectedRow in range(len(selectedRowsJSON)):\n\t\t\tcurrentSelectedRowDic\u003dselectedRowsJSON[indexSelectedRow]\n\t\t\trowNumber\u003dint(currentSelectedRowDic[\"Row\"])\n\t\t\tnewData\u003dcurrentDataJSON[rowNumber]\t\t\t\n\t\t\tcurrentDataJSON[rowNumber][\"Tested_date_UTC\"]\u003dsystem.date.format(system.date.now(),\"YYYY-MM-DD HH:mm:ss\")\n\t\t\tcurrentDataJSON[rowNumber][\"Result\"]\u003dtestResult\n\texcept:\n\t\texc_type, exc_obj, tb \u003d sys.exc_info()\n\t\tlineno \u003d tb.tb_lineno\n\t\terrorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t\tself.sendConsoleMsg(errorMessage)\n\t\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exportFile",
"pageScope": true,
"script": "\timport sys\n\t\n\tcontainerName\u003dpayload[\"containerName\"]\n\ttargetTable\u003dpayload[\"targetTable\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(containerName)\n\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\twhid \u003dstr(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\t\n\tfilePrefix\u003d\"Alarms_Testing_\"\n\tif targetTable\u003d\u003d\"tableSources\":\n\t filePrefix\u003d\"Sources_Testing_\"\n\t\n\ttry:\n\t columns \u003d targetContainer.getChild(targetTable).props.columns\n\t headers\u003d[]\n\t for column in columns:\n\t headers.append(column.field)\n\t rows \u003d targetContainer.getChild(targetTable).props.data\n\t data\u003d[]\n\t for row in rows:\n\t rowContent\u003d[]\n\t for column in columns:\n\t rowContent.append(row[column.field])\n\t data.append(rowContent)\n\t\n\t ds\u003dsystem.dataset.toDataSet(headers, data)\n\t Excel_xlsx \u003d system.dataset.toCSV(ds,True)\n\t fileName\u003dfilePrefix+whid\n\t fileName\u003dfileName+\"_\"+str(targetContainer.getChild(\"textFieldTargetPLC\").props.text)\n\t fileName\u003dfileName+\"_\"+system.date.format(system.date.now(),\u0027yyyyMMddHHmmss\u0027)+\".csv\"\n\t \n\t system.perspective.download(fileName,Excel_xlsx)\n\t \n\t result\u003d\"Exporting %s\"%fileName\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "alarmsTab_importFile",
"pageScope": true,
"script": "\timport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\theaders \u003d [\"Row\",\"ID\",\"Name\",\"Priority\",\"Type\",\"Tested date\",\"Result\",\"Notes\" ]\n\trows\u003d[]\n\ttableContent\u003d[]\n\tresult\u003d\"Importing file: %s \"%payload[\"fileName\"]\n\t\n\tself.sendConsoleMsg(result)\n\t\t\n\ttry:\n\t rowNumber\u003d0\n\t fileContent \u003d payload[\"fileContent\"]\n\t fileName\u003dpayload[\"fileName\"]\n\t \n\t fileExtension \u003d fileName.split(\".\")[1]\n\t if fileName!\u003d\"alarms.csv\":\n\t result+\u003d\"Invalid file name. Please select alarms.csv file\"\n\t targetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)\n\t return\n\t\n\t tableContent\u003d[]\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t for indexRow in range(1,len(rowsValues)):\n\t Row\u003drowNumber\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t ID\u003drowFields[0]\n\t Name\u003drowFields[1]\n\t Priority\u003d\"Invalid\"\n\t\n\t if int(rowFields[2])\u003d\u003d1:\n\t Priority\u003d\"Diagnostic\"\n\t if int(rowFields[2])\u003d\u003d2:\n\t Priority\u003d\"Low\"\n\t if int(rowFields[2])\u003d\u003d3:\n\t Priority\u003d\"Medium\"\n\t if int(rowFields[2])\u003d\u003d4:\n\t Priority\u003d\"High\"\n\t Type\u003d\"Default\"\n\t if rowFields[3]\u003d\u003d\"1\":\n\t Type\u003d\"Critical\"\n\t TestedDate\u003d\"\"\n\t TestedResult\u003d\"\"\n\t Notes\u003d\"\"\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowNumber\n\t rowContent[\"ID\"]\u003dID\n\t rowContent[\"Name\"]\u003dName\n\t rowContent[\"Priority\"]\u003dPriority\n\t rowContent[\"Type\"]\u003dType\n\t rowContent[\"Tested_date_UTC\"]\u003d\"\"\n\t rowContent[\"Result\"]\u003d\"\"\n\t rowContent[\"Notes\"]\u003d\"\"\n\t tableContent.append(rowContent)\n\t rowNumber+\u003d1\n\n\t self.session.custom.alarms \u003d tableContent\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t\n\tresult \u003d \"File imported succesfully\" \t\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "sourcesTab_importFile",
"pageScope": true,
"script": "\timport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\tresult\u003d\"\"\n\ttableContent\u003d[]\n\ttry:\n\t rowNumber\u003d0\n\t fileContent \u003d payload[\"fileContent\"]\n\t fileName\u003dpayload[\"fileName\"]\n\t \n\t result\u003d\"Importing file: %s \"%payload[\"fileName\"]\n\t \t\n\t self.sendConsoleMsg(result)\n\t fileExtension \u003d fileName.split(\".\")[1]\n\t\n\t\n\t if fileName!\u003d\"sources.csv\":\n\t result \u003d\"Invalid file name. Please select sources.csv file\"\n\t self.sendConsoleMsg(result)\n\t return\n\t\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t tagProviderSourcesList\u003d[]\n\t for indexRow in range(1,len(rowsValues)):\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowNumber\n\t rowContent[\"ID\"]\u003drowFields[0]\n\t rowContent[\"Source\"]\u003drowFields[1]\n\t rowContent[\"Tested_date_UTC\"]\u003d\"\"\n\t rowContent[\"Result\"]\u003d\"\"\n\t rowContent[\"Notes\"]\u003d\"\"\n\t tableContent.append(rowContent)\n\t tagProviderSourcesList.append(rowFields[1])\n\t rowNumber+\u003d1\n\t self.session.custom.sources \u003d tableContent\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t \t\n\tresult \u003d \"File imported succesfully\" \t\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "sourcesTab_init",
"pageScope": true,
"script": "\tresult\u003d \"Resetting Sources Page ...\"\n\ttry:\n\t import sys\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\t #clearing all fields\n\t targetContainer.getChild(\"textFieldTargetPLC\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textField_SelectedTarget\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textField_alarmPriority\").props.text \u003d \"\"\n\t targetContainer.getChild(\"DateTimeInput\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text \u003d \"\"\n\t targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text\u003d \"\"\n\t targetContainer.getChild(\"StatusIcon\").props.params.tagProps[0]\u003d\"\"\n\t #Creating source table\n\t targetContainer.getChild(\"tableSources\").props.data \u003d []\n\t targetContainer.custom.testingAlarmPriority1 \u003d \u0027\u0027\n\t targetContainer.custom.testingAlarmPriority2 \u003d \u0027\u0027\n\t targetContainer.custom.testingAlarmPriority3 \u003d \u0027\u0027\n\t targetContainer.custom.testingAlarmPriority4 \u003d \u0027\u0027\n\t result+\u003d\"Init completed\"\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t \n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "alarmsTab_selectAlarm",
"pageScope": true,
"script": "\t\n\t\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d payload[\"ID\"]\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text \u003d payload[\"Name\"]\n\ttargetContainer.getChild(\"textField_alarmPriority\").props.text\u003dpayload[\"Priority\"]\n\t\n\n\t\n\tself.sendConsoleMsg(\"Setting Alarm ID, Description \u0026 Priority \")",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "sourcesTab_selectSource",
"pageScope": true,
"script": "\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\tself.getChild(\"TabContainer\").getChild(\"ContainerSources\").getChild(\"textField_SelectedTarget\").props.text \u003d payload[\"Source\"]\n\ttargetContainer.getChild(\"StatusIcon\").props.params.tagProps[0]\u003dpayload[\"Source\"]\n\t\n\tself.sendConsoleMsg(\"Setting Source ID\")",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "sourcesTab_setAlarm",
"pageScope": true,
"script": "\t# implement your handler here\n\ttargetAlarm\u003dpayload[\"alarm\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\ttargetContainer.getChild(\"textField_alarmPriority\").props.text\u003dtargetAlarm[\"priority\"]\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventID\").props.text \u003d targetAlarm[\"id\"]\n\ttargetContainer.getChild(\"textFieldEventsCommandParams_EventDescription\").props.text\u003dtargetAlarm[\"message\"]\n\t\n\tself.sendConsoleMsg(\"Setting Alarm ID, Description \u0026 Priority \")",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_init",
"pageScope": true,
"script": "\timport sys\n\ttry:\n\t\tresult\u003d\"Restting Sequence Page \"\n\t\tself.sendConsoleMsg(result)\n\t\t\n\t\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t\t#Check if is a valid SCADA 2.0 Tag provider\n\t\t#Filling up the dropdown with the list of the PLCs\n\t\ttagProvidersPLCs \u003d system.tag.browse(path \u003dselectedTagProvider , filter \u003d {})\n\t\ttagProviderPLCsList\u003d[]\n\t\tfor tagProvidersPLC in tagProvidersPLCs.getResults():\n\t\t fullPath\u003dstr(tagProvidersPLC[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t\t entry\u003d{}\n\t\t entry[\u0027value\u0027] \u003d fullPath\n\t\t entry[\u0027label\u0027] \u003d fullPath\n\t\t tagProviderPLCsList.append(entry)\n\t\ttargetContainer.getChild(\"dropdownTargetPLC\").props.options \u003d tagProviderPLCsList\n\t\tselectedValue \u003d tagProviderPLCsList[0][\"label\"]\n\t\ttargetContainer.getChild(\"dropdownTargetPLC\").props.value \u003d selectedValue\n\t\t#Filling up the dropdown with the list of the sources\n\t\ttagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedValue , filter \u003d {})\n\t\ttagProviderSourcesList\u003d[]\n\t\tfor tagProvidersSource in tagProvidersSources.getResults():\n\t\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t\t entry\u003d{}\n\t\t entry[\u0027value\u0027] \u003d fullPath\n\t\t entry[\u0027label\u0027] \u003d fullPath\n\t\t tagProviderSourcesList.append(entry)\n\t\ttargetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.options \u003d tagProviderSourcesList\n\t\n\t\n\t\ttargetContainer.getChild(\"tableSequence\").props.data \u003d []\n\t\ttargetContainer.custom.testingAlarmPriority1 \u003d \u0027\u0027\n\t\ttargetContainer.custom.testingAlarmPriority2 \u003d \u0027\u0027\n\t\ttargetContainer.custom.testingAlarmPriority3 \u003d \u0027\u0027\n\t\ttargetContainer.custom.testingAlarmPriority4 \u003d \u0027\u0027\n\t\tresult \u003d\"Init completed\"\n\t\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t \n\t self.sendConsoleMsg(errorMessage)\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_importFile",
"pageScope": true,
"script": "\timport sys\n\tfrom collections import OrderedDict\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\ttry:\n\t result\u003d\"Importing file Sequence Backup ... \"\n\t\n\t self.sendConsoleMsg(result)\n\t rowNumber\u003d0\n\t result\u003d\"\"\n\t fileContent \u003d payload[\"fileContent\"]\n\t fileExtension\u003dpayload[\"fileExtension\"]\n\t if fileExtension\u003d\u003d\"csv\":\n\t self.sendConsoleMsg(\"File has correct extension . Importing ...\") \n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t tableContent\u003d[]\n\t for indexRow in range(1,len(rowsValues)):\n\t \n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t system.perspective.print(rowFields)\n\t messageType\u003drowFields[6]\n\t rowContent \u003d OrderedDict(\n\t [\n\t (\"Seq\",str(rowFields[13])),\n\t (\"Type\", messageType),\n\t (\"When\",rowFields[7]),\n\t (\"Source\", rowFields[5]),\n\t (\"CurrentState\",\"\"),\n\t (\"ReasonCode\", \"\"),\n\t (\"CurrentMode\", \"\"),\n\t (\"EventID\", \"\"),\n\t (\"EventState\", \"\"),\n\t (\"MeasurementName\",\"\"),\n\t (\"SamplingInterval\",\"\"),\n\t (\"Unit\",\"\"),\n\t (\"DeltaValue\",\"\"),\n\t (\"Selected\", \"\")\n\t ]\n\t )\n\t if messageType\u003d\u003d\"StateChanged\":\n\t rowContent[\"CurrentState\"]\u003drowFields[8]\n\t rowContent[\"ReasonCode\"]\u003drowFields[4]\n\t if messageType\u003d\u003d\"ModeChanged\":\n\t rowContent[\"CurrentMode\"]\u003drowFields[0]\n\t if messageType\u003d\u003d\"Event\":\n\t rowContent[\"EventID\"]\u003drowFields[9]\n\t rowContent[\"EventState\"]\u003d rowFields[1]\n\t if messageType\u003d\u003d\"MeasurementEvent\":\n\t rowContent[\"MeasurementName\"]\u003drowFields[10]\n\t rowContent[\"SamplingInterval\"]\u003drowFields[2]\n\t rowContent[\"Unit\"]\u003drowFields[3]\n\t rowContent[\"DeltaValue\"]\u003d rowFields[11]\n\t tableContent.append(rowContent)\n\t \ttargetContainer.getChild(\"tableSequence\").props.data \u003d tableContent\n\t else:\n\t \tresult\u003d\"Importing file must be a CSV file not a %s\"%(fileExtension) \n\t \t\n\t \tself.sendConsoleMsg(result)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\tself.sendConsoleMsg(\"Sequence Import Sucessful\")",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_sendEvent",
"pageScope": true,
"script": "\t# implement your handler here\n\timport time\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\tselectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\twhid \u003d str(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\tcommandTarget\u003d str(targetContainer.getChild(\"dropdownTargetPLC\").props.value)+\"/SPRK\"\n\tinterval \u003d targetContainer.getChild(\"textFieldInterval\").props.value\n\t\n\tselectedRows \u003d targetContainer.getChild(\"tableSequence\").props.data\n\tresult\u003d\"\"\n\ttry:\n\t\tactionCode \u003d 5 #SET\n\t\tfor selectedRow in selectedRows:\n\t\t eventType\u003dselectedRow[\"Type\"]\n\t\t timestamp \u003d selectedRow[\"When\"]\n\t\t source \u003d selectedRow[\"Source\"]\n\t\t indexSeletectedRow\u003dint(selectedRow[\"Seq\"])\n\t\t targetContainer.getChild(\"tableSequence\").props.selection.selectedRow \u003d indexSeletectedRow\n\t\t targetContainer.getChild(\"rowOfLastMessageSent\").props.value \u003d indexSeletectedRow\n\t\t if eventType\u003d\u003d\"StateChanged\":\n\t\t currentState \u003d selectedRow[\"CurrentState\"]\n\t\t reasonCode \u003d selectedRow[\"ReasonCode\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(currentState)+\",\"+str(reasonCode)+\",\"+str(timestamp)\n\t\t commandParams \u003d \"STATE,\"+eventParametersString\n\t\t if eventType\u003d\u003d\"ModeChanged\":\n\t\t currentMode \u003d selectedRow[\"CurrentMode\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(currentMode)+\",\"+str(timestamp)\n\t\t commandParams \u003d \"MODE,\"+eventParametersString\n\t\t if eventType\u003d\u003d\"Event\":\n\t\t eventID \u003d selectedRow[\"EventID\"]\n\t\t eventState \u003d selectedRow[\"EventState\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(timestamp)+\",\"+str(eventID)+\",\"+str(eventState)\n\t\t commandParams \u003d \"EVENTS,\"+eventParametersString\n\t\t if eventType\u003d\u003d\"MeasurementEvent\":\n\t\t measurementName \u003d selectedRow[\"MeasurementName\"]\n\t\t samplingInterval \u003d selectedRow[\"SamplingInterval\"]\n\t\t unit \u003d selectedRow[\"Unit\"]\n\t\t deltaValue \u003d selectedRow[\"DeltaValue\"]\n\t\t eventParametersString\u003dstr(source)+\",\"+str(measurementName)+\",\"+str(samplingInterval)+\",\"+str(unit)+\",\"+str(deltaValue)+\",\"+str(timestamp)\n\t\t commandParams \u003d \"MEASUREMENT,\"+eventParametersString\n\t\t parameters\u003d{}\n\t\t parameters[\"commandTarget\"] \u003d commandTarget\n\t\t parameters[\"commandCode\"] \u003d actionCode\n\t\t parameters[\"commandParams\"] \u003d commandParams\n\t\t\n\t\t self.sendConsoleMsg(\"UI : sending command to whid\u003d\"+whid+\",actionCode\"+str(actionCode)+\",parameters\u003d\"+str(parameters))\n\t\t response \u003d Commands.button_commands.send_request(whid,actionCode,parameters)\n\t\t self.sendConsoleMsg(response)\n\t\t time.sleep(interval)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_exportFile",
"pageScope": true,
"script": "\timport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\tresult\u003d\"\"\n\tresult\u003d\"Exporting Sequence data \"\n\tself.sendConsoleMsg(result)\n\ttry:\n\t fileContent\u003dNone\n\t arrayElements \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t whid \u003d str(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\t fileName\u003d\"Sequence_Testing_\"+whid+\"_\"+str(targetContainer.getChild(\"dropdownTargetPLC\").props.value)+\"_\"+system.date.format(system.date.now(),\u0027yyyyMMddHHmmss\u0027)\n\t \n\t fileName+\u003d\".csv\"\n\t headers\u003d[]\n\t rows\u003d[]\n\t for element in arrayElements:\n\t keys\u003delement.keys()\n\t if len(headers)\u003d\u003d0:\n\t headers\u003dkeys\n\t row\u003d[]\n\t for key in keys:\n\t row.append(element[key])\n\t rows.append(row)\n\t\n\t ds \u003d system.dataset.toDataSet(headers,rows)\n\t fileContent \u003d system.dataset.toCSV(ds)\n\t system.perspective.download(fileName,fileContent)\n\t\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t return\n\t \n\tresult\u003d\"Export Succesful \"\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_addRow",
"pageScope": true,
"script": "\tsystem.perspective.print(\"Add Row ...\")\n\timport sys\n\tfrom collections import OrderedDict\n\ttypeElement \u003d payload[\"messageType\"]\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\tresult\u003d\"Adding a \"\n\t\n\ttry:\n\t tableElements \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t result \u003d str(type(tableElements))\n\t rowIndex\u003d0\n\t if tableElements is None:\n\t tableElements\u003d[]\n\t else:\n\t rowIndex \u003d len(tableElements)\n\t\n\t newElement \u003d OrderedDict(\n\t [\n\t (\"Seq\",str(rowIndex)),\n\t (\"Type\", typeElement),\n\t (\"When\",targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text),\n\t (\"Source\", targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value),\n\t (\"CurrentState\",\"\"),\n\t (\"ReasonCode\", \"\"),\n\t (\"CurrentMode\", \"\"),\n\t (\"EventID\", \"\"),\n\t (\"EventState\", \"\"),\n\t (\"MeasurementName\",\"\"),\n\t (\"SamplingInterval\",\"\"),\n\t (\"Unit\",\"\"),\n\t (\"DeltaValue\",\"\"),\n\t (\"Selected\",False)\n\t ]\n\t )\n\t \n\t \n\t result\u003d\"Adding a %s \"%typeElement\n\t self.sendConsoleMsg(result)\n\t \n\t tableElements.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\n",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_deleteRows",
"pageScope": true,
"script": "\timport sys\n\ttry:\n\t \n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t result\u003d\"\"\n\t oldArray \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedRows \u003d [payload[\"index\"]]\n\t \n\t result \u003d \"Removing row %s\"%selectedRows\n\t self.sendConsoleMsg(result)\n\t newArray\u003d[]\n\t rowIndexesToBeDeleted\u003d[]\n\t for selectedRow in selectedRows:\n\t rowIndexesToBeDeleted.append(int(selectedRow))\n\t newRowIndex\u003d0\n\t for element in oldArray:\n\t rowIndex\u003dint(element[\"Seq\"])\n\t if not (rowIndex in rowIndexesToBeDeleted):\n\t newElement\u003d dict(element)\n\t newElement[\"Seq\"]\u003dstr(newRowIndex)\n\t newRowIndex+\u003d1\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_setTimestampInTable",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"Setting TimeStamp \u0026 Source ID for all items in sequence ...\"\n\tself.sendConsoleMsg(result)\n\t\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t timestampOffset \u003d targetContainer.getChild(\"timestampOffset\").props.value * 1000\n\t currentTimestamp \u003d long(targetContainer.getChild(\"textFieldEventsCommandParams_Timestamp\").props.text)\n\t commandTarget \u003d targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.value\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"]:\n\t newElement[\"When\"]\u003dstr(currentTimestamp)\n\t newElement[\"Source\"]\u003dcommandTarget\n\t currentTimestamp+\u003dtimestampOffset\n\t \n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_setState",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"Setting State and ReasonCode\"\n\tself.sendConsoleMsg(result)\n\tSTATE_TYPE \u003d \"StateChanged\"\n\ttargetState\u003dpayload[\"targetState\"]\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedRows \u003d targetContainer.getChild(\"tableSequence\").props.selection.data\n\t reasonCode \u003d targetContainer.getChild(\"dropdownReasonCode\").props.value\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d STATE_TYPE :\n\t newElement[\"CurrentState\"]\u003dtargetState\n\t newElement[\"ReasonCode\"]\u003d str(reasonCode)\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_setMeasurementInTable",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"Setting Mesurement Name , Sample Interval , Unit \u0026 Delta Values\"\n\tself.sendConsoleMsg(result)\n\tMEASUREMENT_EVENT\u003d \"MeasurementEvent\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t newArray\u003d[]\n\t measurementName \u003d targetContainer.getChild(\"dropdownMeasurementName\").props.value\n\t delta \u003d targetContainer.getChild(\"delta\").props.value\n\t sampling \u003d targetContainer.getChild(\"sampling\").props.value\n\t unit \u003d targetContainer.getChild(\"textFieldUnit\").props.text\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d MEASUREMENT_EVENT:\n\t newElement[\"MeasurementName\"]\u003dmeasurementName\n\t newElement[\"SamplingInterval\"]\u003dstr(sampling)\n\t newElement[\"Unit\"]\u003dunit\n\t newElement[\"DeltaValue\"]\u003dstr(delta)\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_setEventState",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"Setting Event ID \u0026 Event State\"\n\tself.sendConsoleMsg(result)\n\ttargetEventState\u003dpayload[\"targetEventState\"]\n\tEVENT_TYPE \u003d \"Event\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t eventID \u003d targetContainer.getChild(\"eventID\").props.value\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d EVENT_TYPE:\n\t newElement[\"EventID\"]\u003deventID\n\t newElement[\"EventState\"]\u003dtargetEventState\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "utilsTab_handleCommands",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\t command \u003d payload[\"command\"]\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t whid \u003dstr(system.tag.readBlocking([selectedTagProvider+\"Configuration/FC\"])[0].value)\n\t\n\t PLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t targetSimulation \u003d PLC+\"/-1\"#-1 is used by E2C application to identify a simulation command\n\t commandTarget\u003dtargetContainer.getChild(\"dropdownCommandTarget\").props.value\n\t commandCode\u003dtargetContainer.getChild(\"textFieldCommandCode\").props.text\n\t commandParameters\u003dtargetContainer.getChild(\"textFieldCommandParameters\").props.text\n\t commandTimestamp\u003dtargetContainer.getChild(\"textFieldCommandTimestamp\").props.text\n\t eventSource\u003dtargetContainer.getChild(\"dropdownEventsSource\").props.value\n\t eventTimestamp\u003dtargetContainer.getChild(\"textFieldEventTimestamp\").props.text\n\t eventID\u003dtargetContainer.getChild(\"textFieldEventID\").props.text\n\t eventState\u003dtargetContainer.getChild(\"textFieldEventState\").props.text\n\t disconnectionDuration\u003dtargetContainer.getChild(\"textFieldDisconnectionDuration\").props.text\n\t\n\t\n\t if command\u003d\u003d\"synchStatus\":\n\t commandParameters \u003d \"SYNCH,STATUS\"\n\t actionCode \u003d 1 #Start\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t\n\t if command\u003d\u003d\"synchAlarms\":\n\t commandParameters \u003d \"SYNCH,ALARMS\"\n\t actionCode \u003d 1 #Start\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"simulateDisconnection\":\n\t commandParams \u003d \"DISCONNECTION,\"+str(disconnectionDuration)\n\t actionCode \u003d 6 #Enable\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"restoreFromDisconnection\":\n\t commandParams \u003d \"DISCONNECTION\"\n\t actionCode \u003d 7 #Disable\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d commandParameters\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"sendCommand\":\n\t actionCode \u003d commandCode\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d commandTarget\n\t functionParameters[\"commandCode\"] \u003d commandCode\n\t functionParameters[\"commandParams\"] \u003d \u0027\u0027\n\t functionParameters[\"commandTimestamp\"] \u003d commandTimestamp\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\t if command\u003d\u003d\"sendAlarm\":\n\t actionCode \u003d 5 #SET\n\t functionParameters\u003d{}\n\t functionParameters[\"commandTarget\"] \u003d targetSimulation\n\t functionParameters[\"commandCode\"] \u003d actionCode\n\t functionParameters[\"commandParams\"] \u003d \"EVENTS,\"+str(eventSource)+\",\"+str(eventTimestamp)+\",\"+str(eventID)+\",\"+str(eventState)\n\t response \u003d Commands.button_commands.send_request(whid,actionCode,functionParameters)\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d result",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "utilsTab_importFile",
"pageScope": true,
"script": "\t# implement your handler hereimport sys\n\ttargetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\theaders \u003d [\"Row\",\"ID\",\"Name\",\"Priority\",\"Type\" ]\n\trows\u003d[]\n\ttry:\n\t\tds\u003dsystem.dataset.toDataSet(headers,rows)\n\t\trowNumber\u003d0\n\t\tresult\u003d\"\"\n\t\tfileContent \u003d payload[\"fileContent\"]\n\t\tfileExtension\u003dpayload[\"fileExtension\"]\n\t\tif fileExtension\u003d\u003d\"json\":\n\t\t\t#Importing from a configuration file\n\t\t\tcontentJSON \u003d system.util.jsonDecode(fileContent)\n\t\t\talarmList\u003dcontentJSON[\u0027alarmList\u0027]\n\t\t\tfor alarm in alarmList:\n\t\t\t\tRow\u003drowNumber\n\t\t\t\tID\u003dalarm[\"id\"]\n\t\t\t\tName\u003dalarm[\"message\"]\n\t\t\t\tPriority\u003d\"Invalid\"\n\t\t\t\t\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"1\":\n\t\t\t\t\tPriority\u003d\"Diagnostic\"\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"2\":\n\t\t\t\t\tPriority\u003d\"Low\"\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"3\":\n\t\t\t\t\tPriority\u003d\"Medium\"\n\t\t\t\tif alarm[\"priority\"]\u003d\u003d\"4\":\n\t\t\t\t\tPriority\u003d\"High\"\n\t\t\t\tType\u003d\"Default\"\n\t\t\t\tif alarm[\"type\"]\u003d\u003d\"1\":\n\t\t\t\t\tType\u003d\"Critical\"\n\t\t\t\trows.append([Row,ID,Name,Priority,Type])\n\t\t\t\trowNumber+\u003d1\t\t\n\t\tds \u003d system.dataset.toDataSet(headers,rows)\n\t\ttargetContainer.getChild(\"tableAlarms\").props.data \u003d ds\n\texcept:\n\t\texc_type, exc_obj, tb \u003d sys.exc_info()\n\t\tlineno \u003d tb.tb_lineno\n\t\terrorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t\tresult +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "utilsTab_init",
"pageScope": true,
"script": "\ttry:\n\t import sys\n\t result\u003d\"\"\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t #Check if is a valid SCADA 2.0 Tag provider\n\t validSCADATagProvider\u003dTrue\n\t if validSCADATagProvider and not system.tag.exists(selectedTagProvider+\"Configuration/FC\"):\n\t result+\u003d\"The tag \\\"Configuration/FC\\\" does not exists in the selected tag provider\"+\"\\r\\n\"\n\t validSCADATagProvider\u003dFalse\n\t if validSCADATagProvider and not system.tag.exists(selectedTagProvider+\"System/aws_data\"):\n\t result+\u003d\"The tag \\\"System/aws_data\\\" does not exists in the selected tag provider\"+\"\\r\\n\"\n\t validSCADATagProvider\u003dFalse\n\t if validSCADATagProvider and not system.tag.exists(selectedTagProvider+\"System/device_count\"):\n\t result+\u003d\"The tag \\\"System/device_count\\\" does not exists in the selected tag provider\"+\"\\r\\n\"\n\t validSCADATagProvider\u003dFalse\n\t if validSCADATagProvider:\n\t #Extracting the target site\n\t #Filling up the dropdown with the list of the PLCs\n\t tagProvidersPLCs \u003d system.tag.browse(path \u003dselectedTagProvider , filter \u003d {})\n\t tagProviderPLCsList\u003d[]\n\t for tagProvidersPLC in tagProvidersPLCs.getResults():\n\t fullPath\u003dstr(tagProvidersPLC[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderPLCsList.append(entry)\n\t targetContainer.getChild(\"dropdownTargetPLC\").props.options \u003d tagProviderPLCsList\n\t selectedValue \u003d tagProviderPLCsList[0][\"label\"]\n\t targetContainer.getChild(\"dropdownTargetPLC\").props.value \u003d selectedValue\n\t #Filling up the dropdown with the list of the sources\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedValue , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownCommandTarget\").props.options \u003d tagProviderSourcesList\n\t targetContainer.getChild(\"dropdownEventsSource\").props.options \u003d tagProviderSourcesList\n\t\n\t\n\t targetContainer.getChild(\"tableAlarms\").props.data \u003d []\n\t targetContainer.getChild(\"textFieldCommandCode\").props.text \u003d \u0027\u0027\n\t targetContainer.getChild(\"textFieldCommandParameters\").props.text \u003d \u0027\u0027\n\t targetContainer.getChild(\"textFieldEventID\").props.text \u003d \u0027\u0027\n\t result+\u003d\"Init completed\"\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "alarmsTab_changeSelectedPLC",
"pageScope": true,
"script": "\tresult\u003d\"\"\n\tresult\u003d\"Changing selected PLC for Alarms Page...\"\n\tself.sendConsoleMsg(result)\n\t\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t selectedPLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedPLC , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.options \u003d tagProviderSourcesList\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_changeSelectedPLC",
"pageScope": true,
"script": "\tresult\u003d\"Changing selected PLC for Sequnce Page ...\"\n\tself.sendConsoleMsg(result)\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurment\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t\n\t selectedPLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedPLC , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t result +\u003d str(tagProvidersSources)\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownEventsCommandParams_Target\").props.options \u003d tagProviderSourcesList\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "utilsTab_changeSelectedPLC",
"pageScope": true,
"script": "\tresult\u003d\"\"\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerUtils\")\n\t selectedTagProvider \u003d system.tag.getConfiguration()[0][\"path\"].toString()\n\t selectedPLC\u003dtargetContainer.getChild(\"dropdownTargetPLC\").props.value\n\t tagProvidersSources \u003d system.tag.browse(path \u003dselectedTagProvider+\"/\"+selectedPLC , filter \u003d {})\n\t tagProviderSourcesList\u003d[]\n\t for tagProvidersSource in tagProvidersSources.getResults():\n\t fullPath\u003dstr(tagProvidersSource[\u0027fullPath\u0027]).replace(selectedTagProvider,\"\")\n\t if \"System\" not in fullPath and \"Config\" not in fullPath and \"_types\" not in fullPath:\n\t entry\u003d{}\n\t entry[\u0027value\u0027] \u003d fullPath\n\t entry[\u0027label\u0027] \u003d fullPath\n\t tagProviderSourcesList.append(entry)\n\t targetContainer.getChild(\"dropdownCommandTarget\").props.options \u003d tagProviderSourcesList\n\t targetContainer.getChild(\"dropdownEventsSource\").props.options \u003d tagProviderSourcesList\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d str(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "uploadBackup",
"pageScope": true,
"script": "\t# implement your handler here\n\tfileContent \u003d payload[\"fileContent\"]\n\tfileName\u003d payload[\"fileName\"]\n\tif \"Alarms\" in fileName:\n\t result\u003d\"Importing an Alarms backup file \"\n\t self.sendConsoleMsg(result)\n\t #Importing the alarms from a previously saved file\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerAlarms\")\n\t try:\n\t tableContent\u003d[]\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t for indexRow in range(1,len(rowsValues)):\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowFields[0]\n\t rowContent[\"ID\"]\u003drowFields[1]\n\t rowContent[\"Name\"]\u003drowFields[2]\n\t rowContent[\"Priority\"]\u003drowFields[3]\n\t rowContent[\"Type\"]\u003drowFields[4]\n\t rowContent[\"Tested_date_UTC\"]\u003drowFields[5]\n\t rowContent[\"Result\"]\u003drowFields[6]\n\t rowContent[\"Notes\"]\u003drowFields[7]\n\t tableContent.append(rowContent)\n\t\t self.session.custom.alarms \u003d tableContent\n\t except:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\n\t return\n\telif \"Sources\" in fileName:\n\t #Importing the sources from a previously saved file\n\t result\u003d\"Importing an Sources backup file \"\n\t self.sendConsoleMsg(result)\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerSources\")\n\t try:\n\t tableContent\u003d[]\n\t rowsValues\u003d[]\n\t rowsValues \u003d fileContent.splitlines()\n\t tagProviderSourcesList\u003d[]\n\t for indexRow in range(1,len(rowsValues)):\n\t system.perspective.print(str(indexRow))\n\t system.perspective.print(str(rowsValues[indexRow]))\n\t rowFields \u003d rowsValues[indexRow].replace(\"\\\"\",\"\").split(\",\")\n\t system.perspective.print(str(rowFields))\n\t rowContent\u003d{}\n\t rowContent[\"Row\"]\u003drowFields[0]\n\t rowContent[\"ID\"]\u003drowFields[1]\n\t rowContent[\"Source\"]\u003drowFields[2]\n\t rowContent[\"Tested_date_UTC\"]\u003drowFields[3]\n\t rowContent[\"Result\"]\u003drowFields[4]\n\t rowContent[\"Notes\"]\u003drowFields[5]\n\t system.perspective.print(str(rowContent))\n\t tableContent.append(rowContent)\n\t \n\t \n\t system.perspective.print(\"Setting Table Sources DATA\")\n\t \t\t\t\t\n\t self.session.custom.sources \u003d tableContent\n\t except:\n\t \tsystem.perspective.print(\"Error\")\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t self.sendConsoleMsg(errorMessage)\t\t\n\t return\n\telif \"Sequence\" in fileName:\n\t result\u003d\"Importing sequence from file is not yet supported\"\n\t self.sendConsoleMsg(result)\n\telse:\n\t result\u003d\"Invalid file name\"\n\t self.sendConsoleMsg(result)\n\t \n\tresult\u003d\"File :%s imported Succesfully \"%fileName\n\tself.sendConsoleMsg(result)",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "measurementTab_setMode",
"pageScope": true,
"script": "\timport sys\n\tresult\u003d\"Setting Current Mode\"\n\tMODE_TYPE \u003d \"ModeChanged\"\n\ttargetState\u003dpayload[\"targetState\"]\n\t\n\tself.sendConsoleMsg(result)\n\ttry:\n\t targetContainer \u003d self.getChild(\"TabContainer\").getChild(\"ContainerMeasurement\")\n\t tableData \u003d targetContainer.getChild(\"tableSequence\").props.data\n\t selectedRows \u003d targetContainer.getChild(\"tableSequence\").props.selection.data\n\t newArray\u003d[]\n\t for element in tableData:\n\t newElement\u003d dict(element)\n\t if element[\"Selected\"] and element[\"Type\"] \u003d\u003d MODE_TYPE :\n\t newElement[\"CurrentMode\"]\u003dtargetState\n\t newArray.append(newElement)\n\t targetContainer.getChild(\"tableSequence\").props.data \u003d newArray\n\texcept:\n\t exc_type, exc_obj, tb \u003d sys.exc_info()\n\t lineno \u003d tb.tb_lineno\n\t errorMessage\u003dstr(lineno)+\" -\u003e \"+str(exc_type)+\" -\u003e \"+str(exc_obj)\n\t result +\u003d errorMessage\n\ttargetContainer.getChild(\"textAreaResult\").props.text \u003d result",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}