ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-6204 Paging does not work on Hosts page. (Max Shepel via ababiichuk)
Date Thu, 19 Jun 2014 12:55:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 345354072 -> 2ce73d7c0


AMBARI-6204 Paging does not work on Hosts page. (Max Shepel via ababiichuk)


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

Branch: refs/heads/trunk
Commit: 2ce73d7c09d9fd6b4840ce330b87051ec9ebd57a
Parents: 3453540
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Thu Jun 19 15:48:45 2014 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Thu Jun 19 15:48:45 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/views/main/host.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce73d7c/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index 30103c9..8af2d8f 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -67,7 +67,11 @@ App.MainHostView = App.TableView.extend(App.TableServerProvider, {
    * @type {Array}
    */
   pageContent: function () {
-    return this.get('filteredContent').slice(this.get('startIndex') - 1, this.get('endIndex')).sort(function
(a, b) {
+    var content = this.get('filteredContent');
+    if (content.length > this.get('endIndex') - this.get('startIndex') + 1) {
+      content = content.slice(this.get('startIndex') - 1, this.get('endIndex'));
+    }
+    return content.sort(function (a, b) {
       return a.get('index') - b.get('index');
     });
   }.property('filteredCount', 'startIndex', 'endIndex'),


Mime
View raw message