/*! grafana - v4.2.0 - 2017-03-24
 * Copyright (c) 2017 Torkel Ödegaard; Licensed Apache-2.0 */

System.register(["angular","lodash"],function(a,b){"use strict";var c,d,e,f;b&&b.id;return{setters:[function(a){c=a},function(a){d=a}],execute:function(){e={},f=function(){function a(a,b,c){this.backendSrv=a,this.$routeParams=b,this.$rootScope=c,this.pluginId=b.pluginId,e[this.pluginId]?this.initPage(e[this.pluginId]):this.loadPluginInfo()}return a.$inject=["backendSrv","$routeParams","$rootScope"],a.prototype.initPage=function(a){this.appModel=a,this.page=d.default.find(a.includes,{slug:this.$routeParams.slug}),this.appLogoUrl=a.info.logos.small,e[this.pluginId]=a,this.page||this.$rootScope.appEvent("alert-error",["App Page Not Found",""])},a.prototype.loadPluginInfo=function(){var a=this;this.backendSrv.get("/api/plugins/"+this.pluginId+"/settings").then(function(b){a.initPage(b)})},a}(),a("AppPageCtrl",f),c.default.module("grafana.controllers").controller("AppPageCtrl",f)}}});