{#- The live readout of the UI's scan, served alone by GET /scans/progress and included in the scans page. The outer div is always there, so a poller has a target before the first scan. Its live region is the .scan-live wrapper around it on the scans page, which htmx never swaps. A run links to its results only when its final status is ok or partial, never by its phase: "saving" also fires on a cancelled run. While a scan is active the div polls itself through htmx every 2 seconds; the swapped-in copy of a finished scan lacks the attributes, so polling stops on its own, and the poll that sees the scan end also gets HX-Refresh, which reloads the page with the finished run in the history. Without JavaScript a refresh link stands in. -#} {%- set active = job and job.state in ("starting", "running", "stopping") %}
Only one scan runs at a time. Go to its page.
{%- endif %} {%- if job.error %}{{ job.error }}
{{ job.done }} of {{ job.total }} {{ job.total | plural("image") }}
starting…
{%- endif %} {%- if job.failures %}{{ f.short }} {{ f.kind }}{% if f.retried %} retried{% endif %} {{ f.cause }}see all {{ job.failures_total }} {{ job.failures_total | plural("failure") }}
{%- endif %} {%- if job.image %}last finished: {{ job.image }}
{{ job.eta }}
{%- endif %} {%- if job.state == "stopping" %}stopping once the images in flight finish
{%- endif %} {%- if active %} {%- endif %} {%- if job.href %}see results{% if job.run_number %} of run {{ job.run_number }}{% endif %}
{%- endif %} {%- if job.cancellable and can_write(request) %} {%- endif %}