Преглед изворни кода

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

ilgizar пре 7 година
родитељ
комит
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>