DataLinks: Fixes interpolation (formatting) of __all_variables and __url_time_range (#65162)

* DataLinks: Fixes interpolation (formatting) of __all_variables and __url_time_range

* simplify if statement
This commit is contained in:
Torkel Ödegaard
2023-03-22 18:56:18 +01:00
committed by GitHub
parent 0409cfd116
commit cd490ba0be
9 changed files with 28 additions and 11 deletions
@@ -413,7 +413,7 @@ export const getLinksSupplier =
}
}
const variables = {
const variables: ScopedVars = {
...fieldScopedVars,
__value: {
text: 'Value',
@@ -423,10 +423,12 @@ export const getLinksSupplier =
[DataLinkBuiltInVars.keepTime]: {
text: timeRangeUrl,
value: timeRangeUrl,
skipFormat: true,
},
[DataLinkBuiltInVars.includeVars]: {
text: variablesQuery,
value: variablesQuery,
skipFormat: true,
},
};
@@ -1,7 +1,8 @@
export interface ScopedVar<T = any> {
text?: any;
value: T;
[key: string]: any;
skipUrlSync?: boolean;
skipFormat?: boolean;
}
export interface ScopedVars extends Record<string, ScopedVar> {}