Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / views / work_units / _show_component.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%# Work unit status %>
6
7 <div class="row">
8   <div class="col-md-4">
9     <% if wu.is_paused? %>
10       <p>
11         This <%= wu.title %> is paused. Children that were running
12         were cancelled and no new processes will be submitted.
13       </p>
14     <% end %>
15
16     <%= raw(wu.show_runtime) %>
17   </div>
18   <%# Need additional handling for main object display  %>
19   <% if @object.uuid == wu.uuid %>
20     <div class="col-md-3">
21       <% if wu.is_running? and wu.child_summary_str %>
22         <%= wu.child_summary_str %>
23       <% end %>
24     </div>
25     <div class="col-md-3">
26       <%= render partial: 'work_units/progress', locals: {wu: wu} %>
27     </div>
28     <div class="col-md-2">
29       <% if wu.can_cancel? and @object.editable? %>
30         <% confirm = if wu.confirm_cancellation then {confirm: wu.confirm_cancellation} else {} end %>
31         <%= form_tag "#{wu.uri}/cancel", remote: true, style: "display:inline; padding-left: 1em" do |f| %>
32           <%= hidden_field_tag :return_to, url_for(@object) %>
33           <%= button_tag "Cancel", {class: 'btn btn-xs btn-warning', id: "cancel-obj-button", data: confirm} %>
34         <% end %>
35       <% end %>
36     </div>
37   <% end %>
38 </div>
39
40 <p>
41   <%= render(partial: 'work_units/component_detail', locals: {current_obj: wu}) %>
42 </p>
43
44 <%# Work unit children %>
45 <% if wu.has_unreadable_children %>
46   <%= render(partial: "pipeline_instances/show_components_json",
47              locals: {error_name: "Unreadable components", backtrace: nil, wu: wu}) %>
48 <% else %>
49   <% wu.children.each do |c| %>
50     <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: (c.uuid || rand(2**128).to_s(36)), expanded: false}) %>
51   <% end %>
52 <% end %>