Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_components_running.html.erb
index 4343f2e57b5adbb64dfb0fbabe177b9d7f937b7a..60d4c2abc2077e44d3472f6528d6697374829d20 100644 (file)
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <%# Summary %>
 
 <div class="pull-right" style="padding-left: 1em">
@@ -30,6 +34,8 @@
       completed in
     <% elsif @object.state == 'Failed' %>
       failed after
+    <% elsif @object.state == 'Cancelled' %>
+      was cancelled after
     <% else %>
       has been active for
     <% end %>
@@ -66,7 +72,7 @@
     <%
         cputime = pipeline_jobs.map { |j|
         if j[:job][:started_at]
-          (j[:job][:runtime_constraints].andand[:min_nodes] || 1) * ((j[:job][:finished_at] || Time.now()) - j[:job][:started_at])
+          (j[:job][:runtime_constraints].andand[:min_nodes] || 1).to_i * ((j[:job][:finished_at] || Time.now()) - j[:job][:started_at])
         else
           0
         end