<!doctype html>
<html lang="en-US">
<head>
    <meta charset="utf-8"/>
    <title>django_dramatiq example</title>
</head>
<body>

<h2>Charts</h2>
<h3><a href="{% url 'ddc_load_chart' %}" target="_blank">load chart</a></h3>
<h3><a href="{% url 'ddc_timeline_chart' %}" target="_blank">timeline chart</a></h3>

<hr>
<h2>Submit a job</h2>
<form action="" method="POST">
    {% csrf_token %}
    <label>Job type
        <select name="type">
            <option value="slow">Slow</option>
            <option value="fast">Fast</option>
        </select>
    </label>
    <button type="submit">Submit</button>
</form>

<hr>
<h2>Jobs</h2>
{% if not jobs %}
    <p>There are no known jobs.</p>
{% else %}
    <table>
        <tr>
            <th>Type</th>
            <th>Status</th>
            <th>Date</th>
        </tr>
        {% for job in jobs %}
            <tr>
                <td>{{ job.type }}</td>
                <td>{{ job.status }}</td>
                <td>{{ job.created_at }}</td>
            </tr>
        {% endfor %}
    </table>
{% endif %}

</body>
</html>
