|
@@ -20,11 +20,19 @@
|
|
|
</tr>
|
|
|
|
|
|
<% @jobs.each do |job| %>
|
|
|
- <% agent = agent_from_job(job) %>
|
|
|
<tr>
|
|
|
<td><%= status(job) %></td>
|
|
|
- <td><%= agent ? link_to(agent.name, agent_path(agent)) : "(deleted)" %></td>
|
|
|
- <td title='<%= job.created_at %>'><%= time_ago_in_words job.created_at %> ago <%= agent ? "for #{agent.user.username}" : '' %></td>
|
|
|
+ <td><% case agent = agent_from_job(job)
|
|
|
+ when Agent
|
|
|
+ %><%= link_to(agent.name, agent_path(agent)) %><%
|
|
|
+ when false
|
|
|
+ %>(system)<%
|
|
|
+ when nil
|
|
|
+ %>(deleted)<%
|
|
|
+ else
|
|
|
+ %>(unknown)<%
|
|
|
+ end %></td>
|
|
|
+ <td title='<%= job.created_at %>'><%= time_ago_in_words job.created_at %> ago<% if user = agent.try(:user) %> for <%= user.username %><% end %></td>
|
|
|
<td title='<%= job.run_at %>'>
|
|
|
<% if !job.failed_at %>
|
|
|
<%= relative_distance_of_time_in_words job.run_at %>
|