app/views/job_runs/_details.html.erb
<table class="table table-bordered">
<thead>
<tr>
<th colspan="2">Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>Job type</td>
<td><%= @job_run.job_type.humanize %></td>
</tr>
<tr>
<td>Created by</td>
<td><%= @job_run.batch_context.user.sunet_id %></td>
</tr>
<tr>
<td>Created at</td>
<td><%= @job_run.created_at %></td>
</tr>
<tr>
<td>Updated at</td>
<td><%= @job_run.updated_at %></td>
</tr>
<tr>
<td>State</td>
<td><%= @job_run.human_state_name.capitalize %></td>
</tr>
<% unless @job_run.error_message.blank? %>
<tr>
<td>Errors</td>
<td><%= @job_run.error_message %></td>
</tr>
<% end %>
<tr>
<td>Job output log</td>
<td>
<% if @job_run.in_progress? %>
Job is not yet complete. Please check back later.
<% elsif File.exist? @job_run.progress_log_file %>
<%= link_to 'Download', download_log_job_run_path(@job_run) %>
<% else %>
No progress log file is available.
<% end %>
</td>
</tr>
<% if @job_run.report_ready? %>
<tr>
<td>Discovery Report</td>
<td><%= link_to 'Download', download_report_job_run_path(@job_run) %></td>
</tr>
<% end %>
</tbody>
</table>