Browse Source

HUE-7349 [jb] New jobs are not inserted without a page refresh on an empty page

Romain Rigaux 8 năm trước cách đây
mục cha
commit
299ce5aae5
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

+ 2 - 2
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -2254,8 +2254,8 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
             var i = 0, j = 0;
             var newJobs = [];
 
-            while (i < self.apps().length && j < data.apps.length) {
-              if (self.apps()[i].id() != data.apps[j].id) {
+            while ((self.apps().length == 0 || i < self.apps().length) && j < data.apps.length) { // Nothing displayed or compare existing
+              if (self.apps().length == 0 || self.apps()[i].id() != data.apps[j].id) {
                 // New Job
                 newJobs.push(new Job(vm, data.apps[j]));
                 j++;