Browse Source

HUE-8732 [jb] Force Knockout to handle the update of rerunModalContent before trying to modify its DOM

Ivan Dzikovsky 6 years ago
parent
commit
9fd8b2d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

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

@@ -3151,6 +3151,8 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
           $.get('/oozie/rerun_oozie_coord/' + vm.job().id() + '/?format=json' + '${ "&is_mini=true" if is_mini else "" | n }', function(response) {
           $.get('/oozie/rerun_oozie_coord/' + vm.job().id() + '/?format=json' + '${ "&is_mini=true" if is_mini else "" | n }', function(response) {
             $('#rerun-modal${ SUFFIX }').modal('show');
             $('#rerun-modal${ SUFFIX }').modal('show');
             vm.job().rerunModalContent(response);
             vm.job().rerunModalContent(response);
+            // Force Knockout to handle the update of rerunModalContent before trying to modify its DOM
+            ko.tasks.runEarly();
 
 
             var frag = document.createDocumentFragment();
             var frag = document.createDocumentFragment();
             vm.job().coordinatorActions().selectedJobs().forEach(function (item) {
             vm.job().coordinatorActions().selectedJobs().forEach(function (item) {