X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ad4fcf639b3a75ddd40aeb659b090c9037d3507e..d43fb929ea2fdf984a86bc00c257e989e4b7a88c:/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb?ds=inline
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
index a41fdd1e2c..9f46e3da1c 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
@@ -23,42 +23,41 @@
<% render_pipeline_jobs.each do |pj| %>
- <% if pj[:job].andand[:uuid]
- pipeline_job_uuids << pj[:job][:uuid]
- end %>
-
-
- <%= pj[:name] %>
- |
- <%= pj[:script] %>
- <%= pj[:script_version] %>
- |
- <%= render(partial: 'job_status_label', locals: { j: pj[:job] }) %>
- |
- <%= pj[:progress_bar] %>
- |
- <% current_job = Job.find(pj[:job][:uuid]) rescue nil %>
-
- <% if current_job %>
- <%= render partial: 'show_object_button', locals: {object: current_job, size: 'xs', link_text: 'Show job details'} %>
- <% end %>
- |
- <% if current_job.andand[:log] %>
- <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
- <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
- <% c.files.first.andand do |file| %>
- <%= link_to url_for(controller: 'collections', action: 'show_file', uuid: current_job[:log], file: "#{file[0]}/#{file[1]}", disposition: 'inline', size: file[2]), class: 'btn btn-default btn-xs' do %>
- Show log messages
+ |
+
+ <%= pj[:name] %>
+ |
+ <%= pj[:script] %>
+ <%= pj[:script_version] %>
+ |
+ <%= render(partial: 'job_status_label', locals: { j: pj[:job] }) %>
+ |
+ <%= pj[:progress_bar] %>
+ |
+ <% current_job = pj[:job] rescue nil %>
+
+ <% if current_job.is_a? Job %>
+ <%= render partial: 'show_object_button', locals: {object: current_job, size: 'xs', link_text: 'Show job details'} %>
+ <% end %>
+ |
+ <% if current_job.andand[:log] %>
+ <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
+ <% Collection.limit(1).where(portable_data_hash: fixup[1]).each do |c| %>
+ <% c.files.first.andand do |file| %>
+ <%= link_to url_for(controller: 'collections', action: 'show_file', uuid: current_job[:log], file: "#{file[0]}/#{file[1]}", disposition: 'inline', size: file[2]), class: 'btn btn-default btn-xs' do %>
+ Show log messages
+ <% end %>
<% end %>
<% end %>
<% end %>
- <% end %>
- |
- <% if current_job.andand[:output] %>
- <%= link_to_if_arvados_object current_job[:output], {thumbnail: true, link_text: raw(' Show output files')}, {class: 'btn btn-default btn-xs'} %>
- <% end %>
- |
-
+
+ <% if pj[:output_uuid] %>
+ <%= link_to_if_arvados_object pj[:output_uuid], {thumbnail: true, link_text: raw(' Show output files')}, {class: 'btn btn-default btn-xs'} %>
+ <% elsif current_job.andand[:output] %>
+ <%= link_to_if_arvados_object current_job[:output], {thumbnail: true, link_text: raw(' Show output files')}, {class: 'btn btn-default btn-xs'} %>
+ <% end %>
+ |
+
<% end %>