[ARVADOS] updated: 2328a5363e90f2588113cc6ea76329ef93197ca0

git at public.curoverse.com git at public.curoverse.com
Thu May 22 09:51:44 EDT 2014


Summary of changes:
 .../app/helpers/pipeline_instances_helper.rb       |  8 ++++++--
 .../pipeline_instances/_show_components.html.erb   | 24 ++++++++++++++++++----
 2 files changed, 26 insertions(+), 6 deletions(-)

       via  2328a5363e90f2588113cc6ea76329ef93197ca0 (commit)
       via  c66b82f901113491f8a16a046ee52fb40d8d2939 (commit)
      from  ea17ec3d053bd2f792730c5ea74d03109ef942ce (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2328a5363e90f2588113cc6ea76329ef93197ca0
Author: radhika <radhika at curoverse.com>
Date:   Thu May 22 09:45:14 2014 -0400

    2657: when displaying log in window, handle new lines

diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index db2a467..5a163c4 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -26,9 +26,13 @@ module PipelineInstancesHelper
     results = []
 
     log_history = Log.where(event_type: 'transient-log-entry',
-                            object_uuid: job_uuids).order('id DESC').limit(5).all
+                            object_uuid: job_uuids).order('id DESC').limit(20).all
     if !log_history.results.empty?
-      results = log_history.results.reverse
+      reversed_results = log_history.results.reverse
+      reversed_results.each do |entry|
+        summary = entry.summary
+        results = results.concat summary.split("\n")
+      end
     end
 
     return results
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index c3a4edd..98049bf 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -97,7 +97,7 @@ setInterval(function(){$('a.refresh').click()}, 15000);
       <% log_history = pipieline_log_history(pipeline_job_uuids) %>
       <div id="pipeline_event_log_history_div">
         <% log_history.each do |entry| %>
-          <%=entry.summary%><br/>
+          <%=entry%><br/>
         <% end %>
       </div>
       <div class="arv-log-event-listener arv-log-event-handler-append-logs" id="pipeline_event_log_div" data-object-uuids="<%=pipeline_job_uuids.join(" ")%>"/>

commit c66b82f901113491f8a16a046ee52fb40d8d2939
Author: radhika <radhika at curoverse.com>
Date:   Thu May 22 08:08:47 2014 -0400

    2756: display log file for a finished job.

diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index e6905cf..c3a4edd 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -16,6 +16,7 @@
   <% end %>
 <% end %>
 
+<% pipeline_jobs = [] %>
 <% pipeline_job_uuids = [] %>
 
 <% if !@object.state.in? ['New', 'Ready', 'Paused'] %>
@@ -53,6 +54,7 @@
                                locals: { :j => pj[:job], :title => pj[:name] }) %>
         <% if pj[:job].andand[:uuid] %>
           <%= link_to(job_status, job_url(id: pj[:job][:uuid])) %>
+          <% pipeline_jobs << pj[:job] %>
           <% pipeline_job_uuids << pj[:job][:uuid] %>
         <% else %>
           <%= job_status %>
@@ -90,19 +92,33 @@ setInterval(function(){$('a.refresh').click()}, 15000);
   <% end %>
 <% end %>
 
-  <% if !@object.state.in? ['Complete', 'Failed'] %>
     <% if !pipeline_job_uuids.empty? %>
       <h4>Log for pipeline</h4>
       <% log_history = pipieline_log_history(pipeline_job_uuids) %>
+      <div id="pipeline_event_log_history_div">
         <% log_history.each do |entry| %>
           <%=entry.summary%><br/>
         <% end %>
+      </div>
       <div class="arv-log-event-listener arv-log-event-handler-append-logs" id="pipeline_event_log_div" data-object-uuids="<%=pipeline_job_uuids.join(" ")%>"/>
     <% end %>
+  <% else %>      <%# Not running. Must be done. %>
+    <h4>Log for pipeline</h4>
+    <div id="pipeline_event_log_history_div">
+    <% pipeline_jobs.each do |j| %>
+      <% if j[:log] %>
+        <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(j[:log])%>
+        <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
+          <% c.files.each do |file| %>
+            <a href="<%= collection_path(j[:log]) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>"><%=j[:uuid]%> Log</a>
+          <% end %>
+        <% end %>
+      <% end %>
+    <% end %>
+    </div>
   <% end %>
-<% end %>
 
-<% else %>
+<% else %>    <%# State new or ready or paused %>
   <% if @object.state == 'New' %>
     <p>Please set the desired input parameters for the components of this pipeline.  Parameters highlighted in red are required.</p>
   <% end %>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list