From 0762c38d3552df499659ae36ac496e8f2b2d878f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 26 Apr 2016 10:59:57 +0200 Subject: [PATCH] fix(ds_edit): dont show warning when data source does not support testing, fixes #4811 --- public/app/features/plugins/ds_edit_ctrl.ts | 8 ++++---- public/app/features/plugins/partials/ds_edit.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/app/features/plugins/ds_edit_ctrl.ts b/public/app/features/plugins/ds_edit_ctrl.ts index e7e8014ed10..a3e78c33a15 100644 --- a/public/app/features/plugins/ds_edit_ctrl.ts +++ b/public/app/features/plugins/ds_edit_ctrl.ts @@ -98,9 +98,7 @@ export class DataSourceEditCtrl { this.datasourceSrv.get(this.current.name).then(datasource => { if (!datasource.testDatasource) { - this.testing.message = 'Data source does not support test connection feature.'; - this.testing.status = 'warning'; - this.testing.title = 'Unknown'; + delete this.testing; return; } @@ -118,7 +116,9 @@ export class DataSourceEditCtrl { } }); }).finally(() => { - this.testing.done = true; + if (this.testing) { + this.testing.done = true; + } }); } diff --git a/public/app/features/plugins/partials/ds_edit.html b/public/app/features/plugins/partials/ds_edit.html index 6ad0c40fa68..4756428bead 100644 --- a/public/app/features/plugins/partials/ds_edit.html +++ b/public/app/features/plugins/partials/ds_edit.html @@ -53,7 +53,7 @@ -
+
Testing....
{{ctrl.testing.title}}