Просмотр исходного кода

SinglestatPanel: added more fontsize options, Closes #1187

Torkel Ödegaard 11 лет назад
Родитель
Сommit
656ec9c48f
2 измененных файлов с 5 добавлено и 3 удалено
  1. 3 3
      src/app/panels/singlestat/editor.html
  2. 2 0
      src/app/panels/singlestat/module.js

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

@@ -23,15 +23,15 @@
     <h5>Big value font size</h5>
 		<div class="editor-option">
 			<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 class="editor-option">
 			<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 class="editor-option">
 			<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>
 

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

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