You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2016/02/02 19:55:45 UTC

ambari git commit: AMBARI-14879 Alerts page pagination issue.(ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk aab6d8898 -> 94c13eee7


AMBARI-14879 Alerts page pagination issue.(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 94c13eee7f1536d343586ad3e5519961be57a356
Parents: aab6d88
Author: ababiichuk <ab...@hortonworks.com>
Authored: Tue Feb 2 19:57:26 2016 +0200
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Tue Feb 2 20:55:20 2016 +0200

----------------------------------------------------------------------
 ambari-web/app/views/common/table_view.js | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/94c13eee/ambari-web/app/views/common/table_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/table_view.js b/ambari-web/app/views/common/table_view.js
index 386a2aa..f6ccf6c 100644
--- a/ambari-web/app/views/common/table_view.js
+++ b/ambari-web/app/views/common/table_view.js
@@ -75,12 +75,18 @@ App.TableView = Em.View.extend(App.UserPref, {
   willInsertElement: function () {
     var self = this;
     var name = this.get('controller.name');
-    if (!this.get('displayLength') && this.get('state') !== "inBuffer") {
-      if (App.db.getDisplayLength(name)) {
-        self.set('displayLength', App.db.getDisplayLength(name));
-        Em.run.next(function () {
+    if (!this.get('displayLength')) {
+      var displayLength = App.db.getDisplayLength(name);
+      if (displayLength) {
+        if (this.get('state') !== "inBuffer") {
+          self.set('displayLength', displayLength);
           self.initFilters();
-        });
+        } else {
+          Em.run.next(function () {
+            self.set('displayLength', displayLength);
+            self.initFilters();
+          });
+        }
       } else {
         if (!$.mocho) {
           this.getUserPref(this.displayLengthKey()).complete(function () {