tone down css on jobs index
[arvados.git] / apps / workbench / app / views / pipeline_instances / index.html.erb
1 <table class="table table-hover">
2   <thead>
3     <tr class="contain-align-left">
4       <th>
5         status
6       </th><th>
7         id
8       </th><th>
9         name
10       </th><th>
11         template
12       </th><th>
13         owner
14       </th><th>
15         components
16       </th><th>
17         dependencies
18       </th><th>
19         created
20       </th>
21     </tr>
22   </thead>
23   <tbody>
24
25     <% @objects.sort_by { |ob| ob[:created_at] }.reverse.each do |ob| %>
26
27     <tr>
28       <td>
29         <% if ob.success %>
30         <span class="label label-success">success</span>
31         <% elsif ob.active %>
32         <span class="label label-info">active</span>
33         <% end %>
34       </td><td>
35         <%= link_to_if_arvados_object ob %>
36       </td><td>
37         <%= ob.name %>
38       </td><td>
39         <%= link_to_if_arvados_object ob.pipeline_template_uuid %>
40       </td><td>
41         <%= link_to_if_arvados_object ob.owner_uuid %>
42       </td><td>
43         <% ob.components.each do |cname, c| %>
44         <% status = if !(c.is_a?(Hash) && c[:job].is_a?(Hash)) then nil elsif c[:job][:success] then 'success' elsif c[:job][:running] then 'info' else 'warning' end %>
45         <span class="label <%= "label-#{status}" if status %>"><%= cname.to_s %></span>
46         <% end %>
47       </td><td>
48         <small>
49           <% ob.dependencies.each do |d| %>
50           <%= d %><br />
51           <% end %>
52         </small>
53       </td><td>
54         <%= ob.created_at %>
55       </td>
56     </tr>
57
58     <% end %>
59
60   </tbody>
61 </table>