mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
44 lines
978 B
TypeScript
44 lines
978 B
TypeScript
// Libraries
|
|
import _ from 'lodash';
|
|
import React, { PureComponent } from 'react';
|
|
|
|
// Components
|
|
import Graph from 'app/viz/Graph';
|
|
|
|
// Services & Utils
|
|
import { getTimeSeriesVMs } from 'app/viz/state/timeSeries';
|
|
|
|
// Types
|
|
import { PanelProps, NullValueMode } from 'app/types';
|
|
import { Options } from './types';
|
|
|
|
interface Props extends PanelProps<Options> {}
|
|
|
|
export class GraphPanel extends PureComponent<Props> {
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
render() {
|
|
const { timeSeries, timeRange, width, height } = this.props;
|
|
const { showLines, showBars, showPoints } = this.props.options;
|
|
|
|
const vmSeries = getTimeSeriesVMs({
|
|
timeSeries: timeSeries,
|
|
nullValueMode: NullValueMode.Ignore,
|
|
});
|
|
|
|
return (
|
|
<Graph
|
|
timeSeries={vmSeries}
|
|
timeRange={timeRange}
|
|
showLines={showLines}
|
|
showPoints={showPoints}
|
|
showBars={showBars}
|
|
width={width}
|
|
height={height}
|
|
/>
|
|
);
|
|
}
|
|
}
|