Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Sun, Mar 22, 12:06 AM
diff --git a/app/views/admin/jobs/index.html.erb b/app/views/admin/jobs/index.html.erb
index e2e7be6..5318f90 100644
--- a/app/views/admin/jobs/index.html.erb
+++ b/app/views/admin/jobs/index.html.erb
@@ -1,56 +1,70 @@
<h2>Pending Jobs</h2>
<table class="table table-striped">
<thead>
<tr>
<th>Id</th>
+ <th>Created at</th>
<th>Domain</th>
<th>Type</th>
<th>Args</th>
<th>Retries</th>
<th>Controls</th>
</tr>
</thead>
<tbody>
<% @pending.each do |job| %>
<tr>
<td><%= job.id %></td>
- <td><%= job.domain.try(:name) %></td>
+ <td><%= job.created_at %></td>
+ <% if job.domain %>
+ <td><%= link_to job.domain.name, domain_path(job.domain) %></td>
+ <% else %>
+ <td><%= job.arguments['zone'] %></td>
+ <% end %>
<td><%= job.job_type %></td>
- <td><%= job.args %></td>
+ <% if job.args.size > 70 %>
+ <td data-toggle="tooltip" data-placement="right" title="<%= job.args %>"><%= truncate(job.args, length: 70) %></td>
+ <% else %>
+ <td><%= job.args %></td>
+ <% end %>
<td><%= job.retries %></td>
<td><%= link_to_destroy admin_job_path(job), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<h2>Completed Jobs</h2>
<table class="table table-striped">
<thead>
<tr>
<th>Id</th>
<th>Created At</th>
<th>Domain</th>
<th>Type</th>
<th>Args</th>
<th>Retries</th>
<th>Controls</th>
</tr>
</thead>
<tbody>
<% @completed.each do |job| %>
<tr class="<%= job.failed? ? 'warning' : '' %>">
<td><%= job.id %></td>
<td><%= job.created_at %></td>
- <td><%= job.domain.try(:name) %></td>
+ <% if job.domain %>
+ <td><%= link_to job.domain.name, domain_path(job.domain) %></td>
+ <% else %>
+ <td><%= job.arguments['zone'] %></td>
+ <% end %>
<td><%= job.job_type %></td>
<td><%= job.args %></td>
<td><%= job.retries %></td>
<td><%= link_to_destroy admin_job_path(job), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>

Event Timeline