3781: Add test cases: empty files, renaming, and error reporting.
[arvados.git] / apps / workbench / app / views / jobs / _show_recent.html.erb
1 <% content_for :css do %>
2   table.topalign>tbody>tr>td {
3   vertical-align: top;
4   }
5   table.topalign>thead>tr>td {
6   vertical-align: bottom;
7   }
8 <% end %>
9
10 <%= render partial: "paging", locals: {results: objects, object: @object} %>
11
12 <table class="topalign table">
13   <thead>
14     <tr class="contain-align-left">
15       <th>
16       </th><th>
17         status
18       </th><th>
19         uuid
20       </th><th>
21         script
22       </th><th>
23         version
24       </th><th>
25         output
26       </th>
27     </tr>
28   </thead>
29   <tbody>
30
31     <% @objects.sort_by { |j| j[:created_at] }.reverse.each do |j| %>
32
33     <tr class="cell-noborder">
34       <td>
35         <i class="icon-plus-sign expand-collapse-row" data-id="<%= j.uuid %>" style="cursor: pointer"></i>
36       </td>
37       <td>
38         <div class="inline-progress-container">
39           <%= render partial: 'job_progress', locals: {:j => j} %>
40         </div>
41       </td>
42       <td>
43         <%= link_to_if_arvados_object j %>
44       </td>
45       <td>
46         <%= j.script %>
47       </td>
48       <td>
49         <%= j.script_version.andand[0..8] %>
50       </td>
51       <td>
52         <%= link_to_if_arvados_object j.output %>
53       </td>
54     </tr>
55     <tr class="cell-noborder" id="<%= j.uuid %>" style="display:none">
56       <td colspan="7"><table class="table table-justforlayout"><tr>
57       <td style="border-left: 1px solid black">
58         <table class="table table-condensed">
59           <tr>
60             <td>
61               queued
62             </td>
63             <td>
64               &#x2709;&nbsp;<span title="<%= j.created_at %>"><%= raw distance_of_time_in_words(Time.now, j.created_at).sub('about ','~').sub(' ','&nbsp;') + '&nbsp;ago' if j.created_at %></span>
65             </td>
66             <td>
67               <%= raw('for&nbsp;' + distance_of_time_in_words(j.started_at, j.created_at).sub('about ','~').sub(' ','&nbsp;')) if j.created_at and j.started_at %>
68             </td>
69           </tr>
70           <% if j.started_at.is_a? Time %>
71           <tr>
72             <td>
73               started
74             </td>
75             <td>
76               &#x2708;&nbsp;<span title="<%= j.created_at %>"><%= raw distance_of_time_in_words(j.started_at, Time.now).sub('about ','~').sub(' ','&nbsp;') + '&nbsp;ago' if j.started_at %></span>
77             </td>
78             <td>
79               <% if j.finished_at.is_a? Time %>
80               <%= raw('ran&nbsp;' + distance_of_time_in_words(j.finished_at, j.started_at).sub('about ','~').sub(' ','&nbsp;')) %>
81               <% elsif j.state == "Running" %>
82               <span class="badge badge-success" title="tasks finished">&#x2714;&nbsp;<%= j.tasks_summary[:done] %></span>
83               <span class="badge badge-info" title="tasks running">&#x2708;&nbsp;<%= j.tasks_summary[:running] %></span>
84               <span class="badge" title="tasks todo">&#x2709;&nbsp;<%= j.tasks_summary[:todo] %></span>
85               <% if j.tasks_summary[:failed] %>
86               <span class="badge badge-warning" title="task failures">&#x2716;&nbsp;<%= j.tasks_summary[:failed] %></span>
87               <% end %>
88               <% end %>
89             </td>
90           </tr>
91           <% end %>
92         </table>
93       </td><td>
94         <table class="table table-condensed">
95           <tr><td colspan="2">
96               <%= j.script %> <%= j.script_version %>
97           </td></tr>
98           <% j.script_parameters.sort.each do |k,v| %>
99           <tr>
100             <td><%= k %></td><td><%= link_to_if_arvados_object v %></td>
101           </tr>
102           <% end %>
103           <tr>
104             <td>output</td><td><%= link_to_if_arvados_object j.output %></td>
105           </tr>
106         </table>
107       </td><td>
108         <table class="table table-condensed">
109         <% j.runtime_constraints.sort.each do |k,v| %>
110         <tr><td><%= v %></td><td><%= k %></td></tr>
111         <% end %>
112         </table>
113       </td>
114       </tr></table></td>
115     </tr>
116
117     <% end %>
118
119   </tbody>
120 </table>