Commit 600ffa72 by Torkel Ödegaard

feat(panels): fixes

parent 9bd3b417
...@@ -5,6 +5,12 @@ import config from 'app/core/config'; ...@@ -5,6 +5,12 @@ import config from 'app/core/config';
import {PanelCtrl} from './panel_ctrl'; import {PanelCtrl} from './panel_ctrl';
import {MetricsPanelCtrl} from './metrics_panel_ctrl'; import {MetricsPanelCtrl} from './metrics_panel_ctrl';
export class DefaultPanelCtrl extends PanelCtrl {
constructor($scope, $injector) {
super($scope, $injector);
}
}
class PanelDirective { class PanelDirective {
template: string; template: string;
templateUrl: string; templateUrl: string;
...@@ -15,7 +21,7 @@ class PanelDirective { ...@@ -15,7 +21,7 @@ class PanelDirective {
getDirective() { getDirective() {
if (!this.controller) { if (!this.controller) {
this.controller = PanelCtrl; this.controller = DefaultPanelCtrl;
} }
return { return {
......
<div class="text-center" style="padding-top: 2rem">
Unknown panel type: <strong>{{ctrl.panel.type}}</strong>
</div
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
import {PanelDirective} from '../../../features/panel/panel'; import {PanelDirective} from '../../../features/panel/panel';
class UnknownPanel extends PanelDirective { class UnknownPanel extends PanelDirective {
template = `<div class="text-center" style="padding-top: 2rem"> templateUrl = 'public/app/plugins/panel/unknown/module.html';
Unknown panel type: <strong>{{ctrl.panel.type}}</strong>
</div>`;
} }
......
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