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

{% block container %}
    <h1 class="view">Clients <small>list</small></h1>
    <table class="table table-striped table-bordered datatables">
        <thead>
            <tr>
                <th>Name</th>
                <th>Jobs</th>
                <th>Last successful backup</th>
                <th>Total backup size</th>
            </tr>
        </thead>
        <tbody>
            {% for object in objects %}
                <tr class="clickable-row" data-link="{{ request.route_url('client_detail', id=object.Client.clientid) }}">
                    <td>{{ macros.link(object.Client.render_name(request)) }}</td>
                    <td>{{ object.num_jobs }}</td>
                    <td>{{ macros.link(object.Client.render_distance_of_time_in_words(object.job_maxschedtime)) }}</td>
                    <td>{{ object.Client.format_byte_size(object.job_sumvolbytes) }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}
