Explorar o código

SinglestatPanel: added more fontsize options, Closes #1187

Torkel Ödegaard %!s(int64=11) %!d(string=hai) anos
pai
achega
656ec9c48f

+ 3 - 3
src/app/panels/singlestat/editor.html

@@ -23,15 +23,15 @@
     <h5>Big value font size</h5>
     <h5>Big value font size</h5>
 		<div class="editor-option">
 		<div class="editor-option">
 			<label class="small">Prefix</label>
 			<label class="small">Prefix</label>
-			<select class="input-mini" style="width: 75px;" ng-model="panel.prefixFontSize" ng-options="f for f in ['30%','50%','70%','80%','100%']" ng-change="render()"></select>
+			<select class="input-mini" style="width: 75px;" ng-model="panel.prefixFontSize" ng-options="f for f in fontSizes" ng-change="render()"></select>
 		</div>
 		</div>
 		<div class="editor-option">
 		<div class="editor-option">
 			<label class="small">Value</label>
 			<label class="small">Value</label>
-			<select class="input-mini" style="width: 75px;" ng-model="panel.valueFontSize" ng-options="f for f in ['30%','50%','70%','80%','100%', '110%', '120%']" ng-change="render()"></select>
+			<select class="input-mini" style="width: 75px;" ng-model="panel.valueFontSize" ng-options="f for f in fontSizes" ng-change="render()"></select>
 		</div>
 		</div>
 		<div class="editor-option">
 		<div class="editor-option">
 			<label class="small">Postfix</label>
 			<label class="small">Postfix</label>
-			<select class="input-mini" style="width: 75px;" ng-model="panel.postfixFontSize" ng-options="f for f in ['30%','50%','70%','80%','100%']" ng-change="render()"></select>
+			<select class="input-mini" style="width: 75px;" ng-model="panel.postfixFontSize" ng-options="f for f in fontSizes" ng-change="render()"></select>
 		</div>
 		</div>
 	</div>
 	</div>
 
 

+ 2 - 0
src/app/panels/singlestat/module.js

@@ -22,6 +22,8 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
       metricsEditor: true
       metricsEditor: true
     });
     });
 
 
+    $scope.fontSizes = ['20%', '30%','50%','70%','80%','100%', '110%', '120%', '150%', '170%', '200%'];
+
     $scope.panelMeta.addEditorTab('Options', 'app/panels/singlestat/editor.html');
     $scope.panelMeta.addEditorTab('Options', 'app/panels/singlestat/editor.html');
 
 
     // Set and populate defaults
     // Set and populate defaults