{# Plan 61/2b W2 — "By machine" sub-tab content. D3 from per-machine-spend.md. Sorts by total descending; shows top models + a 24h sparkline + a burn-rate warning badge when the last-hour spend exceeds 5× the 7d-avg-per-hour for that machine. Coordinates with W1: the `llm_spend_record.machine_id` column is owned by the parallel agent W1's migration. Until that lands, the endpoint returns an empty list with `meta.machine_id_column_pending=true` and we surface a pending-state notice instead of an empty table. Plan 60/1.5 pagination — uses paginationState({mode:'offset'}) but we read `meta.machine_id_column_pending` ourselves by wrapping `fetch()` so the pending flag bubbles back to the component. #} {% from 'admin/components/ui.html' import card, pagination, tooltip, empty_state %}
Burn rate {{ tooltip('Last-hour spend > 5× the 7-day average per hour for this machine. Surfaces unexpected spikes.') }}
{{ empty_state( "Waiting for per-machine attribution", "The llm_spend_record.machine_id column is being added by Plan 61/2b W1. The breakdown will start populating once that migration lands.", icon="hourglass" ) }}
{% call card() %}
Machine Spend % of fleet Top models 24h trend Flags
{{ pagination('pagination') }} {% endcall %}