Browse Source

AMBARI-5336. JobsDiagnostic|2.1.1: New jobs don't show up in jobs table. (alexantonenko)

Alex Antonenko 11 years ago
parent
commit
4ba9f1e814

+ 3 - 3
ambari-web/app/controllers/main/jobs_controller.js

@@ -414,10 +414,10 @@ App.MainJobsController = Em.Controller.extend({
 
   initializePagination: function() {
     var back_link_IDs = this.get('navIDs.backIDs.[]');
-    if(!back_link_IDs.contains(App.HiveJob.find().objectAt(0).get('id'))) {
-      back_link_IDs.push(App.HiveJob.find().objectAt(0).get('id'));
+    if(!back_link_IDs.contains(this.get('lastJobID'))) {
+      back_link_IDs.push(this.get('lastJobID'));
     }
-    this.set('filterObject.backFromId', App.HiveJob.find().objectAt(0).get('id'));
+    this.set('filterObject.backFromId', this.get('lastJobID'));
     this.get('filterObject').set('fromTs', App.get('currentServerTime'));
   },
 

+ 1 - 1
ambari-web/app/views/main/jobs_view.js

@@ -171,7 +171,7 @@ App.MainJobsView = App.TableView.extend({
    * @returns {String}
    */
   filteredJobs: function () {
-    return Em.I18n.t('jobs.filtered.jobs').format(this.get('controller.content.length'), this.get('controller.totalOfJobs'));
+    return Em.I18n.t('jobs.filtered.jobs').format(this.get('controller.content.length'), this.get('controller.filterObject.jobsLimit'));
   }.property('controller.content.length', 'controller.totalOfJobs'),
 
   pageContentObserver: function () {