X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f3658ececac430166ee9766be1deee6a61153d0f..c554b80187e6e076cbf147b1abb34ed9eb36ce93:/apps/workbench/app/models/work_unit.rb diff --git a/apps/workbench/app/models/work_unit.rb b/apps/workbench/app/models/work_unit.rb index 00f1435de5..b83847ea92 100644 --- a/apps/workbench/app/models/work_unit.rb +++ b/apps/workbench/app/models/work_unit.rb @@ -1,6 +1,5 @@ class WorkUnit - # This is just an abstract class that documents the WorkUnit interface; a - # class can implement the interface without being a subclass of WorkUnit. + # This is an abstract class that documents the WorkUnit interface def label # returns the label that was assigned when creating the work unit @@ -39,12 +38,12 @@ class WorkUnit end def success? - # returnis true if the work unit finished successfully, + # returns true if the work unit finished successfully, # false if it has a permanent failure, # and nil if the final state is not determined. end - def progress + def progress # returns a number between 0 and 1 end @@ -60,8 +59,8 @@ class WorkUnit # returns script for this work unit, if any end - def script_repository - # returns this work unit's script_repository, if any + def repository + # returns this work unit's script repository, if any end def script_version @@ -91,4 +90,77 @@ class WorkUnit def output # returns uuid or pdh of output data, if any end + + def child_summary + # summary status of any children of this work unit + end + + def child_summary_str + # textual representation of child summary + end + + def can_cancel? + # returns true if this work unit can be canceled + end + + def readable? + # is the proxied object readable by current user? + end + + def uri + # returns the uri for this work unit + end + + def title + # title for the work unit + end + + def has_unreadable_children + # accept it if you can't understand your own children + 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 + + def cputime + # return cputime for a running or completed work unit + end + + def queuedtime + # 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 + + def is_paused? + # is the work unit in paused state? + end + + def is_finished? + # is the work unit in finished state? + end + + def is_failed? + # is this work unit in failed state? + end + + def ran_for_str + # display string for how long it has run + end + + def started_and_active_for_str + # display string for how long it has been active + end end