mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #14099 from alexanderzobnin/fix-14098
fix datasource testing
This commit is contained in:
commit
907c84f7d8
@ -118,7 +118,7 @@ export class DataSourceEditCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testDatasource() {
|
testDatasource() {
|
||||||
this.datasourceSrv.get(this.current.name).then(datasource => {
|
return this.datasourceSrv.get(this.current.name).then(datasource => {
|
||||||
if (!datasource.testDatasource) {
|
if (!datasource.testDatasource) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ export class DataSourceEditCtrl {
|
|||||||
this.testing = { done: false, status: 'error' };
|
this.testing = { done: false, status: 'error' };
|
||||||
|
|
||||||
// make test call in no backend cache context
|
// make test call in no backend cache context
|
||||||
this.backendSrv
|
return this.backendSrv
|
||||||
.withNoBackendCache(() => {
|
.withNoBackendCache(() => {
|
||||||
return datasource
|
return datasource
|
||||||
.testDatasource()
|
.testDatasource()
|
||||||
@ -161,8 +161,8 @@ export class DataSourceEditCtrl {
|
|||||||
return this.backendSrv.put('/api/datasources/' + this.current.id, this.current).then(result => {
|
return this.backendSrv.put('/api/datasources/' + this.current.id, this.current).then(result => {
|
||||||
this.current = result.datasource;
|
this.current = result.datasource;
|
||||||
this.updateNav();
|
this.updateNav();
|
||||||
this.updateFrontendSettings().then(() => {
|
return this.updateFrontendSettings().then(() => {
|
||||||
this.testDatasource();
|
return this.testDatasource();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user