Merge branch 'master' into 9998-no-count-items-available
[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-warning', 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 <% if wu.has_unreadable_children %>
41   <%= render(partial: "pipeline_instances/show_components_json",
42              locals: {error_name: "Unreadable components", backtrace: nil, wu: wu}) %>
43 <% else %>
44   <% wu.children.each do |c| %>
45     <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: (c.uuid || rand(2**128).to_s(36)), expanded: false}) %>
46   <% end %>
47 <% end %>