瀏覽代碼

AMBARI-5334. No ability to load new Hive jobs as link vanishes (alexantonenko)

Alex Antonenko 11 年之前
父節點
當前提交
28ae1edd3f
共有 1 個文件被更改,包括 4 次插入7 次删除
  1. 4 7
      ambari-web/app/controllers/main/jobs_controller.js

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

@@ -118,6 +118,7 @@ App.MainJobsController = Em.Controller.extend({
     this.get('filterObject').set('nextFromId', '');
     this.get('filterObject').set('nextFromId', '');
     this.get('filterObject').set('backFromId', '');
     this.get('filterObject').set('backFromId', '');
     this.get('filterObject').set('fromTs', '');
     this.get('filterObject').set('fromTs', '');
+    this.set('hasNewJobs', false);
     this.set('resetPagination', true);
     this.set('resetPagination', true);
     this.loadJobs();
     this.loadJobs();
   },
   },
@@ -361,13 +362,9 @@ App.MainJobsController = Em.Controller.extend({
     var lastReceivedID = data.entities[0].entity;
     var lastReceivedID = data.entities[0].entity;
     if(this.get('lastJobID') == '') {
     if(this.get('lastJobID') == '') {
       this.set('lastJobID', lastReceivedID);
       this.set('lastJobID', lastReceivedID);
-    } else {
-      if (this.get('lastJobID') !== lastReceivedID) {
-        this.set('lastJobID', lastReceivedID);
-        this.set('hasNewJobs', true);
-      }else{
-        this.set('hasNewJobs', false);
-      }
+    } else if (this.get('lastJobID') !== lastReceivedID) {
+      this.set('lastJobID', lastReceivedID);
+      this.set('hasNewJobs', true);
     }
     }
   },
   },