mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
NewPanelEdit: Add back datalinks and new table panel fix (#22267)
* NewPanelEditor: Add back data links * Made custom table options work in table panel
This commit is contained in:
parent
4cf765839a
commit
7acea5b3fa
@ -36,12 +36,13 @@ export const DataLinksValueEditor: React.FC<FieldConfigEditorProps<DataLink[], D
|
||||
};
|
||||
|
||||
const onDataLinkAdd = () => {
|
||||
const links = cloneDeep(value);
|
||||
const links = cloneDeep(value) || [];
|
||||
|
||||
links.push({
|
||||
title: '',
|
||||
url: '',
|
||||
});
|
||||
|
||||
onChange(links);
|
||||
};
|
||||
|
||||
|
@ -148,5 +148,6 @@ export const getStandardFieldConfigs = () => {
|
||||
StandardFieldConfigEditors.thresholds,
|
||||
StandardFieldConfigEditors.title,
|
||||
StandardFieldConfigEditors.noValue,
|
||||
StandardFieldConfigEditors.links,
|
||||
];
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ import { Table } from '@grafana/ui';
|
||||
import { PanelProps, applyFieldOverrides } from '@grafana/data';
|
||||
import { Options } from './types';
|
||||
import { config } from 'app/core/config';
|
||||
import { tableFieldRegistry } from './custom';
|
||||
|
||||
interface Props extends PanelProps<Options> {}
|
||||
|
||||
@ -28,6 +29,7 @@ export class TablePanel extends Component<Props> {
|
||||
fieldOptions: options.fieldOptions,
|
||||
theme: config.theme,
|
||||
replaceVariables,
|
||||
custom: tableFieldRegistry,
|
||||
})[0];
|
||||
|
||||
return <Table height={height - paddingBottom} width={width} data={dataProcessed} />;
|
||||
|
Loading…
Reference in New Issue
Block a user