Peter Holmberg 7 anni fa
parent
commit
ff606891e2
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      public/app/plugins/panel/gauge/Thresholds.tsx

+ 2 - 2
public/app/plugins/panel/gauge/Thresholds.tsx

@@ -119,7 +119,7 @@ export default class Thresholds extends PureComponent<PanelOptionsProps<OptionsP
             onChange={event => this.onChangeThresholdValue(event, thresholds[1])}
             onChange={event => this.onChangeThresholdValue(event, thresholds[1])}
             value={thresholds[1].value}
             value={thresholds[1].value}
           />
           />
-          <div className="threshold-row-label">{thresholds[0].label}</div>
+          <div className="threshold-row-label">{thresholds[1].label}</div>
         </div>
         </div>
       </div>,
       </div>,
     ];
     ];
@@ -162,7 +162,7 @@ export default class Thresholds extends PureComponent<PanelOptionsProps<OptionsP
   insertAtIndex(index) {
   insertAtIndex(index) {
     const { userAddedThresholds } = this.state;
     const { userAddedThresholds } = this.state;
 
 
-    if (userAddedThresholds === 0) {
+    if (userAddedThresholds === 0 || index < 0) {
       return 1;
       return 1;
     }
     }