diff --git a/public/app/features/plugins/plugin_page_ctrl.ts b/public/app/features/plugins/plugin_page_ctrl.ts
index f9150702de6..c21cb4fdad7 100644
--- a/public/app/features/plugins/plugin_page_ctrl.ts
+++ b/public/app/features/plugins/plugin_page_ctrl.ts
@@ -3,18 +3,32 @@
import angular from 'angular';
import _ from 'lodash';
+var pluginInfoCache = {};
+
export class AppPageCtrl {
page: any;
pluginId: any;
appModel: any;
+ appLogoUrl: any;
/** @ngInject */
constructor(private backendSrv, private $routeParams: any, private $rootScope) {
this.pluginId = $routeParams.pluginId;
+ if (pluginInfoCache[this.pluginId]) {
+ this.appModel = pluginInfoCache[this.pluginId];
+ } else {
+ this.loadPluginInfo();
+ }
+ }
+
+ loadPluginInfo() {
this.backendSrv.get(`/api/plugins/${this.pluginId}/settings`).then(app => {
this.appModel = app;
this.page = _.findWhere(app.includes, {slug: this.$routeParams.slug});
+ this.appLogoUrl = app.info.logos.small;
+
+ pluginInfoCache[this.pluginId] = app;
if (!this.page) {
this.$rootScope.appEvent('alert-error', ['App Page Not Found', '']);
diff --git a/public/app/plugins/datasource/graphite/datasource.ts b/public/app/plugins/datasource/graphite/datasource.ts
index 615f0e9eee6..515cd490937 100644
--- a/public/app/plugins/datasource/graphite/datasource.ts
+++ b/public/app/plugins/datasource/graphite/datasource.ts
@@ -27,7 +27,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
var params = this.buildGraphiteParams(graphOptions, options.scopedVars);
if (params.length === 0) {
- return $q.when([]);
+ return $q.when({data: []});
}
if (options.format === 'png') {
diff --git a/public/app/plugins/datasource/graphite/partials/query.options.html b/public/app/plugins/datasource/graphite/partials/query.options.html
index b00028d0e05..05aecf4b44a 100644
--- a/public/app/plugins/datasource/graphite/partials/query.options.html
+++ b/public/app/plugins/datasource/graphite/partials/query.options.html
@@ -1,10 +1,9 @@