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

AMBARI-2565. Integrate with new API for retrieving background operations. (Antonenko Alexander via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1500137 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 роки тому
батько
коміт
31edd6df2a

+ 1 - 1
ambari-web/app/controllers/global/background_operations_controller.js

@@ -65,7 +65,7 @@ App.BackgroundOperationsController = Em.Controller.extend({
     this.get("services").clear();
     var runningServices = 0;
     var self = this;
-    data.items = data.items.sort(function(a,b){return b.Requests.id - a.Requests.id}).slice( 0, 10);
+    data.items = data.items.sort(function(a,b){return b.Requests.id - a.Requests.id});
     data.items.forEach(function(request){
       var rq = Em.Object.create({
         id:request.Requests.id,

+ 1 - 1
ambari-web/app/utils/ajax.js

@@ -41,7 +41,7 @@ var urls = {
     'testInProduction': true
   },
   'background_operations.get_most_recent': {
-    'real': '/clusters/{clusterName}/requests?fields=*,tasks/Tasks/*',
+    'real': '/clusters/{clusterName}/requests?to=end&page_size=10&fields=*,tasks/Tasks/*',
     'mock': '/data/background_operations/list_on_start.json',
     'testInProduction': true
   },