The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/plugins/panel/graph2/module.tsx

51 lines
1.1 KiB

// Libraries
import _ from 'lodash';
import React, { PureComponent } from 'react';
// Components
import Graph from 'app/viz/Graph';
import { getTimeSeriesVMs } from 'app/viz/state/timeSeries';
import { Switch } from 'app/core/components/Switch/Switch';
// 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> {
onChange = () => {};
render() {
return (
<div className="section gf-form-group">
<h5 className="section-heading">Draw Modes</h5>
<Switch label="Lines" checked={true} onChange={this.onChange} />
</div>
);
}
}
export { Graph2 as PanelComponent, TextOptions as PanelOptions };