mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #12383 from CorpGlory/master
Set $rootScope in DatasourceSrv
This commit is contained in:
commit
1726f6358f
@ -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 {
|
|||||||
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()]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user