Job list: sort by status/priority/age, hide old finished jobs by default

Sort order: printing → queued → rest, then priority desc, then created_at asc.
Finished jobs (done/failed/cancelled) older than 24h are hidden by default;
a footer note shows the count with a 'Show all' link (?show_all=1).
Filter params (bracket_id, q) are preserved on the show-all link.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Hohenberg
2026-06-18 22:35:36 +02:00
parent 6c60dc5960
commit 4a3c370317
2 changed files with 38 additions and 3 deletions

View File

@@ -93,6 +93,16 @@
{% endif %}
</div>
{% if hidden_count %}
{% set sep = '&' if (q or bracket_id) else '?' %}
{% set show_all_url = '/jobs?show_all=1' ~ ('&bracket_id=' ~ bracket_id if bracket_id else '') ~ ('&q=' ~ q if q else '') %}
<p class="text-secondary small mt-3 mb-0">
<i class="bi bi-archive me-1"></i>
{{ hidden_count }} finished job{{ 's' if hidden_count != 1 else '' }} older than 24 h hidden.
<a href="{{ show_all_url }}" class="text-secondary">Show all</a>
</p>
{% endif %}
{# ── Add Job Modal ── #}
<div class="modal fade" id="addJobModal" tabindex="-1">
<div class="modal-dialog modal-lg">