cleanup and guess all columns

This commit is contained in:
ryan
2019-03-21 21:52:58 -07:00
parent 50ebc768c8
commit 7498de044c
7 changed files with 228 additions and 83 deletions

View File

@@ -19,11 +19,13 @@ import config from 'app/core/config';
// Types
import { DashboardModel, PanelModel } from '../state';
import { PanelPlugin } from 'app/types';
import { DataQueryResponse, TimeRange, LoadingState, TableData, DataQueryError, toTableData } from '@grafana/ui';
import { DataQueryResponse, TimeRange, LoadingState, TableData, DataQueryError } from '@grafana/ui';
import { ScopedVars } from '@grafana/ui';
import templateSrv from 'app/features/templating/template_srv';
import { getProcessedTableData } from './DataPanel';
const DEFAULT_PLUGIN_ERROR = 'Error in plugin';
export interface Props {
@@ -139,7 +141,7 @@ export class PanelChrome extends PureComponent<Props, State> {
}
get getDataForPanel() {
return this.hasPanelSnapshot ? toTableData(this.props.panel.snapshotData) : null;
return this.hasPanelSnapshot ? getProcessedTableData(this.props.panel.snapshotData) : null;
}
renderPanelPlugin(loading: LoadingState, data: TableData[], width: number, height: number): JSX.Element {