1 <%# Work unit status %>
7 This <%= wu.title %> is paused. Children that are already running
8 will continue to run, but no new processes will be submitted.
12 <%= raw(wu.show_runtime) %>
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 %>
21 <div class="col-md-3">
22 <%= render partial: 'work_units/progress', locals: {wu: wu} %>
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"} %>
36 <%= render(partial: 'work_units/component_detail', locals: {current_obj: wu}) %>
39 <%# Work unit children %>
42 uuids = wu.children.collect {|c| c.uuid}.compact
44 resource_class = resource_class_for_uuid(uuids.first, friendly_name: true)
47 while start < uuids.length
48 preload_objects_for_dataclass resource_class, uuids[start, inc]
53 collections = wu.outputs.flatten.uniq
54 collections << wu.log_collection if wu.log_collection
55 collections << wu.docker_image if wu.docker_image
56 collections = wu.children.collect {|j| j.outputs}.compact
57 collections = collections.flatten.uniq
58 collections.concat wu.children.collect {|j| j.docker_image}.uniq.compact
59 collections.concat wu.children.collect {|j| j.log_collection}.uniq.compact
60 collections_pdhs = collections.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact
61 collections_uuids = collections - collections_pdhs
63 if collections_uuids.any?
65 while start < collections_uuids.length
66 preload_collections_for_objects collections_uuids[start, inc]
71 if collections_pdhs.any?
73 while start < collections_pdhs.length
74 preload_for_pdhs collections_pdhs[start, inc]
79 repos = wu.children.collect {|c| c.repository}.uniq.compact
80 preload_objects_for_dataclass(Repository, repos, :name) if repos.any?
83 <% if wu.has_unreadable_children %>
84 <%= render(partial: "pipeline_instances/show_components_json",
85 locals: {error_name: "Unreadable components", backtrace: nil, wu: wu}) %>
87 <% @descendent_count = 0 if !@descendent_count %>
88 <% wu.children.each do |c| %>
89 <% @descendent_count += 1 %>
90 <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: @descendent_count, expanded: false}) %>