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

Set default threshold axis to 'left' for panels created before this feature.

ilgizar 7 лет назад
Родитель
Сommit
425586f67d
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      public/app/plugins/panel/graph/thresholds_form.ts

+ 1 - 0
public/app/plugins/panel/graph/thresholds_form.ts

@@ -114,6 +114,7 @@ var template = `
         <label class="gf-form-label">Y-Axis</label>
         <div class="gf-form-select-wrapper">
           <select class="gf-form-input" ng-model="threshold.yaxis"
+                  ng-init="threshold.yaxis = threshold.yaxis === 'left' || threshold.yaxis === 'right' ? threshold.yaxis : 'left'"
                   ng-options="f for f in ['left', 'right']" ng-change="ctrl.render()" ng-disabled="ctrl.disabled">
           </select>
         </div>