<% pi = PipelineInstance.order("created_at desc").filter([["components", "like", "%#{@object.uuid}%"]]) %>
<% pi.each do |pipeline| %>
<% pipeline.components.each do |k, v| %>
<% if v[:job] and v[:job][:uuid] == @object.uuid %>
<%= k %>
component of
<%= link_to_if_arvados_object pipeline, friendly_name: true %>
created at
<%= render_localized_date(pipeline.created_at) %>.
<% end %>
<% end %>
<% end %>
<% jobs = Job.order("created_at desc").filter([["components", "like", "%#{@object.uuid}%"]]).limit(10) %>
<%
too_many_message = ""
if jobs.items_available > jobs.results.size
too_many_message = (jobs.items_available - jobs.results.size).to_s + ' more jobs are not listed.'
end
%>
<% if too_many_message != "" %>
<%= too_many_message %>
<% end %>
<% jobs.each do |j| %>
<% j.components.each do |k, v| %>
<% if v == @object.uuid %>
<%= k %>
component of
<%= link_to_if_arvados_object j, friendly_name: true %>
created at
<%= render_localized_date(j.created_at) %>.
<% end %>
<% end %>
<% end %>