<% if row[:components][x] %>
<% pj = render_pipeline_job row[:components][x] %>
<%= link_to_if_arvados_object pj[:job_id], {friendly_name: true, with_class_name: true}, {class: 'deemphasize'} %>
<% %w(script script_version script_parameters output).each do |key| %>
<% unless key=='output' and pj[:result] != 'complete' %>
<% val = pj[key.to_sym] || pj[:job].andand[key.to_sym] %>
<% link_name = case
when !val
val = ''
when key == 'script_version' && val.match(/^[0-9a-f]{7,}$/)
val = val[0..7] # TODO: leave val alone, make link_to handle git commits
when key == 'output'
val.sub! /\+K.*$/, ''
val[0..12]
when key == 'script_parameters'
val = val.keys.sort.join(', ')
end
%>
<%= key %>: <%= link_to_if_arvados_object val, {friendly_name: true, link_text: link_name} %>
<% end %>
<% end %>
<% else %>
None
<% end %>