Runs history

This commit is contained in:
Gregory Eremin
2013-06-07 00:04:41 +04:00
parent 441acca610
commit b97f0c1a12
7 changed files with 40 additions and 3 deletions
@@ -0,0 +1,21 @@
<%= link_to '&larr; Back'.html_safe, tasks_path, class: 'small radius secondary button' %>
<%= link_to 'Run', run_task_path(params[:task_id], back: task_runs_path(params[:task_id])), class: 'small radius button' %>
<br><br>
<table>
<thead>
<tr>
<th>Task</th>
<th>Timestamp</th>
<th>Took</th>
</tr>
</thead>
<tbody>
<% @runs.each do |run| %>
<tr>
<td><span class="<%= task_label(run) %> radius label"><%= run.name %></span></td>
<td><%= l run.created_at, format: :short %> (<%= time_ago_in_words(run.created_at) %> ago)</td>
<td><%= run.execution_time.round(6) %>s</td>
</tr>
<% end %>
</tbody>
</table>