From 600ffa727ed13276b411a42b5041d1a86f917446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 28 Jan 2016 14:19:24 -0500 Subject: [PATCH] feat(panels): fixes --- public/app/features/panel/panel.ts | 8 +++++++- public/app/plugins/panel/unknown/module.html | 5 +++++ public/app/plugins/panel/unknown/module.ts | 4 +--- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 public/app/plugins/panel/unknown/module.html diff --git a/public/app/features/panel/panel.ts b/public/app/features/panel/panel.ts index 39d3a76005a..7312e18ccc7 100644 --- a/public/app/features/panel/panel.ts +++ b/public/app/features/panel/panel.ts @@ -5,6 +5,12 @@ import config from 'app/core/config'; import {PanelCtrl} from './panel_ctrl'; import {MetricsPanelCtrl} from './metrics_panel_ctrl'; +export class DefaultPanelCtrl extends PanelCtrl { + constructor($scope, $injector) { + super($scope, $injector); + } +} + class PanelDirective { template: string; templateUrl: string; @@ -15,7 +21,7 @@ class PanelDirective { getDirective() { if (!this.controller) { - this.controller = PanelCtrl; + this.controller = DefaultPanelCtrl; } return { diff --git a/public/app/plugins/panel/unknown/module.html b/public/app/plugins/panel/unknown/module.html new file mode 100644 index 00000000000..1e2e475428e --- /dev/null +++ b/public/app/plugins/panel/unknown/module.html @@ -0,0 +1,5 @@ +
+ Unknown panel type: {{ctrl.panel.type}} +
- Unknown panel type: {{ctrl.panel.type}} - `; + templateUrl = 'public/app/plugins/panel/unknown/module.html'; }