diff options
| author | aur-build <aur-build@localhost> | 2026-11-18 08:06:39 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-18 08:06:39 +0000 |
| commit | a6b652985f40cf022d6c522415c36fad13bc663d (patch) | |
| tree | 2383d83a820803808202084db1aa30b12f0e02c2 /templates/attention.html | |
| parent | ab8d33d5edc4c88075685206e3046c719e9bc855 (diff) | |
| download | aur-build-a6b652985f40cf022d6c522415c36fad13bc663d.tar.gz aur-build-a6b652985f40cf022d6c522415c36fad13bc663d.zip | |
http: the review surface — server-rendered, no JavaScript required (§12, §13)
tiny_http, thread-per-connection, askama templates. Every §13 surface is
server-rendered HTML that works with scripts switched off: Inbox, review
detail with the full panel set, Builds, Attention, Index, Subscriptions,
Ops/audit, Settings.
The parts that are easy to get wrong:
- Handlers read through thread-local READ-ONLY connections. They cannot
take the write lock even by accident, so a slow page render never blocks
the build pipeline's writer. tests/http.rs asserts this by trying to
write through a read connection and requiring failure.
- Every POST requires a CSRF token derived from the session id. Logout
drops the session, which invalidates every form still open in a browser.
- Approve carries identity_hash AND diff_digest (§7.1a). If either has
moved, the approval is refused with 409 and the page re-renders the
review AS IT IS NOW — never a silent retarget onto the newer state.
- Bulk approve refuses high-risk items unless each one is individually
confirmed by id. Bulk is per-item, never 'approve everything forever'.
- Reject requires a note; it is re-openable, not a deletion.
- Optional password gate; anonymous visitors are redirected to /login.
Also: the index page states the pacman conf snippet including
'SigLevel = Required DatabaseOptional', because a repo consumers ignore the
signature is a repo that gets MITM'd.
Diffstat (limited to 'templates/attention.html')
| -rw-r--r-- | templates/attention.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/templates/attention.html b/templates/attention.html new file mode 100644 index 0000000..caa277f --- /dev/null +++ b/templates/attention.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} +{% block content %} +<h1>Attention</h1> +{% if empty %}<p class="mut">Nothing needs you.</p>{% endif %} +{% if !notices.is_empty() %}<h2>Alerts</h2> +<table><tr><th>pkgbase</th><th>kind</th><th>severity</th><th>detail</th><th>since</th><th></th></tr> +{% for n in notices %}<tr> +<td><a href="/packages/{{ n.pkgbase }}">{{ n.pkgbase }}</a></td> +<td>{{ n.kind }}</td><td class="risk-{{ n.severity }}">{{ n.severity }}</td> +<td><pre>{{ n.detail }}</pre></td><td class="mut">{{ n.created_at }}</td> +<td><form class="inline" method="post" action="/attention/ack"> +<input type="hidden" name="csrf" value="{{ page.csrf }}"><input type="hidden" name="id" value="{{ n.id }}"> +<button type="submit">acknowledge</button></form></td></tr>{% endfor %}</table>{% endif %} + +{% if !outdated.is_empty() %}<h2>Outdated: a dependency we publish has a newer version</h2> +<table><tr><th>package</th><th>built against</th><th>now in the index</th><th></th></tr> +{% for o in outdated %}<tr><td><a href="/packages/{{ o.pkgbase }}">{{ o.pkgbase }}</a></td> +<td>{{ o.built_with }}</td><td class="ok">{{ o.now }}</td> +<td><form class="inline" method="post" action="/packages/{{ o.pkgbase }}/rebuild"> +<input type="hidden" name="csrf" value="{{ page.csrf }}"><button type="submit">rebuild</button></form></td></tr> +{% endfor %}</table>{% endif %} + +{% if !missing.is_empty() %}<h2>Missing: a dependency we no longer publish</h2> +<table><tr><th>package</th><th>missing</th></tr> +{% for m in missing %}<tr><td>{{ m.pkgbase }}</td><td class="risk-high">{{ m.now }}</td></tr>{% endfor %}</table>{% endif %} + +{% if !blocked.is_empty() %}<h2>Blocked builds</h2> +<table><tr><th>build</th><th>pkgbase</th><th>waiting on</th></tr> +{% for b in blocked %}<tr><td><a href="/builds/{{ b.id }}">{{ b.id_short }}</a></td> +<td>{{ b.pkgbase }}</td><td>{% for d in b.blocked_on %}<span class="tag">{{ d }}</span> {% endfor %}</td></tr>{% endfor %}</table>{% endif %} + +{% if !downgrades.is_empty() %}<h2>Downgrades in the index</h2> +<table><tr><th>package</th><th>serving</th><th>AUR offers</th></tr> +{% for d in downgrades %}<tr><td>{{ d.pkgbase }}</td><td>{{ d.built_with }}</td><td>{{ d.now }}</td></tr>{% endfor %}</table>{% endif %} +{% endblock %} |
