Merge branch 'master' into 9766-register-workflow
[arvados.git] / apps / workbench / app / models / work_unit.rb
1 class WorkUnit
2   # This is an abstract class that documents the WorkUnit interface
3
4   def label
5     # returns the label that was assigned when creating the work unit
6   end
7
8   def uuid
9     # returns the arvados UUID of the underlying object
10   end
11
12   def children
13     # returns an array of child work units
14   end
15
16   def modified_by_user_uuid
17     # returns uuid of the user who modified this work unit most recently
18   end
19
20   def owner_uuid
21     # returns uuid of the owner of this work unit
22   end
23
24   def created_at
25     # returns created_at timestamp
26   end
27
28   def modified_at
29     # returns modified_at timestamp
30   end
31
32   def started_at
33     # returns started_at timestamp for this work unit
34   end
35
36   def finished_at
37     # returns finished_at timestamp
38   end
39
40   def state_label
41     # returns a string representing state of the work unit
42   end
43
44   def exit_code
45     # returns the work unit's execution exit code
46   end
47
48   def state_bootstrap_class
49     # returns a class like "danger", "success", or "warning" that a view can use directly to make a display class
50   end
51
52   def success?
53     # returns true if the work unit finished successfully,
54     # false if it has a permanent failure,
55     # and nil if the final state is not determined.
56   end
57
58   def progress
59     # returns a number between 0 and 1
60   end
61
62   def log_collection
63     # returns uuid or pdh with saved log data, if any
64   end
65
66   def parameters
67     # returns work unit parameters, if any
68   end
69
70   def script
71     # returns script for this work unit, if any
72   end
73
74   def repository
75     # returns this work unit's script repository, if any
76   end
77
78   def script_version
79     # returns this work unit's script_version, if any
80   end
81
82   def supplied_script_version
83     # returns this work unit's supplied_script_version, if any
84   end
85
86   def docker_image
87     # returns this work unit's docker_image, if any
88   end
89
90   def runtime_constraints
91     # returns this work unit's runtime_constraints, if any
92   end
93
94   def priority
95     # returns this work unit's priority, if any
96   end
97
98   def nondeterministic
99     # returns if this is nondeterministic
100   end
101
102   def outputs
103     # returns array containing uuid or pdh of output data
104   end
105
106   def child_summary
107     # summary status of any children of this work unit
108   end
109
110   def child_summary_str
111     # textual representation of child summary
112   end
113
114   def can_cancel?
115     # returns true if this work unit can be canceled
116   end
117
118   def readable?
119     # is the proxied object readable by current user?
120   end
121
122   def uri
123     # returns the uri for this work unit
124   end
125
126   def title
127     # title for the work unit
128   end
129
130   def has_unreadable_children
131     # accept it if you can't understand your own children
132   end
133
134   # view helper methods
135   def link_to_log
136     # display a link to log if present
137   end
138
139   def walltime
140     # return walltime for a running or completed work unit
141   end
142
143   def cputime
144     # return cputime for a running or completed work unit
145   end
146
147   def queuedtime
148     # return queued time if the work unit is queued
149   end
150
151   def is_running?
152     # is the work unit in running state?
153   end
154
155   def is_paused?
156     # is the work unit in paused state?
157   end
158
159   def is_finished?
160     # is the work unit in finished state?
161   end
162
163   def is_failed?
164     # is this work unit in failed state?
165   end
166
167   def command
168     # command to execute
169   end
170
171   def cwd
172     # initial workind directory
173   end
174
175   def environment
176     # environment variables
177   end
178
179   def mounts
180     # mounts
181   end
182
183   def output_path
184     # path to a directory or file to save output
185   end
186
187   def container_uuid
188     # container_uuid of a container_request
189   end
190
191   def log_object_uuids
192     # object uuids for live log
193   end
194
195   def live_log_lines(limit)
196     # fetch log entries from logs table for @proxied
197   end
198
199   def render_log
200     # return partial and locals to be rendered
201   end
202
203   def template_uuid
204     # return the uuid of this work unit's template, if one exists
205   end
206 end