mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
FieldOverrides: Apply field overrides in PanelQueryRunner (#22439)
* Apply field overrides in PanelChrome * Move applyFieldOverrides to panel query runner * Review updates * Make sure overrides are applied back on souce panel when exiting the new edit mode * TS ignores in est * Make field display work in viz repeater * Review updates * Review and test updates * Change the way overrides and trransformations are retrieved in PQR * Minor updates after review * Fix null checks
This commit is contained in:
@@ -3,10 +3,8 @@ import React, { Component } from 'react';
|
||||
|
||||
// Types
|
||||
import { Table } from '@grafana/ui';
|
||||
import { PanelProps, applyFieldOverrides } from '@grafana/data';
|
||||
import { PanelProps } from '@grafana/data';
|
||||
import { Options } from './types';
|
||||
import { config } from 'app/core/config';
|
||||
import { tableFieldRegistry } from './custom';
|
||||
|
||||
interface Props extends PanelProps<Options> {}
|
||||
|
||||
@@ -18,20 +16,12 @@ export class TablePanel extends Component<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, height, width, replaceVariables, options } = this.props;
|
||||
const { data, height, width } = this.props;
|
||||
|
||||
if (data.series.length < 1) {
|
||||
return <div>No Table Data...</div>;
|
||||
}
|
||||
|
||||
const dataProcessed = applyFieldOverrides({
|
||||
data: data.series,
|
||||
fieldOptions: options.fieldOptions,
|
||||
theme: config.theme,
|
||||
replaceVariables,
|
||||
custom: tableFieldRegistry,
|
||||
})[0];
|
||||
|
||||
return <Table height={height - paddingBottom} width={width} data={dataProcessed} />;
|
||||
return <Table height={height - paddingBottom} width={width} data={data.series[0]} />;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user