ソースを参照

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 12 年 前
コミット
299c390be4
2 ファイル変更4 行追加2 行削除
  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>
               <a href="#"><i class="fa fa-edit"></i> ${ _('Pig') }</a>
             </li>
             </li>
             <li data-bind="click: editScriptProperties" data-section="properties">
             <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>
             <li data-bind="click: saveScript">
             <li data-bind="click: saveScript">
               <a href="#" title="${ _('Save the script') }" rel="tooltip" data-placement="right">
               <a href="#" title="${ _('Save the script') }" rel="tooltip" data-placement="right">
@@ -525,7 +525,7 @@ ${ commonheader(None, "pig", user) | n,unicode }
               </div>
               </div>
             </div>
             </div>
           </script>
           </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>
           <pre id="withLogs" class="hide scroll"></pre>
         </div>
         </div>
       </div>
       </div>

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

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