{% extends "templates/base.jinja2" %}

{% block content %}
    <h1 class="view">Job <small>{{ object.name }}</small></h1>

    <h2 class="view">Files <small>{{ object.jobfiles }} total</small></h2>
    <table id="job_files" class="table table-striped table-bordered datatables"></table>

    <h2 class="view">Log</h2>
    {{ macros.logs_table(request, object.logs, show_jobid=False) }}
{% endblock %}

{% block sidebar %}
    <h1 class="view">Details</h1>
    <table class="table table-striped table-bordered table-condensed word-wrapped">
      <tbody>
       <tr>
           <td>Client:</td>
           <td>{{ macros.link(object.render_client_name(request)) }}</td>
       </tr>
       <tr>
           <td>Volume:</td>
           <td>{% for volume in object.render_volume_name(request) %}{{ macros.link(volume.render_volumename(request)) }} {% endfor %}</td>
       </tr>
       <tr>
           <td>Pool:</td>
           <td>{{ macros.link(object.render_pool_name(request)) }}</td>
       </tr>
       <tr>
           <td>Status:</td>
           <td class="{{ object.render_status_color(request) }}">{{ macros.link(object.render_status(request)) }}</td>
       </tr>
       <tr>
           <td>Type:</td>
           <td>{{ macros.link(object.render_type(request)) }}</td>
       </tr>
       <tr>
           <td>Level:</td>
           <td>{{ macros.link(object.render_level(request)) }}</td>
       </tr>
       <tr>
           <td>Size:</td>
           <td>{{ macros.link(object.render_jobbytes(request)) }}</td>
       </tr>
       <tr>
           <td>Number of files:</td>
           <td>{{ macros.link(object.render_jobfiles(request)) }}</td>
       </tr>
       <tr>
           <td>Scheduled:</td>
           <td>{{ object.schedtime }}</td>
       </tr>
       <tr>
           <td>Started:</td>
           <td>{{ macros.link(object.render_starttime(request)) }}</td>
       </tr>
       <tr>
           <td>Ended:</td>
           <td>{{ object.endtime }}</td>
       </tr>
       <tr>
           <td>Duration:</td>
           <td>{{ macros.link(object.render_duration(request)) }}</td>
       </tr>
      </tbody>
    </table>
{% endblock %}
