Commit 579d2b63 by Jonathan McCall Committed by Torkel Ödegaard

Disable prefix and postfix font size when gauge mode is enabled (#10573)

* Disable prefix and postfix font size when gauge mode is enabled

* Use function to hide prefix/postfix size when using gauge

* Rename disableFontSizes to canChangeFontSizes
parent 31a5134a
......@@ -29,7 +29,7 @@
<input type="text" class="gf-form-input width-12" ng-model="ctrl.panel.prefix" ng-change="ctrl.render()" ng-model-onblur>
<label class="gf-form-label width-6">Font size</label>
<div class="gf-form-select-wrapper">
<select class="gf-form-input" ng-model="ctrl.panel.prefixFontSize" ng-options="f for f in ctrl.fontSizes" ng-change="ctrl.render()"></select>
<select class="gf-form-input" ng-model="ctrl.panel.prefixFontSize" ng-options="f for f in ctrl.fontSizes" ng-change="ctrl.render()" ng-disabled="ctrl.canChangeFontSize()"></select>
</div>
</div>
</div>
......@@ -39,7 +39,7 @@
<input type="text" class="gf-form-input width-12" ng-model="ctrl.panel.postfix" ng-change="ctrl.render()" ng-model-onblur>
<label class="gf-form-label width-6">Font size</label>
<div class="gf-form-select-wrapper">
<select class="input-small gf-form-input" ng-model="ctrl.panel.postfixFontSize" ng-options="f for f in ctrl.fontSizes" ng-change="ctrl.render()"></select>
<select class="input-small gf-form-input" ng-model="ctrl.panel.postfixFontSize" ng-options="f for f in ctrl.fontSizes" ng-change="ctrl.render()" ng-disabled="ctrl.canChangeFontSize()"></select>
</div>
</div>
<div class="gf-form">
......
......@@ -198,6 +198,10 @@ class SingleStatCtrl extends MetricsPanelCtrl {
this.setValueMapping(data);
}
canChangeFontSize() {
return this.panel.gauge.show;
}
setColoring(options) {
if (options.background) {
this.panel.colorValue = false;
......
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