ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-8241. Hosts page shows only 25 hosts after logging out and logging back in if page size is set to 50 or 100. (atkach via yusaku)
Date Sun, 09 Nov 2014 21:53:09 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 91515f362 -> 550785ea6


AMBARI-8241. Hosts page shows only 25 hosts after logging out and logging back in if page
size is set to 50 or 100. (atkach via yusaku)


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

Branch: refs/heads/branch-1.7.0
Commit: 550785ea616fa38bcc53c04ded818964495df025
Parents: 91515f3
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Sun Nov 9 13:52:28 2014 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Sun Nov 9 13:52:28 2014 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/550785ea/ambari-web/app/controllers/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js
index 7cbc049..569835c 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -125,7 +125,12 @@ App.MainHostController = Em.ArrayController.extend({
         var name = controller.get('name');
         var dbValue = App.db.getDisplayLength(name);
         if (Em.isNone(this.get('viewValue'))) {
-          this.set('viewValue', dbValue || '25'); //25 is default displayLength value for
hosts page
+          if (dbValue) {
+            this.set('viewValue', dbValue);
+          } else {
+            this.set('viewValue', '25'); //25 is default displayLength value for hosts page
+            App.db.setDisplayLength(name, '25');
+          }
         }
         return this.get('viewValue');
       },
@@ -144,6 +149,7 @@ App.MainHostController = Em.ArrayController.extend({
             value = 0;
           } else {
             value = startIndex;
+            App.db.setStartIndex(name, startIndex);
           }
         }
         return (value > 0) ? value - 1 : value;


Mime
View raw message