0a841b64f0733bf7591e2fad6cf9248d3de57739
[arvados.git] / app / views / pipeline_invocations / index.html.erb
1 <table style="width:100%">
2   <tr class="contain-align-left">
3     <th>
4       success
5     </th><th>
6       active
7     </th><th>
8       % complete
9     </th><th>
10       uuid
11     </th><th>
12       pipeline uuid
13     </th><th>
14       name
15     </th><th>
16       last updated
17     </th>
18   </tr>
19
20   <% @objects.each do |o| %>
21
22   <% status = o.success ? 'success' : (o.success == false ? 'failure' : 'pending') %>
23
24   <tr class="pipeline-invocation-status pipeline-invocation-status-<%= status %>" data-showhide-selector="tr#extra-info-<%= o.uuid %>" style="cursor:pointer">
25     <td>
26       <%= status %>
27     </td><td>
28       <%= o.active ? 'yes' : '-' %>
29     </td><td>
30       <%= (o.progress_ratio * 1000).floor / 10 %>
31     </td><td>
32       <%= o.uuid %>
33     </td><td>
34       <%= o.pipeline_uuid %>
35     </td><td>
36       <%= o.name %>
37     </td><td>
38       <%= distance_of_time_in_words(o.updated_at, Time.now, true) + ' ago' if o.updated_at %>
39     </td>
40   </tr>
41
42   <% if  %>
43   <tr id="extra-info-<%= o.uuid %>" data-showhide-default>
44     <td colspan="7">
45       <table>
46         <% o.progress_table.each do |r| %>
47         <tr>
48           <% r[2] = "#{(r[2]*100).floor}%" %>
49           <% r[4] = r[4][0..5] rescue '' %>
50           <% r.each do |c| %>
51           <td>
52             <%= (c.is_a? Time) ? distance_of_time_in_words(c, Time.now, true) + ' ago' : c %>
53           </td>
54           <% end %>
55         </tr>
56         <% end %>
57       </table>
58       </dl>
59     </td>
60   </tr>
61
62   <% end %>
63   <% end %>
64 </table>