Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / models / work_unit.rb
index f6c1f61d111f3ae249f43f475691503bbedb79c3..493dd2f578a213afcd348fb0a2a1cca035592c03 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class WorkUnit
   # This is an abstract class that documents the WorkUnit interface
 
@@ -9,6 +13,10 @@ class WorkUnit
     # returns the arvados UUID of the underlying object
   end
 
+  def parent
+    # returns the parent uuid of this work unit
+  end
+
   def children
     # returns an array of child work units
   end
@@ -17,10 +25,18 @@ class WorkUnit
     # returns uuid of the user who modified this work unit most recently
   end
 
+  def owner_uuid
+    # returns uuid of the owner of this work unit
+  end
+
   def created_at
     # returns created_at timestamp
   end
 
+  def modified_at
+    # returns modified_at timestamp
+  end
+
   def started_at
     # returns started_at timestamp for this work unit
   end
@@ -33,6 +49,10 @@ class WorkUnit
     # returns a string representing state of the work unit
   end
 
+  def exit_code
+    # returns the work unit's execution exit code
+  end
+
   def state_bootstrap_class
     # returns a class like "danger", "success", or "warning" that a view can use directly to make a display class
   end
@@ -87,8 +107,8 @@ class WorkUnit
     # returns if this is nondeterministic
   end
 
-  def output
-    # returns uuid or pdh of output data, if any
+  def outputs
+    # returns array containing uuid or pdh of output data
   end
 
   def child_summary
@@ -103,8 +123,8 @@ class WorkUnit
     # returns true if this work unit can be canceled
   end
 
-  def readable?
-    # is the proxied object readable by current user?
+  def confirm_cancellation
+    # returns true if this work unit wants to use a confirmation for cancellation
   end
 
   def uri
@@ -120,10 +140,6 @@ class WorkUnit
   end
 
   # view helper methods
-  def link_to_log
-    # display a link to log if present
-  end
-
   def walltime
     # return walltime for a running or completed work unit
   end
@@ -136,10 +152,6 @@ class WorkUnit
     # return queued time if the work unit is queued
   end
 
-  def show_child_summary
-    # child summary for a running work unit
-  end
-
   def is_running?
     # is the work unit in running state?
   end
@@ -155,4 +167,52 @@ class WorkUnit
   def is_failed?
     # is this work unit in failed state?
   end
+
+  def command
+    # command to execute
+  end
+
+  def cwd
+    # initial workind directory
+  end
+
+  def environment
+    # environment variables
+  end
+
+  def mounts
+    # mounts
+  end
+
+  def output_path
+    # path to a directory or file to save output
+  end
+
+  def container_uuid
+    # container_uuid of a container_request
+  end
+
+  def requesting_container_uuid
+    # requesting_container_uuid of a container_request
+  end
+
+  def log_object_uuids
+    # object uuids for live log
+  end
+
+  def live_log_lines(limit)
+    # fetch log entries from logs table for @proxied
+  end
+
+  def render_log
+    # return partial and locals to be rendered
+  end
+
+  def template_uuid
+    # return the uuid of this work unit's template, if one exists
+  end
+
+  def runtime_status
+    # Returns this work unit's runtime_status, if any
+  end
 end