Commit 050d902e by Dominik Prokop Committed by GitHub

AppPageCtrl: Fix digest issue with app page initialisation (#21847)

parent c425a837
......@@ -6,6 +6,7 @@ import { PluginMeta } from '@grafana/data';
import { NavModelSrv } from 'app/core/core';
import { GrafanaRootScope } from 'app/routes/GrafanaCtrl';
import { AppEvents } from '@grafana/data';
import { promiseToDigest } from '../../core/utils/promiseToDigest';
export class AppPageCtrl {
page: any;
......@@ -17,6 +18,7 @@ export class AppPageCtrl {
constructor(private $routeParams: any, private $rootScope: GrafanaRootScope, private navModelSrv: NavModelSrv) {
this.pluginId = $routeParams.pluginId;
promiseToDigest($rootScope)(
Promise.resolve(getPluginSettings(this.pluginId))
.then(settings => {
this.initPage(settings);
......@@ -24,7 +26,8 @@ export class AppPageCtrl {
.catch(err => {
this.$rootScope.appEvent(AppEvents.alertError, ['Unknown Plugin']);
this.navModel = this.navModelSrv.getNotFoundNav();
});
})
);
}
initPage(app: PluginMeta) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment