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

{% block content %}
    <h1 class="view">Volume <small>{{ object.volumename }}</small></h1>
    <h2 class="view">Jobs <small>list</small></h2>
    {{ macros.jobs_table(request, object.jobs) }}
{% endblock %}

{% block sidebar %}
    <h1 class="view">Details</h1>
    <table class="table table-striped table-bordered table-condensed word-wrapped">
        <tbody>
            <tr>
                <td>Status:</td>
                <td>{{ object.volstatus }}</td>
            </tr>
            <tr>
                <td>Jobs:</td>
                <td>{{ object.voljobs }}</td>
            </tr>
            <tr>
                <td>Num of errors:</td>
                <td>{{ object.volerrors }}</td>
            </tr>
            <tr>
                <td>Type:</td>
                <td>{{ object.mediatype }}</td>
            </tr>
            <tr>
                <td>Size:</td>
                <td>{{ macros.link(object.render_volbytes(request)) }}</td>
            </tr>
            <tr>
                <td>Enabled:</td>
                <td>{{ macros.link(object.render_enabled(request)) }}</td>
            </tr>
            <tr>
                <td>Recycle:</td>
                <td>{{ macros.link(object.render_recycle(request)) }}</td>
            </tr>
            <tr>
                <td>Capacity:</td>
                <td>{{ macros.link(object.render_volcapacitybytes(request)) }}</td>
            </tr>
            <tr>
                <td>Pool:</td>
                <td>{{ macros.link(object.render_pool_name(request)) }}</td>
            </tr>
            <tr>
                <td>Storage:</td>
                <td>{{ macros.link(object.render_storage_name(request)) }}</td>
            </tr>
            <tr>
                <td>Max jobs:</td>
                <td>{{ object.maxvoljobs }}</td>
            </tr>
            <tr>
                <td>Max files:</td>
                <td>{{ object.maxvolfiles }}</td>
            </tr>
            <tr>
                <td>Max bytes:</td>
                <td>{{ macros.link(object.render_maxvolbytes(request)) }}</td>
            </tr>
            <tr>
                <td>Retention:</td>
                <td>{{ macros.link(object.render_volretention(request)) }}</td>
            </tr>
            <tr>
                <td>First written:</td>
                <td>{{ object.firstwritten }}</td>
            </tr>
            <tr>
                <td>Last written:</td>
                <td>{{ object.lastwritten }}</td>
            </tr>
            <tr>
                <td>Expires:</td>
                <td>{{ macros.link(object.render_expires(request)) }}</td>
            </tr>
        </tbody>
    </table>
{% endblock %}
