From c66b82f901113491f8a16a046ee52fb40d8d2939 Mon Sep 17 00:00:00 2001 From: radhika Date: Thu, 22 May 2014 08:08:47 -0400 Subject: [PATCH] 2756: display log file for a finished job. --- .../_show_components.html.erb | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) 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 e6905cf725..c3a4edd51c 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? %>

Log for pipeline

<% log_history = pipieline_log_history(pipeline_job_uuids) %> +
<% log_history.each do |entry| %> <%=entry.summary%>
<% end %> +
"/> <% end %> + <% else %> <%# Not running. Must be done. %> +

Log for pipeline

+
+ <% 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| %> + <%=j[:uuid]%> Log + <% end %> + <% end %> + <% end %> + <% end %> +
<% end %> -<% end %> -<% else %> +<% else %> <%# State new or ready or paused %> <% if @object.state == 'New' %>

Please set the desired input parameters for the components of this pipeline. Parameters highlighted in red are required.

<% end %> -- 2.30.2