浏览代码

HUE-8758 [connector] Reset connector test result when changing section

Romain 5 年之前
父节点
当前提交
60572cc272
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      desktop/core/src/desktop/js/apps/about/components/ko.connectorsConfig.js

+ 4 - 2
desktop/core/src/desktop/js/apps/about/components/ko.connectorsConfig.js

@@ -217,6 +217,10 @@ class ConnectorsConfig extends DisposableComponent {
     super();
 
     this.section = ko.observable('installed-connectors-page');
+    this.section.subscribe(() => {
+      this.connectorsFilter('');
+      this.testConnectionExecuted(false);
+    });
     this.categories = ko.observableArray();
     this.filterCategories = ko.pureComputed(() => {
       return [ALL_CATEGORY].concat(this.categories());
@@ -276,8 +280,6 @@ class ConnectorsConfig extends DisposableComponent {
   }
 
   addNewConnector() {
-    this.testConnectionExecuted(false);
-    this.testConnectionErrors('');
     this.section('add-connector-page');
   }