Explorar o código

HUE-1968 [pig] Resubmission of a failed script seems to hang

Improved response time for the screen reset
Fixed properties icon
Spinner is hidden when the script is not running
Enrico Berti %!s(int64=11) %!d(string=hai) anos
pai
achega
299c390be4
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  1. 2 2
      apps/pig/src/pig/templates/app.mako
  2. 2 0
      apps/pig/static/js/pig.ko.js

+ 2 - 2
apps/pig/src/pig/templates/app.mako

@@ -116,7 +116,7 @@ ${ commonheader(None, "pig", user) | n,unicode }
               <a href="#"><i class="fa fa-edit"></i> ${ _('Pig') }</a>
             </li>
             <li data-bind="click: editScriptProperties" data-section="properties">
-              <a href="#"><i class="fa fa-reorder"></i> ${ _('Properties') }</a>
+              <a href="#"><i class="fa fa-bars"></i> ${ _('Properties') }</a>
             </li>
             <li data-bind="click: saveScript">
               <a href="#" title="${ _('Save the script') }" rel="tooltip" data-placement="right">
@@ -525,7 +525,7 @@ ${ commonheader(None, "pig", user) | n,unicode }
               </div>
             </div>
           </script>
-          <pre id="withoutLogs">${ _('No available logs.') } <img src="/static/art/spinner.gif"/></pre>
+          <pre id="withoutLogs">${ _('No available logs.') } <img src="/static/art/spinner.gif" data-bind="visible: currentScript().isRunning()"/></pre>
           <pre id="withLogs" class="hide scroll"></pre>
         </div>
       </div>

+ 2 - 0
apps/pig/static/js/pig.ko.js

@@ -508,6 +508,8 @@ var PigViewModel = function (props) {
   function callRun(script) {
     self.currentScript(script);
     $(document).trigger("clearLogs");
+    script.isRunning(true);
+    script.actions([]);
     $(document).trigger("showLogs");
     $(document).trigger("running");
     $("#submitModal").modal("hide");