diff options
Diffstat (limited to 'templates/builds.html')
| -rw-r--r-- | templates/builds.html | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/templates/builds.html b/templates/builds.html index 745f0e9..e4c060e 100644 --- a/templates/builds.html +++ b/templates/builds.html @@ -1,23 +1,8 @@ {% extends "base.html" %} +{% block head %}<script src="/static/htmx.min.js" defer></script>{% endblock %} {% block content %} <h1>Builds</h1> -<div id="builds"> -{% if rows.is_empty() %}<p class="mut">Nothing queued or running.</p>{% else %} -<table> -<tr><th>id</th><th>pkgbase</th><th>version</th><th>kind</th><th>state</th><th>step</th><th>lease</th><th></th></tr> -{% for b in rows %}<tr> -<td><a href="/builds/{{ b.id }}">{{ b.id_short }}</a></td> -<td><a href="/packages/{{ b.pkgbase }}">{{ b.pkgbase }}</a></td> -<td>{{ b.version }}</td><td>{{ b.kind }}</td> -<td>{{ b.state }}{% if b.cancel %} <span class="tag">cancel requested</span>{% endif %}</td> -<td class="mut">{{ b.step }}</td><td class="mut">{{ b.lease }}</td> -<td><form class="inline" method="post" action="/builds/{{ b.id }}/cancel"> -<input type="hidden" name="csrf" value="{{ page.csrf }}"><button type="submit">cancel</button></form></td> -</tr>{% endfor %}</table>{% endif %} -</div> -{% if !recent.is_empty() %}<h2>Recently finished</h2> -<table><tr><th>id</th><th>pkgbase</th><th>version</th><th>kind</th><th>state</th><th>error</th></tr> -{% for b in recent %}<tr><td><a href="/builds/{{ b.id }}">{{ b.id_short }}</a></td> -<td><a href="/packages/{{ b.pkgbase }}">{{ b.pkgbase }}</a></td> -<td>{{ b.version }}</td><td>{{ b.kind }}</td><td>{{ b.state }}</td><td class="risk-high">{{ b.error }}</td></tr>{% endfor %}</table>{% endif %} +{% include "builds_table.html" %} +<p class="mut">The table refreshes every 3 seconds when JavaScript is enabled and is +plain server-rendered HTML when it is not.</p> {% endblock %} |
