Browse Source

AMBARI-6279. Single component link on Service page redirect to Hosts page instead Host Details page.(xiwang)

Xi Wang 11 years ago
parent
commit
ac78a38884
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ambari-web/app/controllers/global/update_controller.js

+ 4 - 1
ambari-web/app/controllers/global/update_controller.js

@@ -153,7 +153,10 @@ App.UpdateController = Em.Controller.extend({
       App.updater.updateInterval('updateHost', App.get('componentsUpdateInterval'));
       App.updater.updateInterval('updateHost', App.get('componentsUpdateInterval'));
     } else {
     } else {
       callback();
       callback();
-      return;
+      // On pages except for hosts/hostDetails, making sure hostsMapper loaded only once on page load, no need to update, but at least once
+      if (this.get('queryParams.Hosts') && this.get('queryParams.Hosts').length > 0) {
+        return;
+      }
     }
     }
     this.get('queryParams').set('Hosts', App.router.get('mainHostController').getQueryParameters());
     this.get('queryParams').set('Hosts', App.router.get('mainHostController').getQueryParameters());
     var hostsUrl = this.getComplexUrl(testUrl, realUrl, this.get('queryParams.Hosts'));
     var hostsUrl = this.getComplexUrl(testUrl, realUrl, this.get('queryParams.Hosts'));