9944: Add 'lockfile' to backports and update cwltool dependency
[arvados.git] / apps / workbench / app / views / work_units / _show_component.html.erb
1 <%# Work unit status %>
2
3 <div class="row">
4   <div class="col-md-4">
5     <% if wu.is_paused? %>
6       <p>
7         This <%= wu.title %> is paused. Children that are already running
8         will continue to run, but no new processes will be submitted.
9       </p>
10     <% end %>
11
12     <%= raw(wu.show_runtime) %>
13   </div>
14   <%# Need additional handling for main object display  %>
15   <% if @object.uuid == wu.uuid %>
16     <div class="col-md-3">
17       <% if wu.is_running? and wu.child_summary_str %>
18         <%= wu.child_summary_str %>
19       <% end %>
20     </div>
21     <div class="col-md-3">
22       <%= render partial: 'work_units/progress', locals: {wu: wu} %>
23     </div>
24     <div class="col-md-2">
25       <% if wu.can_cancel? and @object.editable? %>
26         <%= form_tag "#{wu.uri}/cancel", remote: true, style: "display:inline; padding-left: 1em" do |f| %>
27           <%= hidden_field_tag :return_to, url_for(@object) %>
28           <%= button_tag "Cancel", {class: 'btn btn-xs btn-danger', id: "cancel-obj-button"} %>
29         <% end %>
30       <% end %>
31     </div>
32   <% end %>
33 </div>
34
35 <p>
36   <%= render(partial: 'work_units/component_detail', locals: {current_obj: wu}) %>
37 </p>
38
39 <%# Work unit children %>
40
41 <%
42   uuids = wu.children.collect {|c| c.uuid}.compact
43   if uuids.any?
44     resource_class = resource_class_for_uuid(uuids.first, friendly_name: true)
45     preload_objects_for_dataclass resource_class, uuids
46   end
47
48   collections = wu.children.collect {|j| j.outputs}.compact
49   collections = collections.flatten.uniq
50   collections.concat wu.children.collect {|j| j.docker_image}.uniq.compact
51   collections_pdhs = collections.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact
52   collections_uuids = collections - collections_pdhs
53   preload_collections_for_objects collections_uuids if collections_uuids.any?
54   preload_for_pdhs collections_pdhs if collections_pdhs.any?
55 %>
56
57 <% if wu.has_unreadable_children %>
58   <%= render(partial: "pipeline_instances/show_components_json",
59              locals: {error_name: "Unreadable components", backtrace: nil, wu: wu}) %>
60 <% else %>
61   <% @descendent_count = 0 if !@descendent_count %>
62   <% wu.children.each do |c| %>
63     <% @descendent_count += 1 %>
64     <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: @descendent_count, expanded: false}) %>
65   <% end %>
66 <% end %>