Author: yusaku
Date: Mon Jun 17 19:01:31 2013
New Revision: 1493887

URL: http://svn.apache.org/r1493887
Log:
AMBARI-2291. Incorrect behavior of jobs paging. (Oleg Nechiporenko via yusaku)

Modified:
    
incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/apps_controller.js

Modified: 
incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/apps_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/apps_controller.js?rev=1493887&r1=1493886&r2=1493887&view=diff
==============================================================================
--- 
incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/apps_controller.js
 (original)
+++ 
incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/apps_controller.js
 Mon Jun 17 19:01:31 2013
@@ -378,12 +378,15 @@ App.MainAppsController = Em.ArrayControl
   runTimeout : null,
 
   valueObserver: function(){
+    if(this.get('filterObject.iDisplayLength') > this.get('content.length')) {
+      this.set('filterObject.iDisplayStart', 0);
+    }
     var link = this.get('filterObject').createAppLink();
 
     if(this.get("filterObject.viewType") == "filtered"){
       this.set("runUrl", link);
     }else{
-      this.set("runUrl",  
"/jobhistory/datatable?iDisplayLength="+this.get('filterObject.iDisplayLength'));
+      this.set("runUrl",  
"/jobhistory/datatable?iDisplayStart="+this.get('filterObject.iDisplayStart')+"&iDisplayLength="+this.get('filterObject.iDisplayLength'));
     }
 
     var timeout = this.get('runTimeout');


Reply via email to