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