Преглед изворни кода

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