10111: Merge branch 'master' into 10111-collection-labels
[arvados.git] / apps / workbench / app / views / work_units / _show_component.html.erb
index 4c0f66095a88251932b6e22febddd64275886256..ff9139221a14b7088fc3ef6f0228c78322a65254 100644 (file)
@@ -4,8 +4,8 @@
   <div class="col-md-4">
     <% if wu.is_paused? %>
       <p>
-        This <%= wu.title %> is paused. Children that are already running
-        will continue to run, but no new processes will be submitted.
+        This <%= wu.title %> is paused. Children that were running
+        were cancelled and no new processes will be submitted.
       </p>
     <% end %>
 
     </div>
     <div class="col-md-2">
       <% if wu.can_cancel? and @object.editable? %>
+        <% confirm = if wu.confirm_cancellation then {confirm: wu.confirm_cancellation} else {} end %>
         <%= form_tag "#{wu.uri}/cancel", remote: true, style: "display:inline; padding-left: 1em" do |f| %>
           <%= hidden_field_tag :return_to, url_for(@object) %>
-          <%= button_tag "Cancel", {class: 'btn btn-xs btn-danger', id: "cancel-obj-button"} %>
+          <%= button_tag "Cancel", {class: 'btn btn-xs btn-warning', id: "cancel-obj-button", data: confirm} %>
         <% end %>
       <% end %>
     </div>
@@ -41,9 +42,7 @@
   <%= render(partial: "pipeline_instances/show_components_json",
              locals: {error_name: "Unreadable components", backtrace: nil, wu: wu}) %>
 <% else %>
-  <% @descendent_count = 0 if !@descendent_count %>
   <% wu.children.each do |c| %>
-    <% @descendent_count += 1 %>
-    <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: @descendent_count, expanded: false}) %>
+    <%= render(partial: 'work_units/show_child', locals: {current_obj: c, i: (c.uuid || rand(2**128).to_s(36)), expanded: false}) %>
   <% end %>
 <% end %>