mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
DataSource: Default data source is no longer a persisted state but just the default data source for new panels (#45132)
* PanelEdit: Change the meaning of default data source to be just that the default for new panels * Added migration, and also migration for annotation datasource prop to data source refs * fix * Fixing tests * Fixes to annotation * Fixing unit test
This commit is contained in:
@@ -103,7 +103,7 @@ export class TemplateSrv implements BaseTemplateSrv {
|
||||
for (const variable of this.getAdHocVariables()) {
|
||||
const variableUid = variable.datasource?.uid;
|
||||
|
||||
if (variableUid === ds.uid || (variable.datasource == null && ds?.isDefault)) {
|
||||
if (variableUid === ds.uid) {
|
||||
filters = filters.concat(variable.filters);
|
||||
} else if (variableUid?.indexOf('$') === 0) {
|
||||
if (this.replace(variableUid) === datasourceName) {
|
||||
|
||||
Reference in New Issue
Block a user