Commit 0762c38d by Torkel Ödegaard

fix(ds_edit): dont show warning when data source does not support testing, fixes #4811

parent 6bc898b2
...@@ -98,9 +98,7 @@ export class DataSourceEditCtrl { ...@@ -98,9 +98,7 @@ export class DataSourceEditCtrl {
this.datasourceSrv.get(this.current.name).then(datasource => { this.datasourceSrv.get(this.current.name).then(datasource => {
if (!datasource.testDatasource) { if (!datasource.testDatasource) {
this.testing.message = 'Data source does not support test connection feature.'; delete this.testing;
this.testing.status = 'warning';
this.testing.title = 'Unknown';
return; return;
} }
...@@ -118,7 +116,9 @@ export class DataSourceEditCtrl { ...@@ -118,7 +116,9 @@ export class DataSourceEditCtrl {
} }
}); });
}).finally(() => { }).finally(() => {
if (this.testing) {
this.testing.done = true; this.testing.done = true;
}
}); });
} }
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</plugin-component> </plugin-component>
</rebuild-on-change> </rebuild-on-change>
<div ng-if="ctrl.testing" style="margin-top: 25px"> <div ng-if="ctrl.testing" class="gf-form-group">
<h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5> <h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
<div class="alert-{{ctrl.testing.status}} alert"> <div class="alert-{{ctrl.testing.status}} alert">
<div class="alert-title">{{ctrl.testing.title}}</div> <div class="alert-title">{{ctrl.testing.title}}</div>
......
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