Skip to content

Commit

Permalink
change(text panel): removed rarely used (and not properly working), t…
Browse files Browse the repository at this point in the history
…ext mode option, closes grafana#6389, closes grafana#7214
  • Loading branch information
torkelo committed Jan 11, 2017
1 parent cdc7da3 commit 64f5146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 0 additions & 7 deletions public/app/plugins/panel/text/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
<select class="gf-form-input" ng-model="ctrl.panel.mode" ng-options="f for f in ['html','markdown','text']"></select>
</span>
</div>

<div class="gf-form" ng-show="ctrl.panel.mode == 'text'">
<span class="gf-form-label">Font Size</span>
<span class="gf-form-select-wrapper">
<select class="gf-form-input" ng-model="ctrl.panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select>
</span>
</div>
</div>
</div>

Expand Down
6 changes: 4 additions & 2 deletions public/app/plugins/panel/text/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export class TextPanelCtrl extends PanelCtrl {
onInitEditMode() {
this.addEditorTab('Options', 'public/app/plugins/panel/text/editor.html');
this.editorTabIndex = 1;

if (this.panel.mode === 'text') {
this.panel.mode = 'markdown';
}
}

onRefresh() {
Expand All @@ -39,8 +43,6 @@ export class TextPanelCtrl extends PanelCtrl {
this.renderMarkdown(this.panel.content);
} else if (this.panel.mode === 'html') {
this.updateContent(this.panel.content);
} else if (this.panel.mode === 'text') {
this.renderText(this.panel.content);
}
this.renderingCompleted();
}
Expand Down

0 comments on commit 64f5146

Please sign in to comment.