Skip to content

Commit 0762c38

Browse files
committed
fix(ds_edit): dont show warning when data source does not support testing, fixes grafana#4811
1 parent 6bc898b commit 0762c38

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

public/app/features/plugins/ds_edit_ctrl.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ export class DataSourceEditCtrl {
9898

9999
this.datasourceSrv.get(this.current.name).then(datasource => {
100100
if (!datasource.testDatasource) {
101-
this.testing.message = 'Data source does not support test connection feature.';
102-
this.testing.status = 'warning';
103-
this.testing.title = 'Unknown';
101+
delete this.testing;
104102
return;
105103
}
106104

@@ -118,7 +116,9 @@ export class DataSourceEditCtrl {
118116
}
119117
});
120118
}).finally(() => {
121-
this.testing.done = true;
119+
if (this.testing) {
120+
this.testing.done = true;
121+
}
122122
});
123123
}
124124

public/app/features/plugins/partials/ds_edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h1 ng-hide="ctrl.isNew">Edit data source</h1>
5353
</plugin-component>
5454
</rebuild-on-change>
5555

56-
<div ng-if="ctrl.testing" style="margin-top: 25px">
56+
<div ng-if="ctrl.testing" class="gf-form-group">
5757
<h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
5858
<div class="alert-{{ctrl.testing.status}} alert">
5959
<div class="alert-title">{{ctrl.testing.title}}</div>

0 commit comments

Comments
 (0)