mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(panels): fixes
This commit is contained in:
parent
9bd3b417c4
commit
600ffa727e
@ -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 {
|
||||
|
5
public/app/plugins/panel/unknown/module.html
Normal file
5
public/app/plugins/panel/unknown/module.html
Normal file
@ -0,0 +1,5 @@
|
||||
<div class="text-center" style="padding-top: 2rem">
|
||||
Unknown panel type: <strong>{{ctrl.panel.type}}</strong>
|
||||
</div
|
||||
|
||||
|
@ -3,9 +3,7 @@
|
||||
import {PanelDirective} from '../../../features/panel/panel';
|
||||
|
||||
class UnknownPanel extends PanelDirective {
|
||||
template = `<div class="text-center" style="padding-top: 2rem">
|
||||
Unknown panel type: <strong>{{ctrl.panel.type}}</strong>
|
||||
</div>`;
|
||||
templateUrl = 'public/app/plugins/panel/unknown/module.html';
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user