Bladeren bron

fix label and default threshold

Peter Holmberg 7 jaren geleden
bovenliggende
commit
ac94fc9341
2 gewijzigde bestanden met toevoegingen van 2 en 5 verwijderingen
  1. 1 1
      public/app/plugins/panel/gauge/GaugeOptions.tsx
  2. 1 4
      public/app/viz/Gauge.tsx

+ 1 - 1
public/app/plugins/panel/gauge/GaugeOptions.tsx

@@ -30,7 +30,7 @@ export default class GaugeOptions extends PureComponent<Props> {
         </div>
         <div className="gf-form-inline">
           <Switch
-            label="Threshold labels"
+            label="Threshold markers"
             labelClass="width-10"
             checked={showThresholdMarkers}
             onChange={this.toggleThresholdMarkers}

+ 1 - 4
public/app/viz/Gauge.tsx

@@ -40,6 +40,7 @@ export class Gauge extends PureComponent<Props> {
   }
 
   componentDidUpdate(prevProps: Props) {
+    console.log('did update');
     this.draw();
   }
 
@@ -63,10 +64,6 @@ export class Gauge extends PureComponent<Props> {
       stat,
     } = this.props;
 
-    console.log('-------------------');
-    console.log('showThresholdMarkers', showThresholdMarkers);
-    console.log('showThresholdLabels', showThresholdLabels);
-
     const dimension = Math.min(width, height * 1.3);
     const backgroundColor = config.bootData.user.lightTheme ? 'rgb(230,230,230)' : 'rgb(38,38,38)';
     const fontColor = config.bootData.user.lightTheme ? 'rgb(38,38,38)' : 'rgb(230,230,230)';