Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / work_units / _show_child.html.erb
index 2693334bc21404b0631e313d08a73311cd369f91..53f3e43da27318b6a6fb30019b0b043519e81fb4 100644 (file)
@@ -1,10 +1,14 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <div class="panel panel-default">
   <div class="panel-heading">
       <div class="row">
-        <div class="col-md-2" style="word-break:break-all;">
+        <div class="col-md-3" style="word-break:break-all;">
           <h4 class="panel-title">
-            <a data-toggle="collapse" href="#collapse<%= i %>">
-              <%= current_obj.label %> <span class="caret"></span>
+            <a class="component-detail-panel" data-toggle="collapse" href="#collapse<%= i %>">
+              <%= current_obj.label %> <span class="caret" href="#collapse<%= i %>"></span>
             </a>
           </h4>
         </div>
         </div>
 
         <% if not current_obj %>
-          <div class="col-md-8"></div>
+          <div class="col-md-7"></div>
         <% else %>
-          <div class="col-md-1">
-            <%= render partial: 'work_units/show_log_link', locals: {wu: current_obj} %>
-          </div>
-
           <% walltime = current_obj.walltime %>
           <% cputime = current_obj.cputime %>
+          <% runningtime = current_obj.runningtime %>
           <div class="col-md-3">
           <% if walltime and cputime %>
-            <%= render_runtime(walltime, false) %>
-            <% if cputime > 0 %> / <%= render_runtime(cputime, false) %> (<%= (cputime/walltime).round(1) %>&Cross;)<% end %>
+            <%= render_runtime([walltime, runningtime].max, false) %>
+            <% if cputime > 0 %> / <%= render_runtime(cputime, false) %> (<%= (cputime/runningtime).round(1) %>&Cross;)<% end %>
           <% end %>
           </div>
 
                 <%= current_obj.child_summary_str %>
               </span>
             </div>
-          <% elsif current_obj.is_finished? %>
-            <div class="col-md-3 text-overflow-ellipsis">
-              <% outputs = current_obj.outputs %>
-              <% if outputs.any? %>
-                <% if outputs.size == 1 %>
-                  <%= link_to_arvados_object_if_readable(outputs[0], 'Output data not available', link_text: "Output of #{current_obj.label}") %>
-                <% else %>
-                  <%= render partial: 'work_units/show_outputs', locals: {id: current_obj.uuid, outputs: outputs, align:"pull-right"} %>
-                <% end %>
-              <% else %>
-                No output.
-              <% end %>
-            </div>
           <% end %>
 
           <div class="col-md-1 pipeline-instance-spacing">
           <% if current_obj.can_cancel? and @object.editable? %>
               <%= form_tag "#{current_obj.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-child-button"} %>
+                <%= button_tag "Cancel", {class: 'btn btn-xs btn-warning', id: "cancel-child-button"} %>
               <% end %>
           <% end %>
           </div>
@@ -67,9 +55,9 @@
       </div>
   </div>
 
-  <div id="collapse<%= i %>" class="panel-collapse collapse <%= if expanded then 'in' end %>">
-    <div class="panel-body">
-      <%= render partial: 'work_units/show_component', locals: {wu: current_obj} %>
+  <% content_url = url_for(controller: :work_units, action: :show_child_component, id: @object.uuid, object_type: @object.class.to_s) %>
+  <div id="collapse<%=i%>" class="work-unit-component-detail panel-collapse collapse <%= if expanded then 'in' end %>" content-url="<%=content_url%>" action-data="<%={current_obj_type: current_obj.class.to_s, current_obj_uuid: current_obj.uuid, current_obj_name: current_obj.label, current_obj_parent: current_obj.parent}.to_json%>">
+    <div class="panel-body work-unit-component-detail-body">
     </div>
   </div>
 </div>