mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -3,7 +3,7 @@ import {
|
||||
DataSourceInstanceSettings,
|
||||
DataSourcePlugin,
|
||||
DataSourcePluginMeta,
|
||||
ScopedVar,
|
||||
ScopedVars,
|
||||
} from '@grafana/data';
|
||||
import { ExpressionDatasourceRef } from '@grafana/runtime/src/utils/DataSourceWithBackend';
|
||||
import { DatasourceSrv } from 'app/features/plugins/datasource_srv';
|
||||
@@ -26,7 +26,7 @@ const templateSrv: any = {
|
||||
},
|
||||
},
|
||||
],
|
||||
replace: (v: string, scopedVars: ScopedVar) => {
|
||||
replace: (v: string, scopedVars: ScopedVars) => {
|
||||
if (scopedVars && scopedVars.datasource) {
|
||||
return v.replace('${datasource}', scopedVars.datasource.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user