{# T55 admin scans list — terminal-brutalist re-skin. #} {# Filter bar (GET form, serializes to URL query params) + mono data #} {# table + sort-toggle headers + pagination footer. #} {% extends "admin_layout.html" %} {% from 'partials/help_tooltip.html' import tip, tip_styles %} {% block page_title %}admin :: scans{% endblock %} {% block breadcrumb %} admin/ scans {% endblock %} {% macro status_pill(status) -%} {%- if status == 'success' -%} success {%- elif status == 'errored' -%} errored {%- elif status == 'cancelled' -%} cancelled {%- elif status == 'soft_deleted' -%} soft-deleted {%- else -%} {{ status }} {%- endif -%} {%- endmacro %} {# Sort-toggle URL builder. Preserves every other filter param via #} {# ``filter_query`` so clicking a header doesn't reset the filter bar. #} {% macro sort_header(label, col, current_sort, current_order, filter_query) -%} {% set next_order = 'asc' if (current_sort == col and current_order == 'desc') else ('desc' if current_sort == col else 'desc') %} {% set indicator = '' %} {% if current_sort == col and current_order == 'asc' %}{% set indicator = ' ▲' %}{% endif %} {% if current_sort == col and current_order == 'desc' %}{% set indicator = ' ▼' %}{% endif %} {{ label }}{{ indicator }} {%- endmacro %} {% block content %} {{ tip_styles() }}
02 — scans

Scan ledger. {{ result.total_count }} rows.

Filterable, sortable, paginated. All scans across every tenant — production + admin + sandbox sources. Click [view] to jump to the per-scan debug page.

{# ===================== Filter bar ===================== #}
status
{% for s in ['success', 'errored', 'cancelled', 'soft_deleted'] %} {% endfor %}
options
{# Preserve sort + order across form submission. #}
reset
{# ===================== Data table ===================== #}
results {{ result.rows|length }} of {{ result.total_count }}
{% if not result.rows %}
// No scans found.
{% else %} {% for row in result.rows %} {% endfor %}
scan id {{ sort_header('created', 'created_at', filt.sort_by, filt.sort_order, filter_query) }} owner {{ sort_header('domain', 'target_domain', filt.sort_by, filt.sort_order, filter_query) }} template status {{ sort_header('cost', 'cost_usd', filt.sort_by, filt.sort_order, filter_query) }} actions
{{ row.scan_id_short }} {{ row.created_at.strftime('%Y-%m-%d %H:%M') }} {{ row.owner_email or '(anonymous)' }} {{ row.target_domain or '-' }} {{ row.starter_template or '-' }} {{ status_pill(row.status) }} ${{ '%.4f'|format(row.cost_usd) }} view
{% endif %}
{# ===================== Pagination footer ===================== #} {% if result.rows %} {% set start = ((result.page - 1) * result.page_size) + 1 %} {% set end = start + result.rows|length - 1 %}
// showing {{ start }}{{ end }} of {{ result.total_count }}
{% if result.page > 1 %} ← prev {% else %} ← prev {% endif %} page {{ result.page }} {% if result.has_more %} next → {% else %} next → {% endif %}
{% endif %} {% endblock %}