{# T55 admin dashboard — terminal-brutalist re-skin. #} {# Extends the new admin_layout.html. Data shape (collect_all_stats) is #} {# unchanged; we render eight KPI panels as stat grids + mono data tables. #} {% extends "admin_layout.html" %} {% block page_title %}admin :: dashboard{% endblock %} {% block breadcrumb %} admin/ dashboard {% endblock %} {% block content %}
01 — operations

Stats. Eight panels, one truth.

KPIs aggregated by admin_stats.collect_all_stats. Volume, outcomes, cost, sandbox spend, and prompt-level reliability — all from the live scans + llm_calls tables. UTC throughout.

{# ===================== Volume + Outcomes ===================== #}
scan volume
today
{{ volume.today }}
last 7d
{{ volume.last_7_days }}
last 30d
{{ volume.last_30_days }}
Outcomes
success rate
{{ '%.1f'|format(outcome.success_rate * 100) }}%
{{ outcome.errored_count }} errored / {{ outcome.total_scans }} total

Top error reasons

{% if not outcome.top_error_reasons %}
// No errors recorded.
{% else %}
{% for row in outcome.top_error_reasons %} {% endfor %}
reasoncount
{{ row.reason }} {{ row.count }}
{% endif %}
{# ===================== Cost ===================== #}
cost
total
${{ '%.2f'|format(cost.total_usd) }}
today
${{ '%.2f'|format(cost.today_usd) }}
max / scan
${{ '%.4f'|format(cost.max_per_scan_usd) }}
avg / scan
${{ '%.4f'|format(cost.avg_per_scan_usd) }}

Prompt cost trend (30 days)

{% if not cost.prompt_cost_trend %}
// No LLM cost data in the last 30 days.
{% else %}
{% endif %}
{# ===================== Users + Sandbox spend ===================== #}
users
total users
{{ users.total_users }}
active (30d)
{{ users.active_30d }}

Top 5 spenders

{% if not users.top_5_spenders %}
// No spend recorded yet.
{% else %}
{% for row in users.top_5_spenders %} {% endfor %}
userscansspend
{{ row.label }} {{ row.scan_count }} ${{ '%.4f'|format(row.total_usd) }}
{% endif %}
sandbox experiments
total
${{ '%.2f'|format(experiment_cost.total_usd) }}
today
${{ '%.2f'|format(experiment_cost.today_usd) }}
runs
{{ experiment_cost.experiment_count }}

Top experimenters

{% if not experiment_cost.top_experimenters %}
// No sandbox spend yet.
{% else %}
{% for row in experiment_cost.top_experimenters %} {% endfor %}
adminrunsspend
{{ row.label }} {{ row.experiment_count }} ${{ '%.4f'|format(row.total_usd) }}
{% endif %}

all experiments

{# ===================== LLM reliability ===================== #}
LLM reliability
{% if not llm_reliability.per_prompt %}
// No LLM calls recorded yet.
{% else %}
{% for row in llm_reliability.per_prompt %} {% endfor %}
prompt ok fail retries p95 (ms)
{{ row.prompt_name }} {{ row.success_count }} {{ row.failure_count }} {{ row.retry_count }} {{ '%.0f'|format(row.p95_latency_ms) }}
{% endif %}
{# ===================== Prompt cost ===================== #}
Prompt cost
{% if not prompt_cost.per_prompt %}
// No LLM cost data recorded yet.
{% else %}
{% for row in prompt_cost.per_prompt %} {% endfor %}
prompt calls avg max min
{{ row.prompt_name }} {{ row.call_count }} ${{ '%.4f'|format(row.avg_usd) }} ${{ '%.4f'|format(row.max_usd) }} ${{ '%.4f'|format(row.min_usd) }}
{% endif %}
{# ===================== Top domains + templates ===================== #}
scan type — top domains
{% if not top_domains %}
// No scans yet.
{% else %}
{% for row in top_domains %} {% endfor %}
domainscans
{{ row.domain }}{{ row.count }}
{% endif %}
template — top scanned
{% if not top_templates %}
// No scans yet.
{% else %}
{% for row in top_templates %} {% endfor %}
templatescans
{{ row.template }}{{ row.count }}
{% endif %}
{% endblock %} {% block scripts %} {% if cost.prompt_cost_trend %} {% endif %} {% endblock %}