20259: Add documentation for banner and tooltip features
[arvados.git] / apps / workbench / app / models / job_work_unit.rb
index 43918099119fd0968ae745074a3d98c10c67c415..83825a533849fea023482d12bafeac8c88db76d8 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class JobWorkUnit < ProxyWorkUnit
   def children
     return @my_children if @my_children
@@ -73,12 +77,7 @@ class JobWorkUnit < ProxyWorkUnit
 
   def outputs
     items = []
-    children.each do |c|
-      items.concat c.outputs
-    end
-    if !items.any?
-      items << get(:output) if get(:output)
-    end
+    items << get(:output) if get(:output)
     items
   end
 
@@ -86,6 +85,10 @@ class JobWorkUnit < ProxyWorkUnit
     state_label.in? ["Queued", "Running"]
   end
 
+  def confirm_cancellation
+    "All unfinished child jobs and pipelines will also be canceled, even if they are being used in another job or pipeline. Are you sure you want to cancel this job?"
+  end
+
   def uri
     uuid = get(:uuid)
     "/jobs/#{uuid}"