Преглед на файлове

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');
   }