Commit e5f5c172 by Daniel Lee Committed by Torkel Ödegaard

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
parent 96a3ed0a
......@@ -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]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment