mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
28 lines
669 B
TypeScript
28 lines
669 B
TypeScript
import React, { PureComponent } from 'react';
|
|
import { GaugeOptions, PanelProps, NullValueMode } from '@grafana/ui';
|
|
|
|
import { getTimeSeriesVMs } from 'app/viz/state/timeSeries';
|
|
import Gauge from 'app/viz/Gauge';
|
|
|
|
interface Props extends PanelProps<GaugeOptions> {}
|
|
|
|
export class GaugePanel extends PureComponent<Props> {
|
|
render() {
|
|
const { timeSeries, width, height } = this.props;
|
|
|
|
const vmSeries = getTimeSeriesVMs({
|
|
timeSeries: timeSeries,
|
|
nullValueMode: NullValueMode.Ignore,
|
|
});
|
|
|
|
return (
|
|
<Gauge
|
|
timeSeries={vmSeries}
|
|
{...this.props.options}
|
|
width={width}
|
|
height={height}
|
|
/>
|
|
);
|
|
}
|
|
}
|