X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7f5a540ea4b1bad1a7b1646543e0cd48ff2af7ba..9e9edda09864405897ec816c9a080c5545642d11:/apps/workbench/app/views/work_unit/_component_detail.html.erb diff --git a/apps/workbench/app/views/work_unit/_component_detail.html.erb b/apps/workbench/app/views/work_unit/_component_detail.html.erb index 045154a220..19c7f224f6 100644 --- a/apps/workbench/app/views/work_unit/_component_detail.html.erb +++ b/apps/workbench/app/views/work_unit/_component_detail.html.erb @@ -1,10 +1,17 @@
+ <% if current_obj.uuid.nil? %> + No <%= current_obj.title %> has been submitted yet. + <% else %> - <% [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :priority].each do |k| %> + <% keys = [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :priority] %> + <% keys << :outputs if @object.uuid == current_obj.uuid %> + <% keys.each do |k| %> <% val = current_obj.send(k) if current_obj.respond_to?(k) %> - <% unless val.nil? %> + <% has_val = val %> + <% has_val = val.andand.any? if k == :outputs %> + <% if has_val %>
<%= k.to_s %>: @@ -16,6 +23,12 @@ <%= link_to_arvados_object_if_readable(val, val, friendly_name: true) %> <% elsif k.to_s.end_with? '_at' %> <%= render_localized_date(val) %> + <% elsif k == :outputs and val.any? %> + <% if val.size == 1 %> + <%= link_to_arvados_object_if_readable(val[0], 'Output data not available', friendly_name: true) %> + <% else %> + <%= render partial: 'work_unit/show_outputs', locals: {id: current_obj.uuid, outputs: val, align:""} %> + <% end %> <% else %> <%= val %> <% end %> @@ -24,6 +37,7 @@ <% end %> <% end %>
+ <% end %>
@@ -38,7 +52,7 @@ %> <% [:script, :repository, :script_version, :supplied_script_version, :nondeterministic].each do |k| %> <% val = current_obj.send(k) if current_obj.respond_to?(k) %> - <% unless val.nil? %> + <% if val %>
<%= k.to_s %>: @@ -79,7 +93,8 @@
- <% unless current_obj.parameters.nil? %> + + <% if current_obj.parameters and !current_obj.parameters.empty? %>

script_parameters:

@@ -88,4 +103,3 @@
<% end %>
-