mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix datalink suggestions (#33411)
This commit is contained in:
parent
18db387387
commit
6c7290164e
@ -32,7 +32,7 @@ export const OptionsPaneOptions: React.FC<Props> = (props) => {
|
|||||||
() => [getPanelFrameCategory(props), getVizualizationOptions(props), getFieldOverrideCategories(props)],
|
() => [getPanelFrameCategory(props), getVizualizationOptions(props), getFieldOverrideCategories(props)],
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
[panel.configRev]
|
[panel.configRev, props.data]
|
||||||
);
|
);
|
||||||
|
|
||||||
const mainBoxElements: React.ReactNode[] = [];
|
const mainBoxElements: React.ReactNode[] = [];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { StandardEditorContext, VariableSuggestionsScope } from '@grafana/data';
|
import { StandardEditorContext, VariableSuggestionsScope } from '@grafana/data';
|
||||||
import { get as lodashGet, set as lodashSet } from 'lodash';
|
import { get as lodashGet, set as lodashSet } from 'lodash';
|
||||||
import { getPanelOptionsVariableSuggestions } from 'app/features/panel/panellinks/link_srv';
|
import { getDataLinksVariableSuggestions } from 'app/features/panel/panellinks/link_srv';
|
||||||
import { OptionPaneRenderProps } from './types';
|
import { OptionPaneRenderProps } from './types';
|
||||||
import { updateDefaultFieldConfigValue } from './utils';
|
import { updateDefaultFieldConfigValue } from './utils';
|
||||||
import { OptionsPaneItemDescriptor } from './OptionsPaneItemDescriptor';
|
import { OptionsPaneItemDescriptor } from './OptionsPaneItemDescriptor';
|
||||||
@ -19,7 +19,7 @@ export function getVizualizationOptions(props: OptionPaneRenderProps): OptionsPa
|
|||||||
options: currentOptions,
|
options: currentOptions,
|
||||||
eventBus: dashboard.events,
|
eventBus: dashboard.events,
|
||||||
getSuggestions: (scope?: VariableSuggestionsScope) => {
|
getSuggestions: (scope?: VariableSuggestionsScope) => {
|
||||||
return getPanelOptionsVariableSuggestions(plugin, data?.series);
|
return data ? getDataLinksVariableSuggestions(data.series, scope) : [];
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user