ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject git commit: AMBARI-6326. Clicking on a single component link goes to Hosts page rather than directly to Host Details page.(xiwang)
Date Tue, 01 Jul 2014 00:02:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 8f21a9aa2 -> da27d536d


AMBARI-6326. Clicking on a single component link goes to Hosts page rather than directly to
Host Details page.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/da27d536
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/da27d536
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/da27d536

Branch: refs/heads/branch-1.6.1
Commit: da27d536db04cf5fb278ee84bb2d3cf4b18d97ee
Parents: 8f21a9a
Author: Xi Wang <xiwang@apache.org>
Authored: Mon Jun 30 16:39:03 2014 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Mon Jun 30 17:01:54 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/global/update_controller.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/da27d536/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 7634447..9853445 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -155,17 +155,21 @@ App.UpdateController = Em.Controller.extend({
 
     if (App.router.get('currentState.name') == 'index' && App.router.get('currentState.parentState.name')
== 'hosts') {
       App.updater.updateInterval('updateHost', App.get('contentUpdateInterval'));
+      this.get('queryParams').set('Hosts', App.router.get('mainHostController').getQueryParameters());
     } else if(App.router.get('currentState.name') == 'summary' && App.router.get('currentState.parentState.name')
== 'hostDetails') {
       realUrl = realUrl.replace('<parameters>', 'Hosts/host_name=' + App.router.get('location.lastSetURL').match(/\/hosts\/(.*)\/summary/)[1]
+ '&');
       App.updater.updateInterval('updateHost', App.get('componentsUpdateInterval'));
+      this.get('queryParams').set('Hosts', App.router.get('mainHostController').getQueryParameters());
     } else {
       callback();
-      // 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) {
+        // On pages except for hosts/hostDetails, making sure hostsMapper loaded only once
on page load, no need to update, but at least once
         return;
+      } else {
+        // On pages except for hosts/hostDetails, set queryParams [] to ensure load all hosts,
but not filtered hosts as shown on hosts page
+        this.get('queryParams').set('Hosts', []);
       }
     }
-    this.get('queryParams').set('Hosts', App.router.get('mainHostController').getQueryParameters());
     var clientCallback = function (skipCall, queryParams) {
       if (skipCall) {
         App.hostsMapper.map({items: []});


Mime
View raw message