{
  "custom": {
    "PLCs": "{   \"MCM01\": { \"Area\": \"Fluid Inbound\", \"SubAreas\": [] },   \"MCM02\": { \"Area\": \"Fluid Inbound Merges 5-7\", \"SubAreas\": [\"Fluid Inbound Upper\"] },   \"MCM03\": { \"Area\": \"MCM03\", \"SubAreas\": [] },   \"MCM04\": { \"Area\": \"MCM04\", \"SubAreas\": [] },   \"MCM05\": { \"Area\": \"MCM05\", \"SubAreas\": [] },   \"MCM06\": { \"Area\": \"MCM06\", \"SubAreas\": [] },   \"MCM07\": { \"Area\": \"MCM07\", \"SubAreas\": [] },   \"MCM08\": { \"Area\": \"MCM08\", \"SubAreas\": [] },   \"MCM09\": { \"Area\": \"MCM09\", \"SubAreas\": [] },   \"MCM10\": { \"Area\": \"MCM10\", \"SubAreas\": [] },   \"MCM11\": { \"Area\": \"MCM11\", \"SubAreas\": [] },   \"MCM12\": { \"Area\": \"MCM12\", \"SubAreas\": [] },   \"MCM13\": { \"Area\": \"MCM13\", \"SubAreas\": [] },   \"MCM14\": { \"Area\": \"MCM14\", \"SubAreas\": [] },   \"MCM15\": { \"Area\": \"MCM15\", \"SubAreas\": [] } } ",
    "activityLogger": {
      "alt_pageid": "command_control",
      "start_time": {
        "$": [
          "ts",
          192,
          1768655563310
        ],
        "$ts": 1768655563309
      }
    },
    "devices": {
      "MCM01": {
        "area": "Fluid Inbound",
        "name": "MCM01",
        "tagProps": [
          "MCM01",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM02": {
        "area": "Fluid Inbound Merges 5-7",
        "name": "MCM02",
        "tagProps": [
          "MCM02",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM03": {
        "area": "MCM03",
        "name": "MCM03",
        "tagProps": [
          "MCM03",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM04": {
        "area": "MCM04",
        "name": "MCM04",
        "tagProps": [
          "MCM04",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM05": {
        "area": "MCM05",
        "name": "MCM05",
        "tagProps": [
          "MCM05",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM06": {
        "area": "MCM06",
        "name": "MCM06",
        "tagProps": [
          "MCM06",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM07": {
        "area": "MCM07",
        "name": "MCM07",
        "tagProps": [
          "MCM07",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM08": {
        "area": "MCM08",
        "name": "MCM08",
        "tagProps": [
          "MCM08",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM09": {
        "area": "MCM09",
        "name": "MCM09",
        "tagProps": [
          "MCM09",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM10": {
        "area": "MCM10",
        "name": "MCM10",
        "tagProps": [
          "MCM10",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM11": {
        "area": "MCM11",
        "name": "MCM11",
        "tagProps": [
          "MCM11",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM12": {
        "area": "MCM12",
        "name": "MCM12",
        "tagProps": [
          "MCM12",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM13": {
        "area": "MCM13",
        "name": "MCM13",
        "tagProps": [
          "MCM13",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM14": {
        "area": "MCM14",
        "name": "MCM14",
        "tagProps": [
          "MCM14",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      },
      "MCM15": {
        "area": "MCM15",
        "name": "MCM15",
        "tagProps": [
          "MCM15",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value",
          "value"
        ]
      }
    }
  },
  "events": {
    "system": {
      "onShutdown": {
        "config": {
          "script": "#\tactivityLog.logger.callLogger(self, \u0027page\u0027)\n#\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)\n\tpass"
        },
        "scope": "G",
        "type": "script"
      },
      "onStartup": {
        "config": {
          "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()"
        },
        "scope": "G",
        "type": "script"
      }
    }
  },
  "params": {
    "page_name": "Command and Control"
  },
  "propConfig": {
    "custom.PLCs": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC"
        },
        "type": "tag"
      },
      "persistent": true
    },
    "custom.activityLogger": {
      "persistent": true
    },
    "custom.activityLogger.pageid": {
      "binding": {
        "config": {
          "expression": "{page.props.path}"
        },
        "transforms": [
          {
            "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()",
            "type": "script"
          }
        ],
        "type": "expr"
      }
    },
    "custom.devices": {
      "binding": {
        "config": {
          "path": "view.custom.PLCs"
        },
        "transforms": [
          {
            "code": "\t# value is bound to the PLC config JSON string\n\tdecode \u003d system.util.jsonDecode(value) or {}\n\tPLCs \u003d {}\n\t\n\tfor mcm in sorted(decode.keys()):\n\t    area \u003d decode[mcm].get(\"Area\", \"\") if isinstance(decode[mcm], dict) else \"\"\n\t    area_label \u003d str(area)  # just the area name (no subareas)\n\t\n\t    PLCs[mcm] \u003d {\n\t        \"name\": mcm,\n\t        \"area\": area_label,\n\t        \"tagProps\": [\n\t            mcm,\n\t            \"value\",\n\t            \"value\",\n\t            \"value\",\n\t            \"value\",\n\t            \"value\",\n\t            \"value\",\n\t            \"value\",\n\t            \"value\",\n\t            \"value\"\n\t        ]\n\t    }\n\t\n\treturn PLCs",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "params.page_name": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 1080,
      "width": 1920
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Table"
        },
        "position": {
          "grow": 1
        },
        "propConfig": {
          "props.data": {
            "binding": {
              "config": {
                "path": "view.custom.devices"
              },
              "transforms": [
                {
                  "code": "\tresults \u003d []\n\tfor row, val in value.items():\n\t\tresults.append({\"plc\": val[\"name\"], \"area\": val[\"area\"],\"status\": {\"tagProps\":val[\"tagProps\"]},\"alarms\": {\"tagProps\":val[\"tagProps\"]},\"actions\": {\"tagProps\":val[\"tagProps\"]}})\n\t\n\tresults.sort(key\u003dlambda item: item[\u0027plc\u0027])\n\treturn results",
                  "type": "script"
                }
              ],
              "type": "property"
            }
          }
        },
        "props": {
          "cells": {
            "style": {
              "borderColor": "#4A4A4A",
              "borderStyle": "solid",
              "borderWidth": 1,
              "fontFamily": "Arial",
              "fontSize": 14,
              "fontWeight": "bold",
              "paddingLeft": 16,
              "paddingRight": 16
            }
          },
          "columns": [
            {
              "align": "center",
              "boolean": "checkbox",
              "dateFormat": "MM/DD/YYYY",
              "editable": false,
              "field": "plc",
              "footer": {
                "align": "center",
                "justify": "left",
                "style": {
                  "classes": ""
                },
                "title": ""
              },
              "header": {
                "align": "center",
                "justify": "left",
                "style": {
                  "borderColor": "#4A4A4A",
                  "borderStyle": "solid",
                  "borderWidth": 1,
                  "classes": "",
                  "color": "#4A4A4A",
                  "fontFamily": "Arial",
                  "fontSize": 14,
                  "fontWeight": "bold",
                  "paddingLeft": 11,
                  "paddingRight": 11
                },
                "title": "PLC"
              },
              "justify": "auto",
              "number": "value",
              "numberFormat": "0,0.##",
              "progressBar": {
                "bar": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "max": 100,
                "min": 0,
                "track": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "value": {
                  "enabled": true,
                  "format": "0,0.##",
                  "justify": "center",
                  "style": {
                    "classes": ""
                  }
                }
              },
              "render": "auto",
              "resizable": false,
              "sort": "none",
              "sortable": true,
              "strictWidth": false,
              "style": {
                "classes": ""
              },
              "toggleSwitch": {
                "color": {
                  "selected": "",
                  "unselected": ""
                }
              },
              "viewParams": {},
              "viewPath": "",
              "visible": true,
              "width": 50
            },
            {
              "align": "center",
              "boolean": "checkbox",
              "dateFormat": "MM/DD/YYYY",
              "editable": false,
              "field": "area",
              "footer": {
                "align": "center",
                "justify": "left",
                "style": {
                  "classes": ""
                },
                "title": ""
              },
              "header": {
                "align": "center",
                "justify": "left",
                "style": {
                  "borderColor": "#4A4A4A",
                  "borderStyle": "solid",
                  "borderWidth": 1,
                  "classes": "",
                  "color": "#4A4A4A",
                  "fontFamily": "Arial",
                  "fontSize": 14,
                  "fontWeight": "bold",
                  "paddingLeft": 11,
                  "paddingRight": 11
                },
                "title": "Area"
              },
              "justify": "auto",
              "number": "value",
              "numberFormat": "0,0.##",
              "progressBar": {
                "bar": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "max": 100,
                "min": 0,
                "track": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "value": {
                  "enabled": true,
                  "format": "0,0.##",
                  "justify": "center",
                  "style": {
                    "classes": ""
                  }
                }
              },
              "render": "auto",
              "resizable": false,
              "sort": "none",
              "sortable": true,
              "strictWidth": false,
              "style": {
                "classes": ""
              },
              "toggleSwitch": {
                "color": {
                  "selected": "",
                  "unselected": ""
                }
              },
              "viewParams": {},
              "viewPath": "",
              "visible": true,
              "width": 50
            },
            {
              "align": "center",
              "boolean": "checkbox",
              "dateFormat": "MM/DD/YYYY",
              "editable": false,
              "field": "status",
              "footer": {
                "align": "center",
                "justify": "left",
                "style": {
                  "classes": ""
                },
                "title": ""
              },
              "header": {
                "align": "center",
                "justify": "left",
                "style": {
                  "borderColor": "#4A4A4A",
                  "borderStyle": "solid",
                  "borderWidth": 1,
                  "classes": "",
                  "color": "#4A4A4A",
                  "fontFamily": "Arial",
                  "fontSize": 14,
                  "fontWeight": "bold",
                  "paddingLeft": 11,
                  "paddingRight": 11
                },
                "title": "Status"
              },
              "justify": "auto",
              "number": "value",
              "numberFormat": "0,0.##",
              "progressBar": {
                "bar": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "max": 100,
                "min": 0,
                "track": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "value": {
                  "enabled": true,
                  "format": "0,0.##",
                  "justify": "center",
                  "style": {
                    "classes": ""
                  }
                }
              },
              "render": "auto",
              "resizable": false,
              "sort": "none",
              "sortable": false,
              "strictWidth": false,
              "style": {
                "classes": ""
              },
              "toggleSwitch": {
                "color": {
                  "selected": "",
                  "unselected": ""
                }
              },
              "viewParams": {
                "tagProps": [
                  "MCM01",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value"
                ]
              },
              "viewPath": "Symbol-Views/Controller-Views/CommandControlStatus",
              "visible": true,
              "width": 75
            },
            {
              "align": "center",
              "boolean": "checkbox",
              "dateFormat": "MM/DD/YYYY",
              "editable": false,
              "field": "alarms",
              "footer": {
                "align": "center",
                "justify": "left",
                "style": {
                  "classes": ""
                },
                "title": ""
              },
              "header": {
                "align": "center",
                "justify": "left",
                "style": {
                  "borderColor": "#4A4A4A",
                  "borderStyle": "solid",
                  "borderWidth": 1,
                  "classes": "",
                  "color": "#4A4A4A",
                  "fontFamily": "Arial",
                  "fontSize": 14,
                  "fontWeight": "bold",
                  "paddingLeft": 11,
                  "paddingRight": 11
                },
                "title": "Active Alarms"
              },
              "justify": "auto",
              "number": "value",
              "numberFormat": "0,0.##",
              "progressBar": {
                "bar": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "max": 100,
                "min": 0,
                "track": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "value": {
                  "enabled": true,
                  "format": "0,0.##",
                  "justify": "center",
                  "style": {
                    "classes": ""
                  }
                }
              },
              "render": "auto",
              "resizable": false,
              "sort": "none",
              "sortable": false,
              "strictWidth": false,
              "style": {
                "classes": ""
              },
              "toggleSwitch": {
                "color": {
                  "selected": "",
                  "unselected": ""
                }
              },
              "viewParams": {},
              "viewPath": "Symbol-Views/Controller-Views/CommandControlAlarms",
              "visible": true,
              "width": "auto"
            },
            {
              "align": "center",
              "boolean": "checkbox",
              "dateFormat": "MM/DD/YYYY",
              "editable": false,
              "field": "actions",
              "footer": {
                "align": "center",
                "justify": "left",
                "style": {
                  "classes": ""
                },
                "title": ""
              },
              "header": {
                "align": "center",
                "justify": "left",
                "style": {
                  "borderColor": "#4A4A4A",
                  "borderStyle": "solid",
                  "borderWidth": 1,
                  "classes": "",
                  "color": "#4A4A4A",
                  "fontFamily": "Arial",
                  "fontSize": 14,
                  "fontWeight": "bold",
                  "paddingLeft": 11,
                  "paddingRight": 11
                },
                "title": "Controls"
              },
              "justify": "auto",
              "number": "value",
              "numberFormat": "0,0.##",
              "progressBar": {
                "bar": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "max": 100,
                "min": 0,
                "track": {
                  "color": "",
                  "style": {
                    "classes": ""
                  }
                },
                "value": {
                  "enabled": true,
                  "format": "0,0.##",
                  "justify": "center",
                  "style": {
                    "classes": ""
                  }
                }
              },
              "render": "view",
              "resizable": false,
              "sort": "none",
              "sortable": false,
              "strictWidth": false,
              "style": {
                "classes": "",
                "textAlign": "center"
              },
              "toggleSwitch": {
                "color": {
                  "selected": "",
                  "unselected": ""
                }
              },
              "viewParams": {
                "tagProps": [
                  "{value.tagProps}",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value",
                  "value"
                ]
              },
              "viewPath": "Symbol-Views/Controller-Views/CommandControlActions",
              "visible": true,
              "width": "auto"
            }
          ],
          "dragOrderable": false,
          "pager": {
            "activeOption": 50,
            "initialOption": 50
          },
          "rows": {
            "height": 44,
            "highlight": {
              "color": "#EEEEEE"
            },
            "striped": {
              "enabled": false
            },
            "style": {
              "backgroundColor": "#FFFFFF",
              "borderColor": "#4A4A4A",
              "borderStyle": "none",
              "borderWidth": 1,
              "classes": "Fonts/BodyText14",
              "color": "#4A4A4A"
            }
          },
          "selection": {
            "enableRowSelection": false
          },
          "style": {
            "borderStyle": "none",
            "margin": 5,
            "overflow": "hidden",
            "overflowX": "hidden",
            "overflowY": "hidden"
          },
          "virtualized": false
        },
        "type": "ia.display.table"
      }
    ],
    "custom": {
      "Devices": [],
      "count": "value",
      "delay": 4000
    },
    "events": {
      "system": {
        "onShutdown": [
          {
            "config": {
              "script": "\tself.session.custom.command_auth.enabled \u003d False"
            },
            "scope": "G",
            "type": "script"
          },
          {
            "config": {
              "script": "\twhid \u003d self.session.custom.fc\n\tsession_id \u003d self.session.props.id\n\tpage_id \u003d self.view.params.page_name\n\tCommands.analytics.send_page_details(whid, session_id, page_id)"
            },
            "scope": "G",
            "type": "script"
          }
        ]
      }
    },
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}