From 53dc21c69b227f819b68b63f9eb421381b8f3b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 25 Jan 2016 17:58:41 -0500 Subject: [PATCH] feat(panels): minor fixes --- public/app/features/panel/panel_ctrl.ts | 4 ++++ public/app/plugins/panel/text/module.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index fb44a3d260d..311009d303a 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -35,6 +35,10 @@ export class PanelCtrl { this.publishAppEvent('panel-instantiated', {scope: this.$scope}); } + renderingCompleted() { + this.$scope.$root.performance.panelsRendered++; + } + refresh() { return; } diff --git a/public/app/plugins/panel/text/module.ts b/public/app/plugins/panel/text/module.ts index 837ccfe713f..cb63362ff37 100644 --- a/public/app/plugins/panel/text/module.ts +++ b/public/app/plugins/panel/text/module.ts @@ -14,8 +14,8 @@ export class TextPanelCtrl extends PanelCtrl { content: string; /** @ngInject */ - constructor($scope, private templateSrv, private $sce) { - super($scope); + constructor($scope, $injector, private templateSrv, private $sce) { + super($scope, $injector); _.defaults(this.panel, panelDefaults); this.render(); @@ -35,7 +35,7 @@ export class TextPanelCtrl extends PanelCtrl { } else if (this.panel.mode === 'text') { this.renderText(this.panel.content); } - // this.panelRenderingComplete(); + this.renderingCompleted(); } refresh() {