{
  "custom": {},
  "params": {
    "equipmentPath": "New Enterprise\\New Site\\New Area\\New Line",
    "menuGroup": "",
    "screenName": "Run Control"
  },
  "propConfig": {
    "params.equipmentPath": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.menuGroup": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.screenName": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 1080,
      "width": 1920
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Dashboard"
        },
        "position": {
          "basis": "973px",
          "grow": 1
        },
        "propConfig": {
          "props.grid": {
            "binding": {
              "config": {
                "path": "page.props.dimensions.viewport.width"
              },
              "transforms": [
                {
                  "code": "\tif value \u003e 600:\n\t\treturn \u0027stretch\u0027\n\treturn \u0027fixed\u0027",
                  "type": "script"
                }
              ],
              "type": "property"
            }
          },
          "props.widgets": {
            "binding": {
              "config": {
                "struct": {
                  "menuGroup": "{view.params.menuGroup}",
                  "screenName": "{view.params.screenName}"
                },
                "waitOnAll": true
              },
              "transforms": [
                {
                  "code": "\n\tdef maybeCreateLineScreen(menuGroup, screenName):\n\t\t\n\t\tif screenName not in (\"Run Control\",\"Line Summary\"):\n\t\t\treturn None\n\t\t#check if area/line\n\t\tmenu_parts\u003dmenuGroup.split(\u0027/\u0027)\n\t\t\n\t\tsearchFilter \u003d system.mes.object.filter.createFilter()\n\t\tsearchFilter.setMESObjectTypeName(\u0027Line\u0027)\n\t\tsearchFilter.setPrimaryMESObjectPath(\u0027*\\\\\u0027 + menuGroup.replace(\u0027/\u0027,\u0027\\\\\u0027))\n\t\tsearchFilter.setShowEquipmentPath(True)\n\t\tlinks \u003d system.mes.searchMESObjects(searchFilter)\n\t\t\n\t\tif len(links)\u003d\u003d0:\n\t\t\treturn None\n\t\t\t\n\t\tline_path\u003d str(links[0])\n\t\t\n\t\tif screenName \u003d\u003d \"Run Control\":\n\t\t\twidgetData \u003d shared.onboarding.ScreenWidgetSource.createRunControl(line_path)\n\t\telif screenName \u003d\u003d \"Line Summary\":\n\t\t\twidgetData \u003d shared.onboarding.ScreenWidgetSource.createLineSummary(line_path)\n\t\telse:\n\t\t\treturn None\n\t\tsystem.db.runNamedQuery(shared.mes.util.DB_TYPE + \"/screen/Add System Screen\",{\"name\":screenName, \"menu_group\":menuGroup, \"widgets\":widgetData})\n\t\tscreenResults \u003d system.db.runNamedQuery(shared.mes.util.DB_TYPE + \"/screen/Get Screen Widgets and Roles by name and menu group\", {\"name\": screenName,\"menu_group\": menuGroup})\n\t\treturn screenResults\n\t\t\n\tmenuGroup \u003d (value[\u0027menuGroup\u0027] or \u0027\u0027).replace(\u0027\u003e\u0027, \u0027/\u0027)\n\tif menuGroup.lower() \u003d\u003d \u0027system\u0027:\n\t\tmenuGroup \u003d \u0027\u0027\n\n\tscreenName \u003d value[\u0027screenName\u0027]\n\tif not screenName:\n\t\tscreenName \u003d \u0027Home\u0027\n\n\tscreenResults \u003d system.db.runNamedQuery(shared.mes.util.DB_TYPE + \"/screen/Get Screen Widgets and Roles by name and menu group\", {\"name\": screenName,\"menu_group\": menuGroup})\n\t\n\tif not screenResults.rowCount:\n\t\tscreenResults\u003dmaybeCreateLineScreen(menuGroup,screenName)\n\t\t\n\tif not screenResults or not screenResults.rowCount:\n\t\treturn [{\n\t\t\t\"name\": \"Screen Not Found\",\n\t\t\t\"viewPath\": \"Screen/Error/Screen Not Found\",\n\t\t\t\"viewParams\": {\n\t\t\t},\n\t\t\t\"isConfigurable\": True,\n\t\t\t\"header\": {\n\t\t\t\t\"enabled\": False,\n\t\t\t\t\"title\": \"\",\n\t\t\t\t\"style\": {\n\t\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"body\": {\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"minSize\": {\n\t\t\t\t\"columnSpan\": 1,\n\t\t\t\t\"rowSpan\": 1\n\t\t\t},\n\t\t\t\"position\": {\n\t\t\t\t\"rowStart\": 1,\n\t\t\t\t\"rowEnd\": 20,\n\t\t\t\t\"columnStart\": 1,\n\t\t\t\t\"columnEnd\": 20\n\t\t\t},\n\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t}\n\t\t}]\n\treturn system.util.jsonDecode(screenResults.getValueAt(0,\u0027widgets\u0027))",
                  "type": "script"
                }
              ],
              "type": "expr-struct"
            },
            "persistent": false
          }
        },
        "props": {
          "editingToggle": false,
          "fixed": {
            "cellSize": 50
          },
          "stretch": {
            "columnCount": 20,
            "columnGutterSize": 15,
            "rowCount": 20,
            "rowGutterSize": 15
          },
          "style": {
            "borderStyle": "none",
            "margin": 0
          }
        },
        "type": "ia.display.dashboard"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}