grafana/public/app/plugins/panel/text2/module.tsx

22 lines
430 B
TypeScript
Raw Normal View History

import React, { PureComponent } from 'react';
import { PanelProps } from 'app/features/dashboard/dashgrid/DataPanel';
2018-01-02 07:52:30 -06:00
export class Text2 extends PureComponent<PanelProps> {
2018-01-02 07:52:30 -06:00
constructor(props) {
super(props);
}
render() {
const { data } = this.props;
let value = 0;
if (data.length) {
value = data[0].value;
}
return <h2>Graph Panel! {value}</h2>;
2018-01-02 07:52:30 -06:00
}
}
export { Text2 as PanelComponent };