#5211 "Lists load as you scroll: audit, alert history, Ansible runs" (milestone 477), per preference 172. - core/paging.py: keyset paging over (time, id), newest first, with an opaque "<iso>|<id>" cursor; a page reads one row past itself to know whether another follows. No OFFSET, so rows added while someone scrolls never shift the pages after them. - _macros.html scroll_more / scroll_end and static/scroll-more.js, written once: an IntersectionObserver with a 600px margin fetches the next page before the reader reaches the end; "Loading more…" while in flight, "End of the list." at the end, and a failed page says so with a Retry button instead of re-firing on every scroll. - Audit log: no "Load more" link and no 500-row cap. - Alert history: no 200-row stop with "pick a shorter range"; alert_svc.history takes the cursor, so the MCP tool and the page share one query. - Ansible runs: no silent cap of 50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_macros.html" import page_header, empty_state %}
|
|
{% block title %}Audit log — Steward{% endblock %}
|
|
{% block content %}
|
|
{% call page_header("Audit log", "Who changed what, newest first.") %}
|
|
<form method="get" style="display:flex;gap:0.5rem;align-items:center;">
|
|
<input type="text" name="action" value="{{ action_filter }}"
|
|
placeholder="Filter by action…" aria-label="Filter by action"
|
|
style="width:200px;font-size:0.85rem;">
|
|
<button type="submit" class="btn btn-ghost btn-sm">Filter</button>
|
|
{% if action_filter %}
|
|
<a href="/audit/" class="btn btn-ghost btn-sm">Clear</a>
|
|
{% endif %}
|
|
</form>
|
|
{% endcall %}
|
|
|
|
{% if events %}
|
|
<div class="card-flush">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>When</th>
|
|
<th>User</th>
|
|
<th>Action</th>
|
|
<th>Entity</th>
|
|
<th>Detail</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% include "audit/_rows.html" %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="card">{{ empty_state("No audit events recorded yet.") }}</div>
|
|
{% endif %}
|
|
{% endblock %}
|