Commit e0064ed3 by Peter Holmberg

Revert "typo fix"

This reverts commit 9ded648b.
parent 9ded648b
...@@ -10,7 +10,7 @@ export interface Options { ...@@ -10,7 +10,7 @@ export interface Options {
decimals: number; decimals: number;
prefix: string; prefix: string;
stat: string; stat: string;
sufix: string; suffix: string;
unit: string; unit: string;
} }
...@@ -56,10 +56,10 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> { ...@@ -56,10 +56,10 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
onPrefixChange = event => this.props.onChange({ ...this.props.options, prefix: event.target.value }); onPrefixChange = event => this.props.onChange({ ...this.props.options, prefix: event.target.value });
onSufixChange = event => this.props.onChange({ ...this.props.options, sufix: event.target.value }); onSuffixChange = event => this.props.onChange({ ...this.props.options, suffix: event.target.value });
render() { render() {
const { stat, unit, decimals, prefix, sufix } = this.props.options; const { stat, unit, decimals, prefix, suffix } = this.props.options;
return ( return (
<div> <div>
<div className="section gf-form-group"> <div className="section gf-form-group">
...@@ -94,8 +94,8 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> { ...@@ -94,8 +94,8 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
<input className="gf-form-input width-12" type="text" value={prefix || ''} onChange={this.onPrefixChange} /> <input className="gf-form-input width-12" type="text" value={prefix || ''} onChange={this.onPrefixChange} />
</div> </div>
<div className="gf-form-inline"> <div className="gf-form-inline">
<Label width={5}>Sufix</Label> <Label width={5}>Suffix</Label>
<input className="gf-form-input width-12" type="text" value={sufix || ''} onChange={this.onSufixChange} /> <input className="gf-form-input width-12" type="text" value={suffix || ''} onChange={this.onSuffixChange} />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -17,7 +17,7 @@ interface Props { ...@@ -17,7 +17,7 @@ interface Props {
height: number; height: number;
stat?: string; stat?: string;
prefix: string; prefix: string;
sufix: string; suffix: string;
} }
const colors = ['rgba(50, 172, 45, 0.97)', 'rgba(237, 129, 40, 0.89)', 'rgba(245, 54, 54, 0.9)']; const colors = ['rgba(50, 172, 45, 0.97)', 'rgba(237, 129, 40, 0.89)', 'rgba(245, 54, 54, 0.9)'];
...@@ -32,7 +32,7 @@ export class Gauge extends PureComponent<Props> { ...@@ -32,7 +32,7 @@ export class Gauge extends PureComponent<Props> {
prefix: '', prefix: '',
showThresholdMarkers: true, showThresholdMarkers: true,
showThresholdLables: false, showThresholdLables: false,
sufix: '', suffix: '',
thresholds: [0, 100], thresholds: [0, 100],
}; };
...@@ -45,10 +45,10 @@ export class Gauge extends PureComponent<Props> { ...@@ -45,10 +45,10 @@ export class Gauge extends PureComponent<Props> {
} }
formatValue(value) { formatValue(value) {
const { decimals, prefix, sufix, unit } = this.props; const { decimals, prefix, suffix, unit } = this.props;
const formatFunc = kbn.valueFormats[unit]; const formatFunc = kbn.valueFormats[unit];
return `${prefix} ${formatFunc(value, decimals)} ${sufix}`; return `${prefix} ${formatFunc(value, decimals)} ${suffix}`;
} }
draw() { draw() {
......
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