Переглянути джерело

AMBARI-2291. Incorrect behavior of jobs paging. (Oleg Nechiporenko via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1489960 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 роки тому
батько
коміт
f0c0227c05
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      ambari-web/app/controllers/main/apps_controller.js

+ 4 - 1
ambari-web/app/controllers/main/apps_controller.js

@@ -371,12 +371,15 @@ App.MainAppsController = Em.ArrayController.extend({
   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');