Commit c30b1b12 by Torkel Ödegaard

feat(panels): minor progress

parent 9c6698e8
...@@ -7,9 +7,11 @@ class MetricsPanelCtrl extends PanelCtrl { ...@@ -7,9 +7,11 @@ class MetricsPanelCtrl extends PanelCtrl {
error: boolean; error: boolean;
loading: boolean; loading: boolean;
datasource: any; datasource: any;
$q: any;
datasourceSrv: any;
constructor($scope, private $q, private datasourceSrv) { constructor($scope, $injector) {
super($scope); super($scope, $injector);
this.editorTabIndex = 1; this.editorTabIndex = 1;
if (!this.panel.targets) { if (!this.panel.targets) {
......
...@@ -15,12 +15,14 @@ export class PanelCtrl { ...@@ -15,12 +15,14 @@ export class PanelCtrl {
icon: string; icon: string;
editorTabs: any; editorTabs: any;
$scope: any; $scope: any;
$injector: any;
fullscreen: boolean; fullscreen: boolean;
inspector: any; inspector: any;
constructor($scope) { constructor($scope, $injector) {
var plugin = config.panels[this.panel.type]; var plugin = config.panels[this.panel.type];
this.$injector = $injector;
this.$scope = $scope; this.$scope = $scope;
this.name = plugin.name; this.name = plugin.name;
this.icon = plugin.info.icon; this.icon = plugin.info.icon;
......
...@@ -9,8 +9,8 @@ function optionsTab() { ...@@ -9,8 +9,8 @@ function optionsTab() {
export class TestPanelCtrl extends MetricsPanelCtrl { export class TestPanelCtrl extends MetricsPanelCtrl {
data: any; data: any;
constructor($scope, $q, datasourceSrv) { constructor($scope, $injector) {
super($scope, $q, datasourceSrv); super($scope, $injector);
} }
initEditorTabs() { initEditorTabs() {
......
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