#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>
25 lines
763 B
HTML
25 lines
763 B
HTML
{# alerts/_history_rows.html — the history table; swapped in on a range or rule
|
|
change. Its rows come a page at a time (alerts/_history_page.html). #}
|
|
{% from "_macros.html" import status_badge, empty_state %}
|
|
{% if events %}
|
|
<div class="card-flush" style="overflow-x:auto;">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>When (UTC)</th>
|
|
<th>Rule</th>
|
|
<th>Change</th>
|
|
<th>Value</th>
|
|
<th>Notified</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% include "alerts/_history_page.html" %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="card">{{ empty_state("No alert changed state in the last " ~ current_range ~ ((" for " ~ chosen.name) if chosen else "") ~ ".") }}</div>
|
|
{% endif %}
|