{# Full Scan-Queue body — swappable via HTMX (/api/queue/full). Handles disconnected / error / empty / populated states internally. (The /queue page redirects to /setup when unconfigured, but the polled fragment can still return connected=False if config is lost mid-session — so a disconnected tab must not masquerade as an empty queue.) #} {% if not connected %}
Queued
Processing
Oldest
Stuck
Not connected — configure a platform to see the scan queue.
{% elif error %}
Queued
Processing
Oldest
Stuck
{{ error }}
{% elif not queue or not queue.groups %}
Queued
0
Processing
0
Oldest
Stuck
0
✓ No active scans
{% else %}
Queued
{{ queue.total_queued }}
Processing
{{ queue.total_processing }}
Oldest
{{ queue.oldest_wait if queue.oldest_wait else '—' }}
Stuck
{{ queue.total_stuck }}

Active & queued

{{ queue.groups|length }} projects · {{ total_scans }} scans{% if capped %} · recent window{% endif %}
{% for group in queue.groups %} {%- if group.has_error -%}{% set strip = 'qg-err' %} {%- elif group.has_stuck -%}{% set strip = 'qg-stuck' %} {%- elif group.has_running -%}{% set strip = 'qg-run' %} {%- elif group.all_done -%}{% set strip = 'qg-done' %} {%- else -%}{% set strip = 'qg-queued' %}{%- endif -%}
{{ group.project_name }} {% if group.version_name %}{{ group.version_name | truncate(20, True, '…') }}{% endif %} {% if group.has_stuck %}⚠ stuck{% endif %} {{ group.completed_count }} / {{ group.scans|length }} {{ group.oldest_wait_display }} {% if group.created_by %}{{ group.created_by | join(', ') }}{% endif %}
{%- for scan in group.scans -%} {%- if scan.is_error -%}{% set dot = 'err' %} {%- elif scan.likely_stuck -%}{% set dot = 'stuck' %} {%- elif scan.is_done -%}{% set dot = 'done' %} {%- elif scan.status == 'STARTED' -%}{% set dot = 'run' %} {%- else -%}{% set dot = 'init' %}{%- endif -%} {%- set cls = 'scan' -%} {%- if scan.status == 'STARTED' and not scan.likely_stuck and not scan.is_error and not scan.is_done -%}{% set cls = 'scan is-run' %}{%- endif -%} {%- if scan.likely_stuck -%}{% set cls = 'scan is-stuck' %}{%- endif -%} {{ scan.type }}{% if scan.likely_stuck %} · stuck{% endif %} {%- endfor -%}
{% endfor %}
{% endif %}