mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 06:02:49 +08:00
48 lines
995 B
TypeScript
48 lines
995 B
TypeScript
// Libraries
|
|
import _ from 'lodash';
|
|
import React, { PureComponent } from 'react';
|
|
|
|
// Components
|
|
import Graph from 'app/viz/Graph';
|
|
import { getTimeSeriesVMs } from 'app/viz/state/timeSeries';
|
|
|
|
// Types
|
|
import { PanelProps, NullValueMode } from 'app/types';
|
|
|
|
interface Options {
|
|
showBars: boolean;
|
|
}
|
|
|
|
interface Props extends PanelProps {
|
|
options: Options;
|
|
}
|
|
|
|
export class Graph2 extends PureComponent<Props> {
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
render() {
|
|
const { timeSeries, timeRange } = this.props;
|
|
|
|
const vmSeries = getTimeSeriesVMs({
|
|
timeSeries: timeSeries,
|
|
nullValueMode: NullValueMode.Ignore,
|
|
});
|
|
|
|
return <Graph timeSeries={vmSeries} timeRange={timeRange} />;
|
|
}
|
|
}
|
|
|
|
export class TextOptions extends PureComponent<any> {
|
|
render() {
|
|
return (
|
|
<div className="section gf-form-group">
|
|
<h5 className="section-heading">Draw Modes</h5>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export { Graph2 as PanelComponent, TextOptions as PanelOptions };
|