3654: move the checkbox to the left of the row in collection show page. also, fixed...
[arvados.git] / apps / workbench / app / views / jobs / _show_log.html.erb
index 743045c0a1371542cf5b8e558637e6983d190597..b523af81ae45142f8712f2e0028b2a9020d10f8a 100644 (file)
@@ -1,3 +1,14 @@
+<% if !@object.log %>
+
+<% log_history = stderr_log_history([@object.uuid]) %>
+<div class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window" id="pipeline_event_log_div" data-object-uuids="<%= @object.uuid %>">
+  <% log_history.each do |entry| %>
+    <%=entry%><br/>
+  <% end %>
+</div>
+
+<% else %>
+
 <script>
 (function() {
 var pagesize = 1000;
@@ -43,16 +54,16 @@ var makeFilter = function() {
   <% logcollection = Collection.find @object.log %>
   <% if logcollection %>
     $.ajax('<%=j url_for logcollection %>/<%=j logcollection.files[0][1] %>').
-    done(function(data, status, jqxhr) {
-    logViewer.filter();
-    addToLogViewer(logViewer, data.split("\n"), taskState);
-    logViewer.filter(makeFilter());
-    generateJobOverview("#log-viewer-overview", logViewer, taskState);
-    $("#logloadspinner").detach();
-    }).
-    fail(function(jqxhr, status, error) {
-    $("#logloadspinner").detach();
-    });
+       done(function(data, status, jqxhr) {
+           logViewer.filter();
+           addToLogViewer(logViewer, data.split("\n"), taskState);
+           logViewer.filter(makeFilter());
+           generateJobOverview("#log-viewer-overview", logViewer, taskState);
+           $("#log-viewer .spinner").detach();
+       }).
+       fail(function(jqxhr, status, error) {
+           $("#log-viewer .spinner").detach();
+       });
   <% end %>
 <% else %>
   <%# Live log loading not implemented yet. %>
@@ -103,16 +114,8 @@ $("#set-show-failed-only").on("click", function() {
 
   <h3>Summary</h3>
   <p id="log-viewer-overview">
-    <% if !@object.log %>
-      <% if @object.finished_at %>
-        This job did not produce an diagnostic log.
-      <% else %>
-        This job is still running.  The job log will be available when the job is complete.
-      <% end %>
-    <% else %>
-      <% if !logcollection %>
-        The collection containing the job log was not found.
-      <% end %>
+    <% if !logcollection %>
+      The collection containing the job log was not found.
     <% end %>
   </p>
 
@@ -204,7 +207,7 @@ $("#set-show-failed-only").on("click", function() {
     </table>
 
     <% if @object.log and logcollection %>
-      <%= image_tag 'ajax-loader.gif', id: "logloadspinner" %>
+      <div class="spinner spinner-32px"></div>
     <% end %>
 
   </div>
@@ -215,3 +218,5 @@ $("#set-show-failed-only").on("click", function() {
     <a href="#" class="log-viewer-page-down"><span class='glyphicon glyphicon-arrow-down'></span></a>
   </div>
 </div>
+
+<% end %>