mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix to text panel and transparent mode
This commit is contained in:
parent
150d21800c
commit
3d593492c9
@ -13,14 +13,15 @@ export class TextPanelCtrl extends PanelCtrl {
|
||||
mode : "markdown", // 'html', 'markdown', 'text'
|
||||
content : "# title",
|
||||
};
|
||||
/** @ngInject */
|
||||
|
||||
/** @ngInject **/
|
||||
constructor($scope, $injector, private templateSrv, private $sce) {
|
||||
super($scope, $injector);
|
||||
|
||||
_.defaults(this.panel, this.panelDefaults);
|
||||
|
||||
this.events.on('init-edit-mode', this.onInitEditMode.bind(this));
|
||||
this.events.on('refresh', this.onRender.bind(this));
|
||||
this.events.on('refresh', this.onRefresh.bind(this));
|
||||
this.events.on('render', this.onRender.bind(this));
|
||||
}
|
||||
|
||||
@ -29,6 +30,10 @@ export class TextPanelCtrl extends PanelCtrl {
|
||||
this.editorTabIndex = 1;
|
||||
}
|
||||
|
||||
onRefresh() {
|
||||
this.render();
|
||||
}
|
||||
|
||||
onRender() {
|
||||
if (this.panel.mode === 'markdown') {
|
||||
this.renderMarkdown(this.panel.content);
|
||||
|
Loading…
Reference in New Issue
Block a user