mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
typo fix
This commit is contained in:
parent
22e64eb287
commit
9ded648bc5
@ -10,7 +10,7 @@ export interface Options {
|
||||
decimals: number;
|
||||
prefix: string;
|
||||
stat: string;
|
||||
suffix: string;
|
||||
sufix: string;
|
||||
unit: string;
|
||||
}
|
||||
|
||||
@ -56,10 +56,10 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
|
||||
|
||||
onPrefixChange = event => this.props.onChange({ ...this.props.options, prefix: event.target.value });
|
||||
|
||||
onSuffixChange = event => this.props.onChange({ ...this.props.options, suffix: event.target.value });
|
||||
onSufixChange = event => this.props.onChange({ ...this.props.options, sufix: event.target.value });
|
||||
|
||||
render() {
|
||||
const { stat, unit, decimals, prefix, suffix } = this.props.options;
|
||||
const { stat, unit, decimals, prefix, sufix } = this.props.options;
|
||||
return (
|
||||
<div>
|
||||
<div className="section gf-form-group">
|
||||
@ -94,8 +94,8 @@ class GaugeOptions extends PureComponent<PanelOptionsProps<Options>> {
|
||||
<input className="gf-form-input width-12" type="text" value={prefix || ''} onChange={this.onPrefixChange} />
|
||||
</div>
|
||||
<div className="gf-form-inline">
|
||||
<Label width={5}>Suffix</Label>
|
||||
<input className="gf-form-input width-12" type="text" value={suffix || ''} onChange={this.onSuffixChange} />
|
||||
<Label width={5}>Sufix</Label>
|
||||
<input className="gf-form-input width-12" type="text" value={sufix || ''} onChange={this.onSufixChange} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@ interface Props {
|
||||
height: number;
|
||||
stat?: string;
|
||||
prefix: string;
|
||||
suffix: string;
|
||||
sufix: string;
|
||||
}
|
||||
|
||||
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> {
|
||||
prefix: '',
|
||||
showThresholdMarkers: true,
|
||||
showThresholdLables: false,
|
||||
suffix: '',
|
||||
sufix: '',
|
||||
thresholds: [0, 100],
|
||||
};
|
||||
|
||||
@ -45,10 +45,10 @@ export class Gauge extends PureComponent<Props> {
|
||||
}
|
||||
|
||||
formatValue(value) {
|
||||
const { decimals, prefix, suffix, unit } = this.props;
|
||||
const { decimals, prefix, sufix, unit } = this.props;
|
||||
|
||||
const formatFunc = kbn.valueFormats[unit];
|
||||
return `${prefix} ${formatFunc(value, decimals)} ${suffix}`;
|
||||
return `${prefix} ${formatFunc(value, decimals)} ${sufix}`;
|
||||
}
|
||||
|
||||
draw() {
|
||||
|
Loading…
Reference in New Issue
Block a user