module.tsx 774 B

1234567891011121314151617181920212223242526
  1. import React, { PureComponent } from 'react';
  2. import Gauge from 'app/viz/Gauge';
  3. import { NullValueMode, PanelProps } from 'app/types';
  4. import { getTimeSeriesVMs } from 'app/viz/state/timeSeries';
  5. import { GaugeOptions } from './GaugeOptions';
  6. export interface Options {}
  7. interface Props extends PanelProps<Options> {}
  8. export class GaugePanel extends PureComponent<Props> {
  9. render() {
  10. const { timeSeries, width, height } = this.props;
  11. const vmSeries = getTimeSeriesVMs({
  12. timeSeries: timeSeries,
  13. nullValueMode: NullValueMode.Ignore,
  14. });
  15. return (
  16. <Gauge maxValue={100} minValue={0} timeSeries={vmSeries} thresholds={[0, 100]} height={height} width={width} />
  17. );
  18. }
  19. }
  20. export { GaugePanel as Panel, GaugeOptions as PanelOptions };