mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
templating: check for default data source (#7636)
For data source template variables, check if the selected value is default and if so load the default data source. Fixes #7586
This commit is contained in:
parent
96a3ed0ac3
commit
e5f5c1724a
@ -21,6 +21,10 @@ function (angular, _, coreModule, config) {
|
||||
|
||||
name = templateSrv.replace(name);
|
||||
|
||||
if (name === 'default') {
|
||||
return this.get(config.defaultDatasource);
|
||||
}
|
||||
|
||||
if (this.datasources[name]) {
|
||||
return $q.when(this.datasources[name]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user