Files
slop-broker/templates/request_region.html
jackos1998andClaude Opus 5.5 45075229de web: Show the progress of running requests
The broker keeps the latest progress of each phase of requests that
build (`runs::Runs`), from the build on. A request's page shows a
full-width bar for the build and a row for each node in its region,
and the main page gets a region of its own listing running requests
with a bar each, both kept current by the page's event stream. A
request's page reads the audit log again only when the queue changes
or a run starts or ends, not with every bit of progress.

The `finished` and `failed` audit events keep how each phase ended,
which the request's page shows afterwards.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:13:27 +00:00

31 lines
950 B
HTML

{%- import "macros.html" as m -%}
<div id="request" data-id="{{ view.id }}">
<h1>{{ view.heading() }}</h1>
{% if let Some(entry) = view.entry %}
{% call m::card(entry, csrf, true) %}{% endcall %}
{% endif %}
{% if let Some(run) = view.run %}
<section class="progress">
{% include "progress.html" %}
</section>
{% else if let Some(past) = view.past %}
{% if !past.phases.is_empty() %}
<h2>Progress</h2>
<ul class="phases">
{% for phase in past.phases %}
<li class="{{ self::state_class(phase) }}">{{ phase.line() }}</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% if let Some(past) = view.past %}
{% if view.entry.is_none() %}
<p class="meta">{{ past.requester }} · {{ past.op }} · {% call m::outcome(past.outcome) %}{% endcall %}</p>
{% endif %}
<h2>History</h2>
{% call m::timeline(past.records.as_slice()) %}{% endcall %}
{% else if view.entry.is_none() %}
<p class="empty">The audit log has nothing about this request.</p>
{% endif %}
</div>