소스 검색

AMBARI-9291 Alerts: Hosts alerts badge doesn't clear until clicking into hosts. (atkach)

Andrii Tkach 10 년 전
부모
커밋
ba121b5230

+ 1 - 0
ambari-web/app/config.js

@@ -37,6 +37,7 @@ App.sessionKeepAliveInterval  = 60000;
 App.bgOperationsUpdateInterval = 6000;
 App.componentsUpdateInterval = 6000;
 App.contentUpdateInterval = 15000;
+App.hostStatusCountersUpdateInterval = 10000;
 App.alertDefinitionsUpdateInterval = 10000;
 App.alertInstancesUpdateInterval = 10000;
 App.alertGroupsUpdateInterval = 10000;

+ 0 - 1
ambari-web/app/controllers/global/cluster_controller.js

@@ -230,7 +230,6 @@ App.ClusterController = Em.Controller.extend({
     var hostsController = App.router.get('mainHostController');
     hostsController.set('isCountersUpdating', true);
     hostsController.updateStatusCounters();
-    hostsController.set('isCountersUpdating', false);
 
     App.HttpClient.get(racksUrl, App.racksMapper, {
       complete: function (jqXHR, textStatus) {

+ 1 - 1
ambari-web/app/controllers/main/host.js

@@ -299,7 +299,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
 
       setTimeout(function () {
         self.updateStatusCounters();
-      }, App.get('componentsUpdateInterval'));
+      }, App.get('hostStatusCountersUpdateInterval'));
     }
   },
 

+ 0 - 6
ambari-web/app/views/main/host.js

@@ -217,8 +217,6 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
     this.addObserver('controller.clearFilters', this, this.clearFiltersObs);
     this.clearFiltersObs();
     this.addObserver('selectAllHosts', this, this.toggleAllHosts);
-    this.set('controller.isCountersUpdating', true);
-    this.get('controller').updateStatusCounters();
     this.addObserver('filteringComplete', this, this.overlayObserver);
     this.addObserver('startIndex', this, 'updatePagination');
     this.addObserver('displayLength', this, 'updatePagination');
@@ -232,10 +230,6 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
     }
   }.observes('tableFilteringComplete'),
 
-  willDestroyElement: function() {
-    this.set('controller.isCountersUpdating', false);
-  },
-
   /**
    * Set <code>selected</code> property for each App.Host
    */