{
  "custom": {},
  "params": {
    "configuring": false,
    "equipmentPath": "",
    "timePeriod": "",
    "title": "OEE Performance"
  },
  "propConfig": {
    "params.configuring": {
      "onChange": {
        "enabled": null,
        "script": "\tviewParams\u003dself.params\n\tconfigParams\u003dself.getChild(\"root/configuration\").props.params\n\tif currentValue.value:\n\t\tconfigParams.equipmentPathIn \u003d viewParams.equipmentPath\n\t\tconfigParams.titleIn \u003d viewParams.title\n\t\tconfigParams.timePeriodIn \u003d viewParams.timePeriod\n\telif previousValue is not None and previousValue.value:\n\t\tviewParams.equipmentPath \u003d configParams.equipmentPathOut\n\t\tviewParams.title \u003d configParams.titleOut\n\t\tviewParams.timePeriod \u003d configParams.timePeriodOut"
      },
      "paramDirection": "input",
      "persistent": true
    },
    "params.equipmentPath": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.timePeriod": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.title": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 144,
      "width": 275
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "configuration"
        },
        "position": {
          "basis": "320px"
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.configuring"
              },
              "type": "property"
            }
          },
          "props.params.equipmentPathIn": {
            "binding": {
              "config": {
                "path": "view.params.equipmentPath"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "params": {
            "equipmentPathOut": "",
            "timePeriodIn": "Current Shift",
            "timePeriodOut": "Current Shift",
            "titleIn": "OEE Performance",
            "titleOut": "OEE Performance"
          },
          "path": "Page/Widgets/Configuration/Equipment Path, Time Period, Title"
        },
        "type": "ia.display.view"
      },
      {
        "children": [
          {
            "meta": {
              "name": "title"
            },
            "position": {
              "shrink": 0
            },
            "propConfig": {
              "position.display": {
                "binding": {
                  "config": {
                    "expression": "coalesce({view.params.title},\u0027\u0027)!\u003d\u0027\u0027"
                  },
                  "type": "expr"
                }
              },
              "props.params.text": {
                "binding": {
                  "config": {
                    "path": "view.params.title"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "path": "Page/Embedded/Widget Title"
            },
            "type": "ia.display.view"
          },
          {
            "meta": {
              "name": "body"
            },
            "position": {
              "basis": "32px",
              "grow": 1
            },
            "propConfig": {
              "props.style.fontSize": {
                "binding": {
                  "config": {
                    "path": "page.props.dimensions.viewport.width"
                  },
                  "transforms": [
                    {
                      "code": "\tif(value \u003e\u003d 1252):\n\t\treturn 50\n\telif(916 \u003c\u003d value and value \u003c\u003d1252):\n\t\treturn 35\n\telif(788\u003c\u003d value and value\u003c916):\n\t\treturn 30\n\telse:\n\t\treturn 25\n",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              },
              "props.text": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(\u0027[MES]\u0027,replace({view.params.equipmentPath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Live Analysis/\u0027,{view.params.timePeriod},\u0027/OEE Performance\u0027)"
                  },
                  "transforms": [
                    {
                      "code": "\tif value \u003d\u003d None:\n\t\timport time\n\t\t#impromptu analysis\n\t\tself.getSibling(\"mesAnalysisController\").props.refreshOnSettingsChange \u003d True\n\t\tself.getSibling(\"mesAnalysisController\").props.filterParams[0].value \u003d self.view.params.equipmentPath\n\t\ttime.sleep(0.5)\n\t\tif self.getSibling(\"mesAnalysisController\").props.data.getRowCount() \u003d\u003d 0 :\n\t\t\treturn \"0.0%\"\n\t\treturn str(round(self.getSibling(\"mesAnalysisController\").props.data.getValueAt(0,0) * 100, 1)) + \"%\"\n\n\telse:\n\t\t#live analysis\n\t\treturn str( round(value * 100,1) ) + \u0027%\u0027",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              }
            },
            "props": {
              "style": {
                "classes": "Label/labelBody"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "mesAnalysisController"
            },
            "position": {
              "basis": "64px",
              "display": false
            },
            "propConfig": {
              "custom.end": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "runScript(\u0027shared.mes.schedule.getTagPathForTimePeriodEnd\u0027, 0, {view.params.timePeriod}, {view.params.equipmentPath})"
                  },
                  "type": "tag"
                }
              },
              "custom.start": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "runScript(\u0027shared.mes.schedule.getTagPathForTimePeriodStart\u0027, 0, {view.params.timePeriod}, {view.params.equipmentPath})"
                  },
                  "type": "tag"
                }
              },
              "custom.update": {
                "binding": {
                  "config": {
                    "struct": {
                      "end": "{this.custom.end}",
                      "eqPath": "{view.params.equipmentPath}",
                      "period": "{view.params.timePeriod}",
                      "start": "{this.custom.start}"
                    },
                    "waitOnAll": true
                  },
                  "transforms": [
                    {
                      "code": "\tself.props.endDate  \u003d value[\"end\"]\n\tself.props.startDate \u003d value[\"start\"]\n\treturn value",
                      "type": "script"
                    }
                  ],
                  "type": "expr-struct"
                }
              },
              "props.filterParams[0].value": {
                "binding": {
                  "config": {
                    "path": "view.params.equipmentPath"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "data": {
                "$": [
                  "ds",
                  192,
                  1714084141102
                ],
                "$columns": []
              },
              "drillDownOptions": {
                "$": [
                  "ds",
                  192,
                  1714084095634
                ],
                "$columns": []
              },
              "executionTime": 1,
              "filterParams": [
                {
                  "param": "eqPath",
                  "type": "string"
                }
              ],
              "message": "Error executing analysis, check Gateway log for full stacktrace: The value for the (Equipment Path) filter item cannot be blank.",
              "selectedAnalysisName": "OEE Performance"
            },
            "type": "mes.production.mesAnalysisController"
          },
          {
            "meta": {
              "name": "timePeriodLabel"
            },
            "position": {
              "basis": "32px"
            },
            "propConfig": {
              "position.display": {
                "binding": {
                  "config": {
                    "struct": {
                      "eqPath": "{view.params.equipmentPath}",
                      "timePeriod": "{view.params.timePeriod}"
                    },
                    "waitOnAll": true
                  },
                  "transforms": [
                    {
                      "code": "\tif value[\"eqPath\"] \u003d\u003d None or value[\"eqPath\"] \u003d\u003d \"\" or value[\"timePeriod\"] \u003d\u003d \"\" or value[\"timePeriod\"] \u003d\u003d None:\n\t\treturn False \n\treturn True",
                      "type": "script"
                    }
                  ],
                  "type": "expr-struct"
                }
              },
              "props.text": {
                "binding": {
                  "config": {
                    "path": "view.params.timePeriod"
                  },
                  "transforms": [
                    {
                      "code": "\treturn \"(Based on \" +value + \")\"",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "style": {
                "color": "#808080",
                "fontFamily": "Roboto",
                "fontSize": 12,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          }
        ],
        "meta": {
          "name": "runtime"
        },
        "position": {
          "basis": "200px",
          "grow": 1
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "expression": "!{view.params.configuring}"
              },
              "type": "expr"
            }
          }
        },
        "props": {
          "direction": "column",
          "style": {
            "overflow": "hidden"
          }
        },
        "type": "ia.container.flex"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}