Files
jackos1998andClaude Opus 5.5 076f4959d9 web: Add approvals web app
A web app lists pending requests with full detail, leases and the
audit log grouped by request, and sends Web Push notifications that can
answer requests. Approvers sign in through an OpenID Connect provider;
policy can require a fresh passkey (`confirm = "passkey"`) to approve,
which only the web app can then give.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:39:36 +00:00

33 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% import "macros.html" as m %}
{% block title %}Audit log{% endblock %}
{% block main %}
<h1>Audit log</h1>
<form method="get" action="/log" class="filters">
{% call m::select("requester", "Requester", filters.requester, requesters) %}{% endcall %}
{% call m::select("op", "Operation", filters.op, ops) %}{% endcall %}
{% call m::select("outcome", "Outcome", filters.outcome, outcomes) %}{% endcall %}
<label>Search <input type="search" name="text" value="{{ filters.text }}" placeholder="ID, summary or label"></label>
<button type="submit">Filter</button>
<a href="/log">Clear</a>
</form>
{% if histories.is_empty() %}
<p class="empty">No requests match.</p>
{% else %}
<div class="scroll"><table class="log"><thead><tr><th>Time</th><th>Requester</th><th>Request</th><th>Outcome</th><th>Approved by</th></tr></thead><tbody>
{% for h in histories %}
<tr><td>{% call m::time(h.time) %}{% endcall %}</td><td>{{ h.requester }}</td>
<td><a href="/requests/{{ h.id }}">{% if h.summary.is_empty() %}Request {{ self::short(h.id) }}{% else %}{{ h.summary }}{% endif %}</a> <span class="badge">{{ h.op }}</span>
{%- if let Some(label) = h.label %}<div class="label">{{ label }}</div>{% endif %}</td>
<td>{% call m::outcome(h.outcome) %}{% endcall %}</td><td>{% if let Some(by) = h.approved_by %}{{ by }}{% endif %}</td></tr>
{% endfor %}
</tbody></table></div>
{% endif %}
{% if matched > histories.len() %}
<p class="note">Showing the newest {{ histories.len() }} of {{ matched }} matching requests.</p>
{% endif %}
{% if !refused.is_empty() %}
<details><summary>Refused connections ({{ refused.len() }})</summary>{% call m::timeline(refused) %}{% endcall %}</details>
{% endif %}
{% endblock %}