From c30b1b126dd0609a4cd61dba17e0763ca7e0c9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 25 Jan 2016 15:58:24 -0500 Subject: [PATCH] feat(panels): minor progress --- public/app/features/panel/metrics_panel_ctrl.ts | 6 ++++-- public/app/features/panel/panel_ctrl.ts | 4 +++- public/app/plugins/panel/test/module.ts | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/features/panel/metrics_panel_ctrl.ts index 2ce1dfa847f..35f4043595c 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/features/panel/metrics_panel_ctrl.ts @@ -7,9 +7,11 @@ class MetricsPanelCtrl extends PanelCtrl { error: boolean; loading: boolean; datasource: any; + $q: any; + datasourceSrv: any; - constructor($scope, private $q, private datasourceSrv) { - super($scope); + constructor($scope, $injector) { + super($scope, $injector); this.editorTabIndex = 1; if (!this.panel.targets) { diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 9bceaa482c5..f762a964103 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -15,12 +15,14 @@ export class PanelCtrl { icon: string; editorTabs: any; $scope: any; + $injector: any; fullscreen: boolean; inspector: any; - constructor($scope) { + constructor($scope, $injector) { var plugin = config.panels[this.panel.type]; + this.$injector = $injector; this.$scope = $scope; this.name = plugin.name; this.icon = plugin.info.icon; diff --git a/public/app/plugins/panel/test/module.ts b/public/app/plugins/panel/test/module.ts index 5e18510b3d8..6fe2a3325b0 100644 --- a/public/app/plugins/panel/test/module.ts +++ b/public/app/plugins/panel/test/module.ts @@ -9,8 +9,8 @@ function optionsTab() { export class TestPanelCtrl extends MetricsPanelCtrl { data: any; - constructor($scope, $q, datasourceSrv) { - super($scope, $q, datasourceSrv); + constructor($scope, $injector) { + super($scope, $injector); } initEditorTabs() {