{% from "macros.html" import badge, icon, state_color %}

{{ icon('queue', 'w-5 h-5') }} {{ q.name }} {% if q.paused %} paused {% endif %}

{% if q.paused %} {% else %} {% endif %}
{# Health chips: rendered inline with the panel (no pop-in), then refreshed on job events (throttled - the buckets are per-minute, sub-second repaints buy nothing) and a slow tick. hx-target="this" opts out of the panel's inherited #queue-panel target. #}
{% include "partials/metrics.html" %}
{% for s in states %} {{ s }} {{ q.counts[s]|compact }} {% if s == state %} {% endif %} {% endfor %}
{{ icon('search', 'w-4 h-4') }} {{ icon('retry', 'w-3.5 h-3.5 animate-spin') }}
{# Shown by CSS (:has) only while a job row is open - the live table is paused so it can't move under you. Tells the operator why updates stopped (and how to resume). #}
{{ icon('pause', 'w-3.5 h-3.5') }} Live updates paused while you're viewing a job - close it to resume.
{% with name = q.name %} {% if query %}{% include "partials/search_results.html" %}{% else %}{% include "partials/jobs.html" %}{% endif %} {% endwith %}
{% include "partials/names.html" %} {# same mt-8 rhythm as the by-name section above, with or without it present #}
{% with name = q.name, schedulers = q.schedulers %}{% include "partials/schedulers.html" %}{% endwith %}