{% extends 'base.j2' %}
{% block title %}dags{% endblock %}
{% block content %}
<h1>dags</h1>
<table>
<tr>
<th>id</th>
<th>status</th>
<th>success_tasks</th>
<th>created_at</th>
<th>started_at</th>
<th>stopped_at</th>
<th>duration_seconds</th>
</tr>
<thead>
</thead>
{% for dag in dags %}
    <tr>
        <td><a href="/dags/{{ dag.id }}"><code>{{ dag.id|truncate(8, end='') }}</code></a></td>
        <td><code>{{ dag.status }}</code></td>
        <td><code>{{ dag.success_tasks }}</code></td>
        <td><code>{{ dag.created_at|format_time if dag.created_at is not none else 'NONE'}}</code></td>
        <td><code>{{ dag.started_at|format_time if dag.started_at is not none else 'NONE'}}</code></td>
        <td><code>{{ dag.stopped_at|format_time if dag.stopped_at is not none else 'NONE'}}</code></td>
        <td><code>{{ dag.duration_seconds|round(1) if dag.duration_seconds is not none else 'NULL' }}</code></td>
    </tr>
{% endfor %}
</table>
{% endblock %}
