/*! grafana - v3.1.0 - 2016-07-18
 * Copyright (c) 2016 Torkel Ödegaard; Licensed Apache-2.0 */

System.register(["angular","lodash"],function(a){var b,c,d,e;return{setters:[function(a){b=a},function(a){c=a}],execute:function(){d={},e=function(){function a(a,b,c){this.backendSrv=a,this.$routeParams=b,this.$rootScope=c,this.pluginId=b.pluginId,d[this.pluginId]?this.initPage(d[this.pluginId]):this.loadPluginInfo()}return a.$inject=["backendSrv","$routeParams","$rootScope"],a.prototype.initPage=function(a){this.appModel=a,this.page=c["default"].findWhere(a.includes,{slug:this.$routeParams.slug}),this.appLogoUrl=a.info.logos.small,d[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",e),b["default"].module("grafana.controllers").controller("AppPageCtrl",e)}}});