8876: progress bar and strage component display
[arvados.git] / apps / workbench / app / models / work_unit.rb
1 class WorkUnit
2   # This is just an abstract class that documents the WorkUnit interface; a
3   # class can implement the interface without being a subclass of WorkUnit.
4
5   def label
6     # returns the label that was assigned when creating the work unit
7   end
8
9   def uuid
10     # returns the arvados UUID of the underlying object
11   end
12
13   def children
14     # returns an array of child work units
15   end
16
17   def modified_by_user_uuid
18     # returns uuid of the user who modified this work unit most recently
19   end
20
21   def created_at
22     # returns created_at timestamp
23   end
24
25   def started_at
26     # returns started_at timestamp for this work unit
27   end
28
29   def finished_at
30     # returns finished_at timestamp
31   end
32
33   def state_label
34     # returns a string representing state of the work unit
35   end
36
37   def state_bootstrap_class
38     # returns a class like "danger", "success", or "warning" that a view can use directly to make a display class
39   end
40
41   def success?
42     # returnis true if the work unit finished successfully,
43     # false if it has a permanent failure,
44     # and nil if the final state is not determined.
45   end
46
47   def progress 
48     # returns a number between 0 and 1
49   end
50
51   def log_collection
52     # returns uuid or pdh with saved log data, if any
53   end
54
55   def parameters
56     # returns work unit parameters, if any
57   end
58
59   def script
60     # returns script for this work unit, if any
61   end
62
63   def repository
64     # returns this work unit's script repository, if any
65   end
66
67   def script_version
68     # returns this work unit's script_version, if any
69   end
70
71   def supplied_script_version
72     # returns this work unit's supplied_script_version, if any
73   end
74
75   def docker_image
76     # returns this work unit's docker_image, if any
77   end
78
79   def runtime_constraints
80     # returns this work unit's runtime_constraints, if any
81   end
82
83   def priority
84     # returns this work unit's priority, if any
85   end
86
87   def nondeterministic
88     # returns if this is nondeterministic
89   end
90
91   def output
92     # returns uuid or pdh of output data, if any
93   end
94
95   def can_cancel?
96     # returns if this work unit is cancelable
97   end
98
99   def uri
100     # returns the uri for this work unit
101   end
102
103   def child_summary
104     # summary status of any children of this work unit
105   end
106
107   def title
108     # title for the work unit
109   end
110
111   def has_unreadable_children
112     # accept it if you can't understand your own children
113   end
114 end