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

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

Alex Antonenko 11 роки тому
батько
коміт
b6ef1f15b3
1 змінених файлів з 7 додано та 2 видалено
  1. 7 2
      ambari-web/app/controllers/main/jobs_controller.js

+ 7 - 2
ambari-web/app/controllers/main/jobs_controller.js

@@ -44,6 +44,9 @@ App.MainJobsController = Em.Controller.extend({
 
   contentAndSortObserver : function() {
     Ember.run.once(this, 'contentAndSortUpdater');
+    if(App.HiveJob.find().findProperty('id', this.get('lastJobID'))) {
+      this.set('hasNewJobs', false);
+    }
   }.observes('content.length', 'content.@each.id', 'content.@each.startTime', 'content.@each.endTime', 'sortProperties', 'sortAscending'),
   
   contentAndSortUpdater: function() {
@@ -364,7 +367,9 @@ App.MainJobsController = Em.Controller.extend({
       this.set('lastJobID', lastReceivedID);
     } else if (this.get('lastJobID') !== lastReceivedID) {
       this.set('lastJobID', lastReceivedID);
-      this.set('hasNewJobs', true);
+      if(!App.HiveJob.find().findProperty('id', lastReceivedID)) {
+        this.set('hasNewJobs', true);
+      }
     }
   },
 
@@ -418,7 +423,7 @@ App.MainJobsController = Em.Controller.extend({
       back_link_IDs.push(this.get('lastJobID'));
     }
     this.set('filterObject.backFromId', this.get('lastJobID'));
-    this.get('filterObject').set('fromTs', App.get('currentServerTime'));
+    this.get('filterObject').set('fromTs', App.dateTime());
   },
 
   navigateNext: function() {