{
  "custom": {},
  "params": {
    "linePath": "New Enterprise\\Site 1\\Simulation Area\\Simulation Line"
  },
  "propConfig": {
    "params.linePath": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 512,
      "width": 290
    }
  },
  "root": {
    "children": [
      {
        "children": [
          {
            "meta": {
              "name": "Line Title"
            },
            "position": {
              "height": 1,
              "width": 1.0035,
              "x": -0.0035
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "path": "view.params.linePath"
                  },
                  "transforms": [
                    {
                      "code": "\tif len(value.split(\u0027\\\\\u0027)) \u003d\u003d 4:\n\t\treturn value.split(\u0027\\\\\u0027)[3:4][0]\n\treturn \u0027[Select Line]\u0027",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid"
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 25,
                "fontWeight": "bold",
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "StateIcon",
              "tooltip": {
                "enabled": true
              }
            },
            "position": {
              "height": 0.4098,
              "rotate": {
                "anchor": "50% 25%"
              },
              "width": 0.1042,
              "x": -0.0344,
              "y": 0.4517
            },
            "propConfig": {
              "meta.tooltip.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/Line State Type\u0027)"
                  },
                  "overlayOptOut": true,
                  "type": "tag"
                }
              },
              "props.path": {
                "binding": {
                  "config": {
                    "expression": "tag(concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/Line State Type\u0027))"
                  },
                  "overlayOptOut": true,
                  "transforms": [
                    {
                      "code": "\tdef createIcon(state):\n\t\t\ticons \u003d{\n\t\t\t\"Idle\":\"EquipmentStateTypes/Idle\",\n\t\t\t\"Starved\":\"EquipmentStateTypes/Blocked\",\n\t\t\t\"Running\":\"EquipmentStateTypes/Running\",\n\t\t\t\"Disabled\":\"EquipmentStateTypes/Blocked\",\n\t\t\t\"Planned Downtime\":\"EquipmentStateTypes/PlannedDowntime\",\n\t\t\t\"Unplanned Downtime\":\"EquipmentStateTypes/UnplannedDowntime\"\n\t\t\t}\n\t\t\tif icons.has_key(state):\n\t\t\t\treturn icons[state]\n\t\t\treturn \u0027\u0027\n\n\treturn createIcon(value)",
                      "type": "script"
                    }
                  ],
                  "type": "expr"
                }
              }
            },
            "props": {
              "style": {
                "marginLeft": "5%"
              }
            },
            "type": "ia.display.icon"
          }
        ],
        "meta": {
          "name": "Top"
        },
        "position": {
          "height": 0.12,
          "width": 1
        },
        "props": {
          "mode": "percent",
          "style": {
            "cursor": "pointer"
          }
        },
        "type": "ia.container.coord"
      },
      {
        "children": [
          {
            "meta": {
              "name": "lbl_lineStateValue"
            },
            "position": {
              "height": 0.1064,
              "width": 1,
              "y": -0.0027
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/Line State Name\u0027)"
                  },
                  "overlayOptOut": true,
                  "type": "tag"
                }
              }
            },
            "props": {
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 25,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_MaterialValue"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.4815,
              "y": 0.2907
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/Product Code\u0027)"
                  },
                  "overlayOptOut": true,
                  "type": "tag"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_Material"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.0185,
              "y": 0.2907
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5,
                "fontWeight": "500"
              },
              "text": "Material",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_OEE"
            },
            "position": {
              "height": 0.05,
              "width": 0.5,
              "x": 0.25,
              "y": 0.2238
            },
            "props": {
              "alignVertical": "bottom",
              "text": "OEE",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 15,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "custom": {
              "colors": {
                "bad": {
                  "arc": "#DE272D",
                  "arcBackground": "#FBCFD1"
                },
                "good": {
                  "arc": "#004A98",
                  "arcBackground": "#C9D9E9"
                },
                "warn": {
                  "arc": "#E8BD93",
                  "arcBackground": "#F6E5D4"
                }
              }
            },
            "meta": {
              "name": "SimpleGauge"
            },
            "position": {
              "height": 0.1907,
              "width": 0.9896,
              "y": 0.063
            },
            "propConfig": {
              "props.arc.color": {
                "binding": {
                  "config": {
                    "path": "this.props.value"
                  },
                  "transforms": [
                    {
                      "code": "\tif value \u003e 50:\n\t\treturn self.custom.colors.good.arc\n\tif value \u003e 40:\n\t\treturn self.custom.colors.warn.arc\n\telse:\n\t\treturn self.custom.colors.bad.arc",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              },
              "props.arcBackground.color": {
                "binding": {
                  "config": {
                    "path": "this.props.value"
                  },
                  "transforms": [
                    {
                      "code": "\tif value \u003e 50:\n\t\treturn self.custom.colors.good.arcBackground\n\tif value \u003e 40:\n\t\treturn self.custom.colors.warn.arcBackground\n\telse:\n\t\treturn self.custom.colors.bad.arcBackground",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              },
              "props.value": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/OEE\u0027)"
                  },
                  "overlayOptOut": true,
                  "transforms": [
                    {
                      "code": "\tif value:\n\t\treturn int(round(value,2)*100)\n\telse:\n\t\treturn 0",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              }
            },
            "props": {
              "arc": {
                "width": 10
              },
              "arcBackground": {},
              "label": {
                "size": 15,
                "units": "%"
              }
            },
            "type": "ia.chart.simple-gauge"
          },
          {
            "meta": {
              "name": "lbl_rejects"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.0185,
              "y": 0.4635
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5,
                "fontWeight": "500"
              },
              "text": "Rejects",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_rejectsValue"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.4815,
              "y": 0.4635
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/OEE Reject Count\u0027)"
                  },
                  "overlayOptOut": true,
                  "type": "tag"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_uptime"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.0185,
              "y": 0.5501
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5,
                "fontWeight": "500"
              },
              "text": "Uptime",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_uptimeValue"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.4815,
              "y": 0.5501
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/Elapsed Time\u0027)"
                  },
                  "overlayOptOut": true,
                  "transforms": [
                    {
                      "code": "\tif value and value \u003e 0:\n\t\truntime \u003d system.tag.readBlocking([\u0027[MES]\u0027 + self.view.params.linePath.replace(\u0027\\\\\u0027,\u0027/\u0027) + \u0027/Live Analysis/Current Shift/Runtime\u0027])[0].value\n\t\treturn str(int(round(runtime/value,2)*100))+\u0027%\u0027\n\treturn \u00270%\u0027",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_output"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.0185,
              "y": 0.3771
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5,
                "fontWeight": "500"
              },
              "text": "Output",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_outputValue"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.4815,
              "y": 0.3771
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/OEE Outfeed Count\u0027)"
                  },
                  "overlayOptOut": true,
                  "transforms": [
                    {
                      "code": "\tif value:\n\t\ttargetCount \u003d system.tag.readBlocking([\u0027[MES]\u0027+self.view.params.linePath.replace(\u0027\\\\\u0027,\u0027/\u0027) + \u0027/Live Analysis/Current Shift/Outfeed Standard Count\u0027])[0].value\n\t\ttargetPercent \u003d value / targetCount\n\t\treturn str(value) + \u0027 / \u0027 + str(int(round(targetPercent,2)*100))+\u0027%\u0027\n\n\treturn \u00270 / 0%\u0027",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_shiftStart"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.0185,
              "y": 0.6367
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5,
                "fontWeight": "500"
              },
              "text": "Shift Start",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_shiftStartValue"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.4815,
              "y": 0.6367
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/From Time Stamp\u0027)"
                  },
                  "overlayOptOut": true,
                  "transforms": [
                    {
                      "code": "\treturn system.date.format(system.date.parse(value),\u0027HH:mm:ss\u0027)",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_workOrder"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "y": 0.7131
            },
            "propConfig": {
              "meta.visible": {
                "binding": {
                  "config": {
                    "path": "../lbl_workOrderValue.props.text"
                  },
                  "transforms": [
                    {
                      "code": "\tif value:\n\t\treturn True\n\treturn False",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5,
                "fontWeight": "500"
              },
              "text": "Work Order",
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "lbl_workOrderValue"
            },
            "position": {
              "height": 0.075,
              "width": 0.5,
              "x": 0.5,
              "y": 0.7131
            },
            "propConfig": {
              "meta.visible": {
                "binding": {
                  "config": {
                    "path": "this.props.text"
                  },
                  "transforms": [
                    {
                      "code": "\tif value:\n\t\treturn True\n\treturn False",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              },
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.linePath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/Current Shift/Work Order\u0027)"
                  },
                  "overlayOptOut": true,
                  "transforms": [
                    {
                      "code": "\tif value:\n\t\treturn value\n\treturn \u0027\u0027",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              }
            },
            "props": {
              "alignVertical": "bottom",
              "style": {
                "borderBottomColor": "#79A0C9",
                "borderBottomStyle": "solid",
                "borderBottomWidth": 1.5
              },
              "textStyle": {
                "fontFamily": "Roboto",
                "fontSize": 20,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          }
        ],
        "meta": {
          "name": "Bottom"
        },
        "position": {
          "height": 0.88,
          "rotate": {
            "anchor": "50% 0%"
          },
          "width": 1,
          "y": 0.12
        },
        "props": {
          "mode": "percent",
          "style": {
            "cursor": "pointer"
          }
        },
        "type": "ia.container.coord"
      }
    ],
    "events": {
      "dom": {
        "onClick": {
          "config": {
            "script": "\tlinePath \u003d self.view.params.linePath\n\tif len(linePath.split(\u0027\\\\\u0027))\u003e3:\n\t\turl \u003d \u0027/screen/\u0027 + \u0027\u003e\u0027.join(linePath.split(\u0027\\\\\u0027)[1:]) + \u0027/Line Summary\u0027\n\t\tsystem.perspective.navigate(url)\n"
          },
          "scope": "G",
          "type": "script"
        },
        "onMouseEnter": {
          "config": {
            "script": "\tself.props.style \u003d {\n\t  \"classes\": \"\",\n\t  \"backgroundColor\": \"#0000001A\",\n\t  \"overflow\": \"visible\"\n\t}\n\t"
          },
          "scope": "G",
          "type": "script"
        },
        "onMouseLeave": {
          "config": {
            "script": "\tself.props.style \u003d {\n\t\t  \"classes\": \"\",\n\t\t  \"overflow\": \"visible\"\n\t\t}\n\t\t"
          },
          "scope": "G",
          "type": "script"
        },
        "onPointerDown": {
          "config": {
            "script": "\tlinePath \u003d self.view.params.linePath\n\tif len(linePath.split(\u0027\\\\\u0027))\u003e3:\n\t\turl \u003d \u0027/screen/\u0027 + \u0027\u003e\u0027.join(linePath.split(\u0027\\\\\u0027)[1:]) + \u0027/Line Summary\u0027\n\t\tsystem.perspective.navigate(url)"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "meta": {
      "name": "root"
    },
    "props": {
      "aspectRatio": "9:16",
      "mode": "percent",
      "style": {
        "cursor": "pointer",
        "marginLeft": 10,
        "marginRight": 10,
        "overflow": "visible"
      }
    },
    "type": "ia.container.coord"
  }
}