Commit 1726f635 by Marcus Efraimsson Committed by GitHub

Merge pull request #12383 from CorpGlory/master

Set $rootScope in DatasourceSrv
parents e0ac31a2 97db9ece
...@@ -7,7 +7,7 @@ export class DatasourceSrv { ...@@ -7,7 +7,7 @@ export class DatasourceSrv {
datasources: any; datasources: any;
/** @ngInject */ /** @ngInject */
constructor(private $q, private $injector, $rootScope, private templateSrv) { constructor(private $q, private $injector, private $rootScope, private templateSrv) {
this.init(); this.init();
} }
...@@ -61,7 +61,7 @@ export class DatasourceSrv { ...@@ -61,7 +61,7 @@ export class DatasourceSrv {
this.datasources[name] = instance; this.datasources[name] = instance;
deferred.resolve(instance); deferred.resolve(instance);
}) })
.catch(function(err) { .catch(err => {
this.$rootScope.appEvent('alert-error', [dsConfig.name + ' plugin failed', err.toString()]); this.$rootScope.appEvent('alert-error', [dsConfig.name + ' plugin failed', err.toString()]);
}); });
......
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