Files
docker-images/python-tools/templates/index.html
T

49 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1>Tasks</h1>
{% if not groups %}
<p>No task groups found.</p>
{% endif %}
{% for group in groups %}
{% set group_run = latest[("group", group.id)] %}
<section class="group">
<div class="group-heading">
<h2>{{ group.display_name }}</h2>
<form method="post" action="{{ url_for('run_group', group_id=group.id) }}">
<button type="submit">Run group</button>
</form>
</div>
{% if group_run %}
<p class="run-summary">
Group: <a href="{{ url_for('run_detail', run_id=group_run.id) }}">{{ group_run.status }}</a>
· {{ group_run.finished_at|timestamp if group_run.finished_at else "in progress" }}
</p>
{% endif %}
<ul class="tasks">
{% for task in group.tasks %}
{% set task_run = latest[("task", task.id)] %}
<li>
<div>
<h3>{{ task.display_name }}</h3>
{% if task.description %}<p>{{ task.description }}</p>{% endif %}
{% if task_run %}
<p class="run-summary">
Last run:
<a href="{{ url_for('run_detail', run_id=task_run.id) }}">{{ task_run.status }}</a>
· {{ task_run.finished_at|timestamp if task_run.finished_at else "in progress" }}
· <a href="{{ url_for('history', target_kind='task', target_path=task.id) }}">history</a>
</p>
{% endif %}
</div>
<form method="post" action="{{ url_for('run_task', task_id=task.id) }}">
<button type="submit">Run</button>
</form>
</li>
{% else %}
<li>No exposed tasks in this group.</li>
{% endfor %}
</ul>
</section>
{% endfor %}
{% endblock %}