{% extends "web/_base.html" %}
{% block title %}Task status{% endblock %}
{% block content %}
    <h1>Task queue</h1>
    {% if task_queue %}
        <table class="table table-sm" id="build-queue">
            <thead>
                <tr>
                    <th>Architecture</th>
                    <th>Number of workers</th>
                    <th>Pending work requests</th>
                </tr>
            </thead>
            <tbody>
                {% for arch, status in task_queue.items|dictsort:0 %}
                    <tr>
                        <td>
                            <a href="{% url 'work_requests:list' %}?status=pending&amp;arch={{ arch|urlencode }}">{{ arch }}</a>
                        </td>
                        <td>{{ status.workers }}</td>
                        <td>{{ status.work_requests_pending }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p>There are no pending work requests.</p>
    {% endif %}
{% endblock %}
