Browse Source

HUE-1643 [pig] Progress does not update

Fixed logs refresh trigger that failed on slow submissions
Enrico Berti 12 years ago
parent
commit
8e0583d911
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/pig/static/js/pig.ko.js

+ 1 - 1
apps/pig/static/js/pig.ko.js

@@ -509,7 +509,6 @@ var PigViewModel = function (props) {
     self.currentScript(script);
     $(document).trigger("showLogs");
     $(document).trigger("running");
-    $(document).trigger("startLogsRefresh");
     $("#submitModal").modal("hide");
     $.post(self.RUN_URL,
         {
@@ -528,6 +527,7 @@ var PigViewModel = function (props) {
           }
           script.isRunning(true);
           script.watchUrl(data.watchUrl);
+          $(document).trigger("startLogsRefresh");
           $(document).trigger("refreshDashboard");
           self.updateScripts();
         }, "json").fail( function(xhr, textStatus, errorThrown) {