{
  "custom": {
    "Enable_input": false
  },
  "params": {},
  "propConfig": {
    "custom.Enable_input": {
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 1080,
      "width": 1920
    }
  },
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "children": [
                  {
                    "meta": {
                      "name": "Icon"
                    },
                    "position": {
                      "basis": "32px"
                    },
                    "props": {
                      "path": "material/edit_attributes",
                      "style": {
                        "marginLeft": "10px"
                      }
                    },
                    "type": "ia.display.icon"
                  },
                  {
                    "meta": {
                      "name": "Label"
                    },
                    "position": {
                      "basis": "232px"
                    },
                    "props": {
                      "style": {
                        "marginLeft": "10px"
                      },
                      "text": "Configuration Tags",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  },
                  {
                    "meta": {
                      "name": "Label_0"
                    },
                    "position": {
                      "basis": "50px",
                      "grow": 1
                    },
                    "type": "ia.display.label"
                  },
                  {
                    "custom": {
                      "dockOpened": true
                    },
                    "events": {
                      "dom": {
                        "onClick": {
                          "config": {
                            "script": "\tdevice_entry \u003d {\"Device\":\"\",\"Area\":\"\",\"SubArea\":\"\"}\n\tif not self.view.getChild(\"root\").custom.isDockOpen:\n\t\tparams \u003d {\n\t\t\t\"path\":\"Main-Views/Config-Tool/TagViewer\",\n\t\t\t\"params\":device_entry\t\n\t\t}\n\t\t\n\t\tsystem.perspective.sendMessage(\"select-side-view\", payload\u003dparams)\n\t\n\t\t\n\t\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)\n\tself.custom.dockOpened \u003d self.view.getChild(\"root\").custom.isDockOpen ^ True\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Icon_0"
                    },
                    "position": {
                      "basis": "30px"
                    },
                    "props": {
                      "path": "material/local_offer",
                      "style": {
                        "margin": "5px"
                      }
                    },
                    "type": "ia.display.icon"
                  }
                ],
                "meta": {
                  "name": "FlexContainer"
                },
                "position": {
                  "basis": "50px"
                },
                "type": "ia.container.flex"
              },
              {
                "children": [
                  {
                    "meta": {
                      "name": "Label"
                    },
                    "position": {
                      "basis": "57px"
                    },
                    "props": {
                      "text": "FC:",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  },
                  {
                    "custom": {
                      "tagPath": "Configuration/FC"
                    },
                    "meta": {
                      "name": "TextField"
                    },
                    "position": {
                      "basis": "175px"
                    },
                    "propConfig": {
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      },
                      "props.placeholder": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/FC"
                          },
                          "transforms": [
                            {
                              "code": "\tif value :\n\t\treturn value\n\telse:\n\t\treturn \"No Value Configured\"",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      },
                      "props.text": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/FC"
                          },
                          "transforms": [
                            {
                              "code": "\treturn value",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        },
                        "onChange": {
                          "enabled": null,
                          "script": "\tif currentValue.value:\n\t\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]%s\"%(self.session.custom.fc,self.custom.tagPath)\n\t\tsystem.perspective.print(tagPath)\n\t\tres \u003d system.tag.writeBlocking([tagPath], [currentValue.value])\n\t\tsystem.perspective.print(res)"
                        }
                      }
                    },
                    "props": {
                      "deferUpdates": false
                    },
                    "type": "ia.input.text-field"
                  },
                  {
                    "meta": {
                      "name": "Label_0"
                    },
                    "position": {
                      "basis": "107px"
                    },
                    "props": {
                      "style": {
                        "marginLeft": "25px"
                      },
                      "text": "AWS Prefix :",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  },
                  {
                    "custom": {
                      "key": "prefix",
                      "tagPath": "Configuration/aws"
                    },
                    "meta": {
                      "name": "TextField_0"
                    },
                    "position": {
                      "basis": "175px"
                    },
                    "propConfig": {
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      },
                      "props.placeholder": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws"
                          },
                          "transforms": [
                            {
                              "code": "\t\n\t\n\tvalue \u003d system.util.jsonDecode(value)\n\t\n\tif value.get(\"prefix\"):\n\t\treturn value[\"prefix\"]  \n\telse:\n\t\treturn \"No Value Configured\"",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      },
                      "props.text": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws"
                          },
                          "transforms": [
                            {
                              "code": "\treturn system.util.jsonDecode(value).get(\"prefix\", None)",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        },
                        "onChange": {
                          "enabled": null,
                          "script": "\tif currentValue.value:\n\t\tfc \u003d self.session.custom.fc\n\t\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]%s\"%(fc, self.custom.tagPath)\n\t\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([tagPath])[0].value)\n\t\ttry:\n\t\t\ttagData[self.custom.key] \u003d currentValue.value.strip()\n\t\texcept Exception as e :\n\t\t\tsystem.perspective.print(e)\n\t\t\treturn \n\t\tsystem.tag.writeBlocking([tagPath], [system.util.jsonEncode(tagData)])\n\t\t\t\n\t\t\t"
                        }
                      }
                    },
                    "props": {
                      "deferUpdates": false
                    },
                    "scripts": {
                      "customMethods": [],
                      "extensionFunctions": null,
                      "messageHandlers": [
                        {
                          "messageType": "initialise-values",
                          "pageScope": true,
                          "script": "\t# implement your handler here\n\tsystem.perspective.print(payload)",
                          "sessionScope": false,
                          "viewScope": true
                        }
                      ]
                    },
                    "type": "ia.input.text-field"
                  },
                  {
                    "meta": {
                      "name": "Label_1"
                    },
                    "position": {
                      "basis": "115px"
                    },
                    "props": {
                      "style": {
                        "marginLeft": "25px"
                      },
                      "text": "AWS Region :",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  },
                  {
                    "custom": {
                      "key": "region",
                      "tagPath": "Configuration/aws"
                    },
                    "meta": {
                      "name": "TextField_2"
                    },
                    "position": {
                      "basis": "175px"
                    },
                    "propConfig": {
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      },
                      "props.placeholder": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws"
                          },
                          "transforms": [
                            {
                              "code": "\t\n\t\n\tvalue \u003d system.util.jsonDecode(value)\n\t\n\tif value.get(\"region\"):\n\t\treturn value[\"region\"]  \n\telse:\n\t\treturn \"No Value Configured\"",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      },
                      "props.text": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/aws"
                          },
                          "transforms": [
                            {
                              "code": "\treturn system.util.jsonDecode(value).get(\"region\", None)",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        },
                        "onChange": {
                          "enabled": null,
                          "script": "\tif currentValue.value:\n\t\tfc \u003d self.session.custom.fc\n\t\ttagPath \u003d \"[%s_SCADA_TAG_PROVIDER]%s\"%(fc, self.custom.tagPath)\n\t\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([tagPath])[0].value)\n\t\ttry:\n\t\t\ttagData[self.custom.key] \u003d currentValue.value.strip()\n\t\texcept Exception as e :\n\t\t\tsystem.perspective.print(e)\n\t\t\treturn \n\t\tsystem.tag.writeBlocking([tagPath], [system.util.jsonEncode(tagData)])\n\t\t\t\n\t\t\t"
                        }
                      }
                    },
                    "type": "ia.input.text-field"
                  },
                  {
                    "meta": {
                      "name": "Label_2"
                    },
                    "position": {
                      "basis": "120px"
                    },
                    "props": {
                      "style": {
                        "marginLeft": "25px"
                      },
                      "text": "Backend Type :",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  },
                  {
                    "meta": {
                      "name": "Dropdown"
                    },
                    "position": {
                      "basis": "175px"
                    },
                    "propConfig": {
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      },
                      "props.value": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/BACKEND_EDGE_DEVICE"
                          },
                          "transforms": [
                            {
                              "code": "\tif value:\n\t\treturn value\n\t",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        },
                        "onChange": {
                          "enabled": null,
                          "script": "\twhid \u003d self.session.custom.fc\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/BACKEND_EDGE_DEVICE\"%whid], [currentValue.value])"
                        }
                      }
                    },
                    "props": {
                      "options": [
                        {
                          "label": "Edge To Cloud",
                          "value": "e2c"
                        },
                        {
                          "label": "Quattro",
                          "value": "quattro"
                        },
                        {
                          "label": "DataBridge",
                          "value": "databridge"
                        }
                      ],
                      "placeholder": {
                        "text": "No Value Configured"
                      },
                      "search": {
                        "enabled": false
                      }
                    },
                    "type": "ia.input.dropdown"
                  }
                ],
                "meta": {
                  "name": "FlexContainer_0"
                },
                "position": {
                  "basis": "40px"
                },
                "props": {
                  "style": {
                    "marginLeft": "10px",
                    "marginTop": "10px"
                  }
                },
                "type": "ia.container.flex"
              }
            ],
            "meta": {
              "name": "FlexContainer_1"
            },
            "position": {
              "basis": "140px"
            },
            "props": {
              "direction": "column",
              "style": {
                "borderBottomLeftRadius": "5px",
                "borderBottomRightRadius": "5px",
                "borderStyle": "solid",
                "borderTopLeftRadius": "5px",
                "borderTopRightRadius": "5px",
                "margin": "10px"
              }
            },
            "type": "ia.container.flex"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "meta": {
                      "name": "Icon"
                    },
                    "position": {
                      "basis": "32px"
                    },
                    "props": {
                      "path": "material/settings_applications",
                      "style": {
                        "marginLeft": "10px"
                      }
                    },
                    "type": "ia.display.icon"
                  },
                  {
                    "meta": {
                      "name": "Label"
                    },
                    "position": {
                      "basis": "232px"
                    },
                    "props": {
                      "style": {
                        "marginLeft": "10px"
                      },
                      "text": "PLC Configuration",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  }
                ],
                "meta": {
                  "name": "FlexContainer"
                },
                "position": {
                  "basis": "50px"
                },
                "type": "ia.container.flex"
              },
              {
                "events": {
                  "component": {
                    "onEditCellCommit": {
                      "config": {
                        "script": "\tif not self.view.custom.Enable_input:\n\t\treturn\n\tcolumn \u003d event.column\n\trow \u003d event.row\n\tself.props.data[row][column] \u003d event.value\n\trow_data \u003d self.props.data[row]\n\tsystem.perspective.print(row_data)\n\twhid \u003d self.session.custom.fc\n\ttag_path \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid\n\ttag_data \u003d system.tag.readBlocking([tag_path])[0].value\n\ttag_data \u003d system.util.jsonDecode(tag_data)\n\t\n\tdef get_child():\n\t\treturn {\n\t\t\t\"Area\":\"\",\n\t\t\t\"SubArea\":\"\"\n\t\t}\n\t\n\tchild \u003d get_child()\n\tchild[\"Area\"] \u003d row_data[\"Area\"]\n\tchild[\"SubArea\"]\u003d row_data[\"SubArea\"]\n\t\n\ttag_data[row_data[\"Device\"]]\u003d child\n\tencoded_data \u003d system.util.jsonEncode(tag_data)\n\tsystem.tag.writeBlocking([tag_path], [encoded_data])\t"
                      },
                      "scope": "G",
                      "type": "script"
                    }
                  }
                },
                "meta": {
                  "name": "Table"
                },
                "position": {
                  "basis": "286px"
                },
                "propConfig": {
                  "custom.tagData": {
                    "binding": {
                      "config": {
                        "fallbackDelay": 2.5,
                        "mode": "indirect",
                        "references": {
                          "fc": "{session.custom.fc}"
                        },
                        "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
                      },
                      "transforms": [
                        {
                          "code": "\ttagData \u003d[{\"Device\":k, \"Area\":v[\"Area\"], \"SubArea\":v[\"SubArea\"]} for k,v in system.util.jsonDecode(value).items()]\n\treturn tagData",
                          "type": "script"
                        }
                      ],
                      "type": "tag"
                    }
                  },
                  "props.data": {
                    "binding": {
                      "config": {
                        "path": "this.custom.tagData"
                      },
                      "type": "property"
                    }
                  },
                  "props.selection.data": {
                    "onChange": {
                      "enabled": null,
                      "script": "\tsystem.perspective.sendMessage(\"selected-plcs\", payload\u003dcurrentValue.value)"
                    }
                  }
                },
                "props": {
                  "columns": [
                    {
                      "align": "center",
                      "boolean": "checkbox",
                      "dateFormat": "MM/DD/YYYY",
                      "editable": true,
                      "field": "Device",
                      "filter": {
                        "boolean": {
                          "condition": ""
                        },
                        "date": {
                          "condition": "",
                          "value": ""
                        },
                        "enabled": false,
                        "number": {
                          "condition": "",
                          "value": ""
                        },
                        "string": {
                          "condition": "",
                          "value": ""
                        },
                        "visible": "on-hover"
                      },
                      "footer": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "header": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "justify": "auto",
                      "nullFormat": {
                        "includeNullStrings": false,
                        "nullFormatValue": "",
                        "strict": false
                      },
                      "number": "value",
                      "numberFormat": "0,0.##",
                      "progressBar": {
                        "bar": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "max": 100,
                        "min": 0,
                        "track": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "value": {
                          "enabled": true,
                          "format": "0,0.##",
                          "justify": "center",
                          "style": {
                            "classes": ""
                          }
                        }
                      },
                      "render": "auto",
                      "resizable": true,
                      "sort": "none",
                      "sortable": true,
                      "strictWidth": false,
                      "style": {
                        "classes": "",
                        "fontSize": "12px"
                      },
                      "toggleSwitch": {
                        "color": {
                          "selected": "",
                          "unselected": ""
                        }
                      },
                      "viewParams": {},
                      "viewPath": "",
                      "visible": true,
                      "width": ""
                    },
                    {
                      "align": "center",
                      "boolean": "checkbox",
                      "dateFormat": "MM/DD/YYYY",
                      "editable": true,
                      "field": "Area",
                      "filter": {
                        "boolean": {
                          "condition": ""
                        },
                        "date": {
                          "condition": "",
                          "value": ""
                        },
                        "enabled": false,
                        "number": {
                          "condition": "",
                          "value": ""
                        },
                        "string": {
                          "condition": "",
                          "value": ""
                        },
                        "visible": "on-hover"
                      },
                      "footer": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "header": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "justify": "auto",
                      "nullFormat": {
                        "includeNullStrings": false,
                        "nullFormatValue": "",
                        "strict": false
                      },
                      "number": "value",
                      "numberFormat": "0,0.##",
                      "progressBar": {
                        "bar": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "max": 100,
                        "min": 0,
                        "track": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "value": {
                          "enabled": true,
                          "format": "0,0.##",
                          "justify": "center",
                          "style": {
                            "classes": ""
                          }
                        }
                      },
                      "render": "auto",
                      "resizable": true,
                      "sort": "none",
                      "sortable": true,
                      "strictWidth": false,
                      "style": {
                        "classes": "",
                        "fontSize": "12px"
                      },
                      "toggleSwitch": {
                        "color": {
                          "selected": "",
                          "unselected": ""
                        }
                      },
                      "viewParams": {},
                      "viewPath": "",
                      "visible": true,
                      "width": ""
                    },
                    {
                      "align": "center",
                      "boolean": "checkbox",
                      "dateFormat": "MM/DD/YYYY",
                      "editable": true,
                      "field": "SubArea",
                      "filter": {
                        "boolean": {
                          "condition": ""
                        },
                        "date": {
                          "condition": "",
                          "value": ""
                        },
                        "enabled": false,
                        "number": {
                          "condition": "",
                          "value": ""
                        },
                        "string": {
                          "condition": "",
                          "value": ""
                        },
                        "visible": "on-hover"
                      },
                      "footer": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "header": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "justify": "auto",
                      "nullFormat": {
                        "includeNullStrings": false,
                        "nullFormatValue": "",
                        "strict": false
                      },
                      "number": "value",
                      "numberFormat": "0,0.##",
                      "progressBar": {
                        "bar": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "max": 100,
                        "min": 0,
                        "track": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "value": {
                          "enabled": true,
                          "format": "0,0.##",
                          "justify": "center",
                          "style": {
                            "classes": ""
                          }
                        }
                      },
                      "render": "auto",
                      "resizable": true,
                      "sort": "none",
                      "sortable": true,
                      "strictWidth": false,
                      "style": {
                        "classes": "",
                        "fontSize": "12px"
                      },
                      "toggleSwitch": {
                        "color": {
                          "selected": "",
                          "unselected": ""
                        }
                      },
                      "viewParams": {},
                      "viewPath": "",
                      "visible": true,
                      "width": ""
                    }
                  ],
                  "filter": {
                    "enabled": true
                  },
                  "selection": {
                    "mode": "multiple interval"
                  },
                  "style": {
                    "fontSize": "12px",
                    "marginLeft": "10px"
                  }
                },
                "scripts": {
                  "customMethods": [],
                  "extensionFunctions": null,
                  "messageHandlers": [
                    {
                      "messageType": "add-device-entry",
                      "pageScope": false,
                      "script": "\tdata \u003d payload[\"data\"]\n\tself.props.data.append(data)",
                      "sessionScope": false,
                      "viewScope": true
                    },
                    {
                      "messageType": "update-plc-config",
                      "pageScope": false,
                      "script": "\tdata \u003d payload[\"data\"]\n\tself.props.data \u003d data",
                      "sessionScope": false,
                      "viewScope": true
                    }
                  ]
                },
                "type": "ia.display.table"
              },
              {
                "children": [
                  {
                    "custom": {
                      "dockOpened": true
                    },
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\tdevice_entry \u003d {\"Device\":\"\",\"Area\":\"\",\"SubArea\":\"\"}\n\tif not self.view.getChild(\"root\").custom.isDockOpen:\n\t\tparams \u003d {\n\t\t\t\"path\":\"Main-Views/Config-Tool/AddDevice\",\n\t\t\t\"params\":device_entry\t\n\t\t}\n\t\tsystem.perspective.sendMessage(\"select-side-view\", payload\u003dparams)\n\n\tself.custom.dockOpened \u003d self.view.getChild(\"root\").custom.isDockOpen ^ True\n"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button"
                    },
                    "position": {
                      "basis": "135px"
                    },
                    "propConfig": {
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      }
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "path": "material/add_circle_outline"
                        }
                      },
                      "primary": false,
                      "style": {
                        "marginLeft": "10px"
                      },
                      "text": "Add Device"
                    },
                    "type": "ia.input.button"
                  },
                  {
                    "custom": {
                      "dataAfterRemoval": {
                        "ARSAW1301": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1302": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1303": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1304": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1305": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1306": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1307": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1308": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1309": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1310": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1311": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1312": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1501": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1502": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1503": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1504": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1505": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1506": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1507": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1508": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1509": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1510": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1511": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1512": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "FSC1": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "FSC10": {
                          "Area": "OUTBOUND",
                          "SubArea": "FSC"
                        },
                        "FSC2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "FSC_Cells": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "FSC_Induct_1-4": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC01": {
                          "Area": "OUTBOUND",
                          "SubArea": "SHIP"
                        },
                        "PLC02": {
                          "Area": "OUTBOUND",
                          "SubArea": "SHIP"
                        },
                        "PLC03": {
                          "Area": "OUTBOUND",
                          "SubArea": "KO \u0026 REJECT"
                        },
                        "PLC06": {
                          "Area": "OUTBOUND",
                          "SubArea": "TOTE ROUTER"
                        },
                        "PLC07": {
                          "Area": "OUTBOUND",
                          "SubArea": "TOTE ROUTER"
                        },
                        "PLC08": {
                          "Area": "OUTBOUND",
                          "SubArea": "TOTE FEED"
                        },
                        "PLC09": {
                          "Area": "INBOUND",
                          "SubArea": "RECEIVING"
                        },
                        "PLC09_Receiving2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC09_Receiving3": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC1000": {
                          "Area": "INBOUND",
                          "SubArea": "RECEIVING"
                        },
                        "PLC1000_Receiving4": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC13": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW P2"
                        },
                        "PLC13_SC2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC14": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC15": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW P3"
                        },
                        "PLC15_SC2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC16": {
                          "Area": "AR FLOOR",
                          "SubArea": "PICK TO REBIN P3"
                        },
                        "PLC20": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 TOTE 1-3"
                        },
                        "PLC20_Tote4-8": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC21": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE TRAY ROUTER"
                        },
                        "PLC22": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE TRAY ROUTER"
                        },
                        "PLC23": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 TRAY FEED"
                        },
                        "PLC24": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 1,2"
                        },
                        "PLC25": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 3,4"
                        },
                        "PLC26": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 5,6"
                        },
                        "PLC27": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 7,8"
                        },
                        "PLC30": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 PACK 1-4"
                        },
                        "PLC31": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 PACK 5-8"
                        },
                        "PLC32": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 EMP. TOTE"
                        },
                        "PLC60": {
                          "Area": "OUTBOUND",
                          "SubArea": "S.PACKING 1"
                        },
                        "PLC61": {
                          "Area": "OUTBOUND",
                          "SubArea": "S.PACKING 2"
                        },
                        "PLC69": {
                          "Area": "OUTBOUND",
                          "SubArea": "GIFT WRAP"
                        },
                        "PLC70": {
                          "Area": "OUTBOUND",
                          "SubArea": "TRANSSHIP"
                        },
                        "PLC71": {
                          "Area": "OUTBOUND",
                          "SubArea": "TRANSSHIP"
                        },
                        "PLC80": {
                          "Area": "OUTBOUND",
                          "SubArea": "SMART PACKING"
                        },
                        "PLC81": {
                          "Area": "OUTBOUND",
                          "SubArea": "SMART PACKING"
                        },
                        "PLC82": {
                          "Area": "OUTBOUND",
                          "SubArea": "SMART PACKING"
                        },
                        "PLC97": {
                          "Area": "SAFETY PLC",
                          "SubArea": ""
                        },
                        "PLC98": {
                          "Area": "SAFETY PLC",
                          "SubArea": ""
                        },
                        "PLC99": {
                          "Area": "SAFETY PLC",
                          "SubArea": ""
                        }
                      },
                      "itemsToRemove": []
                    },
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\t\n\twhid \u003d self.session.custom.fc\n\t\n\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid])[0].value) \n\t\n\tfor item in self.custom.itemsToRemove:\n\t\tresult \u003d tagData.pop(item[\"Device\"],None)\n\t\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%whid],system.util.jsonEncode(tagData))"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button_2"
                    },
                    "position": {
                      "basis": "156px"
                    },
                    "propConfig": {
                      "custom.tagData": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
                          },
                          "transforms": [
                            {
                              "code": "\treturn system.util.jsonDecode(value)",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      },
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      }
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "path": "material/remove_circle_outline"
                        }
                      },
                      "primary": false,
                      "style": {
                        "marginLeft": "10px",
                        "marginRight": "10px"
                      },
                      "text": "Remove Device"
                    },
                    "scripts": {
                      "customMethods": [],
                      "extensionFunctions": null,
                      "messageHandlers": [
                        {
                          "messageType": "selected-plcs",
                          "pageScope": true,
                          "script": "\t# implement your handler here\n\tself.custom.itemsToRemove \u003d payload",
                          "sessionScope": false,
                          "viewScope": false
                        }
                      ]
                    },
                    "type": "ia.input.button"
                  },
                  {
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\t\n\ttagPath\u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\"%self.session.custom.fc \n\t\t\n\tsystem.tag.writeBlocking(tagPath, \"{}\")\n\t"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button_0",
                      "visible": false
                    },
                    "position": {
                      "basis": "135px",
                      "display": false
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "path": "material/remove_circle_outline"
                        }
                      },
                      "primary": false,
                      "style": {
                        "marginLeft": "10px",
                        "marginRight": "10px"
                      },
                      "text": "Clear"
                    },
                    "type": "ia.input.button"
                  },
                  {
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\n\tFileHandler.downloader.download_file(\"Device_data.csv\", self.custom.tagData, FileHandler.downloader.device_data_converter)\n"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button_3"
                    },
                    "position": {
                      "basis": "135px"
                    },
                    "propConfig": {
                      "custom.tagData": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
                          },
                          "transforms": [
                            {
                              "code": "\ttagData \u003d[{\"Device\":k, \"Area\":v[\"Area\"], \"SubArea\":v[\"SubArea\"]} for k,v in system.util.jsonDecode(value).items()]\n\treturn tagData",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      }
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "color": "#377AAE",
                          "path": "material/cloud_download"
                        }
                      },
                      "primary": false,
                      "style": {
                        "classes": "\n"
                      },
                      "text": ""
                    },
                    "type": "ia.input.button"
                  }
                ],
                "meta": {
                  "name": "FlexContainer_0"
                },
                "position": {
                  "basis": "40px"
                },
                "props": {
                  "style": {
                    "marginBottom": "10px",
                    "marginTop": "10px"
                  }
                },
                "type": "ia.container.flex"
              }
            ],
            "meta": {
              "name": "FlexContainer"
            },
            "position": {
              "basis": "414px"
            },
            "props": {
              "direction": "column",
              "style": {
                "borderBottomLeftRadius": "5px",
                "borderBottomRightRadius": "5px",
                "borderStyle": "solid",
                "borderTopLeftRadius": "5px",
                "borderTopRightRadius": "5px",
                "margin": "10px"
              }
            },
            "type": "ia.container.flex"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "meta": {
                      "name": "Icon"
                    },
                    "position": {
                      "basis": "32px"
                    },
                    "props": {
                      "path": "material/view_list",
                      "style": {
                        "marginLeft": "10px"
                      }
                    },
                    "type": "ia.display.icon"
                  },
                  {
                    "meta": {
                      "name": "Label"
                    },
                    "position": {
                      "basis": "232px"
                    },
                    "props": {
                      "style": {
                        "marginLeft": "10px"
                      },
                      "text": "Detailed View Mapping",
                      "textStyle": {
                        "fontFamily": "Arial",
                        "fontSize": "16px",
                        "fontWeight": "bold"
                      }
                    },
                    "type": "ia.display.label"
                  }
                ],
                "meta": {
                  "name": "FlexContainer"
                },
                "position": {
                  "basis": "50px"
                },
                "type": "ia.container.flex"
              },
              {
                "events": {
                  "component": {
                    "onEditCellCommit": {
                      "config": {
                        "script": "\timport ast\n\t\n\tif not self.view.custom.Enable_input:\n\t\treturn \n\t\t\n\tdef is_valid_list(s):\n\t    try:\n\t        # Try to evaluate the string\n\t        result \u003d ast.literal_eval(s)\n\t        # Check if the result is a list\n\t        return isinstance(result, list)\n\t    except (ValueError, SyntaxError):\n\t        # If there is a ValueError or SyntaxError, the string is not a valid list\n\t        return False\n\n\tcolumn \u003d event.column\n\trow \u003d event.row\n\tself.props.data[row][column] \u003d event.value\n\trow_data \u003d self.props.data[row]\n\twhid \u003d self.session.custom.fc\n\ttag_path \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid\n\ttag_data \u003d system.tag.readBlocking([tag_path])[0].value\n\ttag_data \u003d system.util.jsonDecode(tag_data)\n\t\n\tif is_valid_list(event.value):\n\t\ttag_data[row_data[\"DetailedView\"]] \u003d event.value\n\telse:\n\t\tsystem.perspective.print(\"Not a valid list \")\n\t\treturn\n\n\ttag_data \u003d system.util.jsonEncode(tag_data)\n\tsystem.tag.writeBlocking([tag_path], [tag_data])"
                      },
                      "scope": "G",
                      "type": "script"
                    }
                  }
                },
                "meta": {
                  "name": "Table"
                },
                "position": {
                  "basis": "302px"
                },
                "propConfig": {
                  "custom.tagData": {
                    "binding": {
                      "config": {
                        "fallbackDelay": 2.5,
                        "mode": "indirect",
                        "references": {
                          "fc": "{session.custom.fc}"
                        },
                        "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews"
                      },
                      "transforms": [
                        {
                          "code": "\tdata \u003d []\n\t\n\tdef get_item(detailed_view , devices):\n\t\treturn {\n\t\t\t\"Devices\":str(devices),\n\t\t\t\"DetailedView\":detailed_view\n\t\t\t\n\t\t}\n\t\n\tfor k,v in  system.util.jsonDecode(value).items():\n\t\titem \u003d get_item(k, v)\n\t\tdata.append(item)\n\t\n\treturn data\n\t\t\n\t\t",
                          "type": "script"
                        }
                      ],
                      "type": "tag"
                    }
                  },
                  "props.data": {
                    "binding": {
                      "config": {
                        "path": "this.custom.tagData"
                      },
                      "type": "property"
                    }
                  },
                  "props.rows.subview.viewParams.value": {
                    "binding": {
                      "config": {
                        "path": "this.props.selection.data"
                      },
                      "type": "property"
                    }
                  },
                  "props.selection.data": {
                    "onChange": {
                      "enabled": null,
                      "script": "\tsystem.perspective.sendMessage(\"selected-views\", payload\u003dcurrentValue.value)"
                    }
                  }
                },
                "props": {
                  "columns": [
                    {
                      "align": "center",
                      "boolean": "checkbox",
                      "dateFormat": "MM/DD/YYYY",
                      "editable": true,
                      "field": "DetailedView",
                      "filter": {
                        "boolean": {
                          "condition": ""
                        },
                        "date": {
                          "condition": "",
                          "value": ""
                        },
                        "enabled": false,
                        "number": {
                          "condition": "",
                          "value": ""
                        },
                        "string": {
                          "condition": "",
                          "value": ""
                        },
                        "visible": "on-hover"
                      },
                      "footer": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "header": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "justify": "auto",
                      "nullFormat": {
                        "includeNullStrings": false,
                        "nullFormatValue": "",
                        "strict": false
                      },
                      "number": "value",
                      "numberFormat": "0,0.##",
                      "progressBar": {
                        "bar": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "max": 100,
                        "min": 0,
                        "track": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "value": {
                          "enabled": true,
                          "format": "0,0.##",
                          "justify": "center",
                          "style": {
                            "classes": ""
                          }
                        }
                      },
                      "render": "auto",
                      "resizable": false,
                      "sort": "none",
                      "sortable": false,
                      "strictWidth": false,
                      "style": {
                        "classes": ""
                      },
                      "toggleSwitch": {
                        "color": {
                          "selected": "",
                          "unselected": ""
                        }
                      },
                      "viewParams": {},
                      "viewPath": "",
                      "visible": true,
                      "width": ""
                    },
                    {
                      "align": "center",
                      "boolean": "checkbox",
                      "dateFormat": "MM/DD/YYYY",
                      "editable": true,
                      "field": "Devices",
                      "filter": {
                        "boolean": {
                          "condition": ""
                        },
                        "date": {
                          "condition": "",
                          "value": ""
                        },
                        "enabled": false,
                        "number": {
                          "condition": "",
                          "value": ""
                        },
                        "string": {
                          "condition": "",
                          "value": ""
                        },
                        "visible": "on-hover"
                      },
                      "footer": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "header": {
                        "align": "center",
                        "justify": "left",
                        "style": {
                          "classes": ""
                        },
                        "title": ""
                      },
                      "justify": "auto",
                      "nullFormat": {
                        "includeNullStrings": false,
                        "nullFormatValue": "",
                        "strict": false
                      },
                      "number": "value",
                      "numberFormat": "0,0.##",
                      "progressBar": {
                        "bar": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "max": 100,
                        "min": 0,
                        "track": {
                          "color": "",
                          "style": {
                            "classes": ""
                          }
                        },
                        "value": {
                          "enabled": true,
                          "format": "0,0.##",
                          "justify": "center",
                          "style": {
                            "classes": ""
                          }
                        }
                      },
                      "render": "auto",
                      "resizable": true,
                      "sort": "none",
                      "sortable": true,
                      "strictWidth": false,
                      "style": {
                        "classes": ""
                      },
                      "toggleSwitch": {
                        "color": {
                          "selected": "",
                          "unselected": ""
                        }
                      },
                      "viewParams": {},
                      "viewPath": "",
                      "visible": true,
                      "width": ""
                    }
                  ],
                  "filter": {
                    "enabled": true
                  },
                  "rows": {
                    "subview": {
                      "viewParams": {
                        "rowIndex": "value"
                      },
                      "viewPath": "Main-Views/Config-Tool/TableSubView"
                    }
                  },
                  "style": {
                    "fontSize": "12px",
                    "marginLeft": "10px"
                  }
                },
                "type": "ia.display.table"
              },
              {
                "children": [
                  {
                    "custom": {
                      "dockOpened": true
                    },
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\tdevice_entry \u003d {\"view\":\"\",\"deviceList\":\"\"}\n\tif not self.view.getChild(\"root\").custom.isDockOpen:\n\t\tparams \u003d {\n\t\t\t\"path\":\"Main-Views/Config-Tool/AddDetailedViewMapping\",\n\t\t\t\"params\":device_entry\t\n\t\t}\n\t\tsystem.perspective.sendMessage(\"select-side-view\", payload\u003dparams)\n\n\t\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)\n\tself.custom.dockOpened \u003d self.view.getChild(\"root\").custom.isDockOpen ^ True\n\tsystem.perspective.print(self.view.getChild(\"root\").custom.isDockOpen)"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button"
                    },
                    "position": {
                      "basis": "135px"
                    },
                    "propConfig": {
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      }
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "path": "material/add_circle_outline"
                        }
                      },
                      "primary": false,
                      "style": {
                        "marginLeft": "10px"
                      },
                      "text": "Add View"
                    },
                    "type": "ia.input.button"
                  },
                  {
                    "custom": {
                      "dataAfterRemoval": {
                        "ARSAW1301": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1302": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1303": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1304": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1305": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1306": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1307": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1308": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1309": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1310": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1311": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1312": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1501": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1502": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1503": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1504": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1505": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1506": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1507": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1508": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1509": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1510": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1511": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "ARSAW1512": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW"
                        },
                        "FSC1": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "FSC10": {
                          "Area": "OUTBOUND",
                          "SubArea": "FSC"
                        },
                        "FSC2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "FSC_Cells": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "FSC_Induct_1-4": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC01": {
                          "Area": "OUTBOUND",
                          "SubArea": "SHIP"
                        },
                        "PLC02": {
                          "Area": "OUTBOUND",
                          "SubArea": "SHIP"
                        },
                        "PLC03": {
                          "Area": "OUTBOUND",
                          "SubArea": "KO \u0026 REJECT"
                        },
                        "PLC06": {
                          "Area": "OUTBOUND",
                          "SubArea": "TOTE ROUTER"
                        },
                        "PLC07": {
                          "Area": "OUTBOUND",
                          "SubArea": "TOTE ROUTER"
                        },
                        "PLC08": {
                          "Area": "OUTBOUND",
                          "SubArea": "TOTE FEED"
                        },
                        "PLC09": {
                          "Area": "INBOUND",
                          "SubArea": "RECEIVING"
                        },
                        "PLC09_Receiving2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC09_Receiving3": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC1000": {
                          "Area": "INBOUND",
                          "SubArea": "RECEIVING"
                        },
                        "PLC1000_Receiving4": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC13": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW P2"
                        },
                        "PLC13_SC2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC14": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC15": {
                          "Area": "AR FLOOR",
                          "SubArea": "ARSAW P3"
                        },
                        "PLC15_SC2": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC16": {
                          "Area": "AR FLOOR",
                          "SubArea": "PICK TO REBIN P3"
                        },
                        "PLC20": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 TOTE 1-3"
                        },
                        "PLC20_Tote4-8": {
                          "Area": "",
                          "SubArea": ""
                        },
                        "PLC21": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE TRAY ROUTER"
                        },
                        "PLC22": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE TRAY ROUTER"
                        },
                        "PLC23": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 TRAY FEED"
                        },
                        "PLC24": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 1,2"
                        },
                        "PLC25": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 3,4"
                        },
                        "PLC26": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 5,6"
                        },
                        "PLC27": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 WALL 7,8"
                        },
                        "PLC30": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 PACK 1-4"
                        },
                        "PLC31": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 PACK 5-8"
                        },
                        "PLC32": {
                          "Area": "OUTBOUND",
                          "SubArea": "AFE1 EMP. TOTE"
                        },
                        "PLC60": {
                          "Area": "OUTBOUND",
                          "SubArea": "S.PACKING 1"
                        },
                        "PLC61": {
                          "Area": "OUTBOUND",
                          "SubArea": "S.PACKING 2"
                        },
                        "PLC69": {
                          "Area": "OUTBOUND",
                          "SubArea": "GIFT WRAP"
                        },
                        "PLC70": {
                          "Area": "OUTBOUND",
                          "SubArea": "TRANSSHIP"
                        },
                        "PLC71": {
                          "Area": "OUTBOUND",
                          "SubArea": "TRANSSHIP"
                        },
                        "PLC80": {
                          "Area": "OUTBOUND",
                          "SubArea": "SMART PACKING"
                        },
                        "PLC81": {
                          "Area": "OUTBOUND",
                          "SubArea": "SMART PACKING"
                        },
                        "PLC82": {
                          "Area": "OUTBOUND",
                          "SubArea": "SMART PACKING"
                        },
                        "PLC97": {
                          "Area": "SAFETY PLC",
                          "SubArea": ""
                        },
                        "PLC98": {
                          "Area": "SAFETY PLC",
                          "SubArea": ""
                        },
                        "PLC99": {
                          "Area": "SAFETY PLC",
                          "SubArea": ""
                        }
                      },
                      "itemsToRemove": []
                    },
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\t\n\twhid \u003d self.session.custom.fc\n\t\n\ttagData \u003d system.util.jsonDecode(system.tag.readBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid])[0].value) \n\t\n\tfor item in self.custom.itemsToRemove:\n\t\tresult \u003d tagData.pop(item[\"DetailedView\"],None)\n\t\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid],system.util.jsonEncode(tagData))"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button_2"
                    },
                    "position": {
                      "basis": "156px"
                    },
                    "propConfig": {
                      "custom.tagData": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
                          },
                          "transforms": [
                            {
                              "code": "\treturn system.util.jsonDecode(value)",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      },
                      "props.enabled": {
                        "binding": {
                          "config": {
                            "path": "view.custom.Enable_input"
                          },
                          "type": "property"
                        }
                      }
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "path": "material/remove_circle_outline"
                        }
                      },
                      "primary": false,
                      "style": {
                        "marginLeft": "10px",
                        "marginRight": "10px"
                      },
                      "text": "Remove View"
                    },
                    "scripts": {
                      "customMethods": [],
                      "extensionFunctions": null,
                      "messageHandlers": [
                        {
                          "messageType": "selected-views",
                          "pageScope": true,
                          "script": "\t# implement your handler here\n\tself.custom.itemsToRemove \u003d payload",
                          "sessionScope": false,
                          "viewScope": false
                        }
                      ]
                    },
                    "type": "ia.input.button"
                  },
                  {
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\twhid \u003d self.session.custom.fc\n\tsystem.tag.writeBlocking([\"[%s_SCADA_TAG_PROVIDER]Configuration/DetailedViews\"%whid], [\"{}\"])"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button_0",
                      "visible": false
                    },
                    "position": {
                      "basis": "135px",
                      "display": false
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "path": "material/remove_circle_outline"
                        }
                      },
                      "primary": false,
                      "style": {
                        "marginLeft": "10px"
                      },
                      "text": "Clear"
                    },
                    "type": "ia.input.button"
                  },
                  {
                    "events": {
                      "component": {
                        "onActionPerformed": {
                          "config": {
                            "script": "\t\n\tFileHandler.downloader.download_file(\"DetailedView_data.csv\", self.custom.tagData, FileHandler.downloader.detailed_views_converter)\n"
                          },
                          "scope": "G",
                          "type": "script"
                        }
                      }
                    },
                    "meta": {
                      "name": "Button_1"
                    },
                    "position": {
                      "basis": "135px"
                    },
                    "propConfig": {
                      "custom.tagData": {
                        "binding": {
                          "config": {
                            "fallbackDelay": 2.5,
                            "mode": "indirect",
                            "references": {
                              "fc": "{session.custom.fc}"
                            },
                            "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/DetailedViews"
                          },
                          "transforms": [
                            {
                              "code": "\treturn [{\"DetailedView\":k,\"Devices\":v}for k,v in system.util.jsonDecode(value).items()]",
                              "type": "script"
                            }
                          ],
                          "type": "tag"
                        }
                      }
                    },
                    "props": {
                      "image": {
                        "icon": {
                          "color": "#377AAE",
                          "path": "material/cloud_download"
                        }
                      },
                      "primary": false,
                      "style": {
                        "classes": "\n"
                      },
                      "text": ""
                    },
                    "type": "ia.input.button"
                  }
                ],
                "meta": {
                  "name": "FlexContainer_0"
                },
                "position": {
                  "basis": "40px"
                },
                "props": {
                  "style": {
                    "marginBottom": "10px",
                    "marginTop": "10px"
                  }
                },
                "type": "ia.container.flex"
              }
            ],
            "meta": {
              "name": "FlexContainer_0"
            },
            "position": {
              "basis": "414px"
            },
            "props": {
              "direction": "column",
              "style": {
                "borderBottomLeftRadius": "5px",
                "borderBottomRightRadius": "5px",
                "borderStyle": "solid",
                "borderTopLeftRadius": "5px",
                "borderTopRightRadius": "5px",
                "margin": "10px"
              }
            },
            "type": "ia.container.flex"
          }
        ],
        "meta": {
          "name": "FlexContainer_0"
        },
        "position": {
          "basis": "888px",
          "grow": 1
        },
        "props": {
          "direction": "column"
        },
        "type": "ia.container.flex"
      },
      {
        "children": [
          {
            "custom": {
              "params": {
                "Area": "",
                "Device": "",
                "SubArea": ""
              },
              "path": "Main-Views/Config-Tool/TagViewer"
            },
            "meta": {
              "name": "EmbeddedView"
            },
            "position": {
              "basis": "320px",
              "grow": 1
            },
            "propConfig": {
              "props.params.params": {
                "binding": {
                  "config": {
                    "path": "this.custom.params"
                  },
                  "type": "property"
                }
              },
              "props.path": {
                "binding": {
                  "config": {
                    "path": "this.custom.path"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "useDefaultViewWidth": true
            },
            "scripts": {
              "customMethods": [],
              "extensionFunctions": null,
              "messageHandlers": [
                {
                  "messageType": "select-side-view",
                  "pageScope": true,
                  "script": "\t# implement your handler here\n\tself.custom.path \u003d payload.get(\"path\")\n\tself.custom.params \u003d payload.get(\"params\")\n\t",
                  "sessionScope": true,
                  "viewScope": false
                }
              ]
            },
            "type": "ia.display.view"
          }
        ],
        "custom": {
          "path": "Main-Views/Config-Tool/TagViewer"
        },
        "meta": {
          "name": "FlexContainer"
        },
        "position": {
          "basis": "420px"
        },
        "props": {
          "direction": "column"
        },
        "scripts": {
          "customMethods": [],
          "extensionFunctions": null,
          "messageHandlers": [
            {
              "messageType": "select-side-view",
              "pageScope": true,
              "script": "\t# implement your handler here\n\tif self.position.display and payload.get(\"path\") \u003d\u003d self.custom.path :\n\t\tself.position.display \u003d False\n\telse:\n\t\tself.position.display \u003d True\n\t\t\n\tself.custom.path \u003d payload.get(\"path\")\n\n#\tself.position.display \u003d not self.position.display",
              "sessionScope": false,
              "viewScope": false
            }
          ]
        },
        "type": "ia.container.flex"
      }
    ],
    "custom": {
      "isDockOpen": false
    },
    "events": {
      "system": {
        "onStartup": {
          "config": {
            "script": "\twhid \u003d self.session.custom.fc\n\ttag_path \u003d \"[%s_SCADA_TAG_PROVIDER]Configuration/PLC\" % (whid)\n\t\n\tif system.tag.exists(tag_path):\n\t\tpayload \u003d {}\n\t\ttag_to_read \u003d system.tag.readBlocking([tag_path])[0].value\n\t\tjson_value \u003d system.util.jsonDecode(tag_to_read)\n\t\tplc_config \u003d []\n\t\tfor k,v in json_value.items():\n\t\t\tplc \u003d k\n\t\t\tarea \u003d v.get(\"Area\")\n\t\t\tsub_area \u003d v.get(\"SubArea\")\n\t\t\titems_to_add \u003d {\"Device\":plc, \n\t\t\t\t\t\t\t\"Area\":area, \n\t\t\t\t\t\t\t\"SubArea\":sub_area}\n\t\t\tplc_config.append(items_to_add)\n\t\tpayload[\"data\"] \u003d plc_config\n\t\tsystem.perspective.sendMessage(\"update-plc-config\", payload, scope \u003d \"view\")\n\t\n\t"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "meta": {
      "name": "root"
    },
    "scripts": {
      "customMethods": [
        {
          "name": "newMethod",
          "params": [],
          "script": "\t# implement your method here"
        }
      ],
      "extensionFunctions": null,
      "messageHandlers": []
    },
    "type": "ia.container.flex"
  }
}