mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PanelRenderer: Interpolate variables in applyFieldOverrides (#59844)
Update PanelRenderer to interpolate variables in applyFieldOverrides
This commit is contained in:
parent
b0f8e803a1
commit
8fe9969826
@ -62,7 +62,7 @@ export function mapInternalLinkToExplore(options: LinkToExploreOptions): LinkMod
|
||||
});
|
||||
}
|
||||
: undefined,
|
||||
target: '_self',
|
||||
target: link?.targetBlank ? '_blank' : '_self',
|
||||
origin: field,
|
||||
};
|
||||
}
|
||||
|
@ -10,8 +10,9 @@ import {
|
||||
compareArrayValues,
|
||||
compareDataFrameStructures,
|
||||
PluginContextProvider,
|
||||
ScopedVars,
|
||||
} from '@grafana/data';
|
||||
import { PanelRendererProps } from '@grafana/runtime';
|
||||
import { getTemplateSrv, PanelRendererProps } from '@grafana/runtime';
|
||||
import { ErrorBoundaryAlert, useTheme2 } from '@grafana/ui';
|
||||
import { appEvents } from 'app/core/core';
|
||||
|
||||
@ -151,7 +152,9 @@ export function useFieldOverrides(
|
||||
data: series,
|
||||
fieldConfig,
|
||||
fieldConfigRegistry,
|
||||
replaceVariables: (str: string) => str,
|
||||
replaceVariables: (str: string, scopedVars?: ScopedVars) => {
|
||||
return getTemplateSrv().replace(str, scopedVars);
|
||||
},
|
||||
theme,
|
||||
timeZone,
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user