1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <%= render(partial: 'work_units/show_status', locals: {current_obj: @object, name: @object[:name] || 'this job'}) %>
7 <div class="panel panel-default">
8 <div class="panel-heading">
9 <span class="panel-title">Used in pipelines</span>
11 <div class="panel-body used-in-pipelines">
12 <% pi = PipelineInstance.order("created_at desc").filter([["components", "like", "%#{@object.uuid}%"]]) %>
14 <% pi.each do |pipeline| %>
15 <% pipeline.components.each do |k, v| %>
16 <% if v[:job] and v[:job][:uuid] == @object.uuid %>
20 <%= link_to_if_arvados_object pipeline, friendly_name: true %>
22 <%= render_localized_date(pipeline.created_at) %>.
29 <div class="panel-heading">
30 <span class="panel-title">Used in jobs</span>
33 <% jobs = Job.order("created_at desc").filter([["components", "like", "%#{@object.uuid}%"]]).limit(10) %>
36 if jobs.items_available > jobs.results.size
37 too_many_message = (jobs.items_available - jobs.results.size).to_s + ' more jobs are not listed.'
40 <div class="panel-body used-in-jobs">
41 <% if too_many_message != "" %>
42 <p><i><%= too_many_message %></i></p>
44 <% jobs.each do |j| %>
45 <% j.components.each do |k, v| %>
46 <% if v == @object.uuid %>
50 <%= link_to_if_arvados_object j, friendly_name: true %>
52 <%= render_localized_date(j.created_at) %>.