Commit ac94fc93 by Peter Holmberg

fix label and default threshold

parent 4e1f49f8
...@@ -30,7 +30,7 @@ export default class GaugeOptions extends PureComponent<Props> { ...@@ -30,7 +30,7 @@ export default class GaugeOptions extends PureComponent<Props> {
</div> </div>
<div className="gf-form-inline"> <div className="gf-form-inline">
<Switch <Switch
label="Threshold labels" label="Threshold markers"
labelClass="width-10" labelClass="width-10"
checked={showThresholdMarkers} checked={showThresholdMarkers}
onChange={this.toggleThresholdMarkers} onChange={this.toggleThresholdMarkers}
......
...@@ -40,6 +40,7 @@ export class Gauge extends PureComponent<Props> { ...@@ -40,6 +40,7 @@ export class Gauge extends PureComponent<Props> {
} }
componentDidUpdate(prevProps: Props) { componentDidUpdate(prevProps: Props) {
console.log('did update');
this.draw(); this.draw();
} }
...@@ -63,10 +64,6 @@ export class Gauge extends PureComponent<Props> { ...@@ -63,10 +64,6 @@ export class Gauge extends PureComponent<Props> {
stat, stat,
} = this.props; } = this.props;
console.log('-------------------');
console.log('showThresholdMarkers', showThresholdMarkers);
console.log('showThresholdLabels', showThresholdLabels);
const dimension = Math.min(width, height * 1.3); const dimension = Math.min(width, height * 1.3);
const backgroundColor = config.bootData.user.lightTheme ? 'rgb(230,230,230)' : 'rgb(38,38,38)'; 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)'; const fontColor = config.bootData.user.lightTheme ? 'rgb(38,38,38)' : 'rgb(230,230,230)';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment