{# queue/_live.html — the sections the live stream replaces wholesale. Rendered on the page and, identically, inside every `queue.status` frame: the same template, the same report. #} {% from "mirrorwall/components.html" import badge, empty_state, kv_list, table %} {{ kv_list([ {"label": "Active jobs", "value": report.active ~ " of at most " ~ report.max_depth}, {"label": "By state", "value": (report.depth_by_state | tojson) if report.depth_by_state else "empty"}, {"label": "By class", "value": (report.depth_by_class | tojson) if report.depth_by_class else "empty"}, {"label": "Oldest queued", "value": (report.oldest_queued_age_seconds | round(1) ~ " s") if report.oldest_queued_age_seconds is not none else "—"}, {"label": "Starving", "value": report.starving}, {"label": "Completed, last 5 min", "value": report.throughput.completed_last_5m}, {"label": "Dispatch latency", "value": (report.dispatch_latency_ms.median | round(1) ~ " ms median, " ~ report.dispatch_latency_ms.max | round(1) ~ " ms max over " ~ report.dispatch_latency_ms.samples ~ " claims") if report.dispatch_latency_ms and report.dispatch_latency_ms.samples else "no claim yet"}, {"label": "Dispatch", "value": (badge("paused", tone="warning") if report.flags.paused else badge("draining", tone="warning") if report.flags.draining else badge("running", tone="success")) | safe}, {"label": "Last recovery", "value": (report.last_recovery.touched ~ " job(s) reconciled") if report.last_recovery else "—"}, ]) }}