DatasourceRef: keep uid/type ref when using template variables (#41785)
This commit is contained in:
@@ -591,6 +591,9 @@ export interface DataSourceInstanceSettings<T extends DataSourceJsonData = DataS
|
||||
*/
|
||||
basicAuth?: string;
|
||||
withCredentials?: boolean;
|
||||
|
||||
/** When the name+uid are based on template variables, maintain access to the real values */
|
||||
rawRef?: DataSourceRef;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -124,7 +124,7 @@ class DataSourceWithBackend<
|
||||
throw new Error(`Unknown Datasource: ${JSON.stringify(q.datasource)}`);
|
||||
}
|
||||
|
||||
datasource = getDataSourceRef(ds);
|
||||
datasource = ds.rawRef ?? getDataSourceRef(ds);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user