Bläddra i källkod

HUE-8645 [assist] Refresh namespaces when a cluster is killed

Johan Ahlen 7 år sedan
förälder
incheckning
ecbde74
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6 3
      apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

+ 6 - 3
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -3022,7 +3022,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
       };
 
       self.control = function (action) {
-        if (action == 'rerun') {
+        if (action === 'rerun') {
           $.get('/oozie/rerun_oozie_coord/' + vm.job().id() + '/?format=json', function(response) {
             $('#rerun-modal${ SUFFIX }').modal('show');
             vm.job().rerunModalContent(response);
@@ -3038,7 +3038,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
             $('#id_actions').find('option').remove();
             $(frag).appendTo('#id_actions');
           });
-        } else if (action == 'ignore') {
+        } else if (action === 'ignore') {
           $.post('/oozie/manage_oozie_jobs/' + vm.job().id() + '/ignore', {
             actions: $.map(vm.job().coordinatorActions().selectedJobs(), function(wf) {
               return wf.properties.number();
@@ -3067,10 +3067,13 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
           interface: ko.mapping.toJSON(vm.interface),
           operation: ko.mapping.toJSON({action: action})
         }, function (data) {
-          if (data.status == 0) {
+          if (data.status === 0) {
             if (callback) {
               callback(data);
             }
+            if (vm.interface().indexOf('clusters') !== -1 && action === 'kill') {
+              huePubSub.publish('context.catalog.refresh');
+            }
           } else {
             $(document).trigger("error", data.message);
           }