X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a4f061a5bf48f0335238da72b8d03ca349fa7553..c554b80187e6e076cbf147b1abb34ed9eb36ce93:/apps/workbench/app/models/work_unit.rb?ds=sidebyside diff --git a/apps/workbench/app/models/work_unit.rb b/apps/workbench/app/models/work_unit.rb index 4353352b7f..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 @@ -92,19 +91,76 @@ class WorkUnit # 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 if this work unit is cancelable + # returns true if this work unit can be canceled end - def uri - # returns the uri for this work unit + def readable? + # is the proxied object readable by current user? end - def child_summary - # summary status of any children of this work unit + 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