{# Audit cost-summary cards - vendored from governor_web/templates/dashboard/_cost_summary.html @ 19455c57c5a9. Total / Build / Consumption / Flagged / Bytes / Slot in a single row of six on wide screens. The pre-compiled Tailwind bundle in packages/audit/.../static/css only includes grid-cols-1..5; grid-cols-6 was never in the source when CSS was built, so we inline the 6-column rule below to avoid needing a Tailwind rebuild. Below xl we still use Tailwind's built-in 1/2/3 column classes. #} {% from "components/_stat_card.html" import stat_card %}
{{ stat_card( "Total Spend", totals.total_cost_usd | format_usd, meta="across " ~ "{:,}".format(totals.total_jobs) ~ " job" ~ ("s" if totals.total_jobs != 1 else "") ) }} {{ stat_card( "Build Spend", totals.build_spend | format_usd, meta=(("%.0f" | format(totals.build_spend / totals.total_cost_usd * 100)) ~ "% of scanned spend") if (totals.total_cost_usd and totals.build_spend) else "materialising writes", accent="brand", tooltip='Spend on jobs classified as build - queries that materialise data (CTAS, MERGE, INSERT, UPDATE, DELETE). These are your warehouse build costs.' ) }} {{ stat_card( "Consumption Spend", totals.consumption_spend | format_usd, meta=(("%.0f" | format(totals.consumption_spend / totals.total_cost_usd * 100)) ~ "% of scanned spend") if (totals.total_cost_usd and totals.consumption_spend) else "read-only consumers", accent="teal", tooltip='Spend on jobs classified as consumption - read-only queries from BI tools, ad-hoc analysts, reverse-ETL exports, and other consumers. These read your warehouse without writing to it.' ) }} {{ stat_card( "Flagged Jobs", "{:,}".format(pagination.total_items if pagination else 0), meta=(("%.0f" | format(pagination.total_items / totals.total_jobs * 100)) ~ "% of scanned jobs") if (totals.total_jobs and pagination and pagination.total_items) else "jobs with at least one finding", accent="amber", tooltip="Number of scanned query executions that hit at least one detection rule. Pairs with the Optimisable spend headline above (which sums their cost)." ) }} {{ stat_card( "Bytes Scanned", totals.total_bytes_processed | format_bytes, meta="processed across " ~ "{:,}".format(totals.total_jobs) ~ " job" ~ ("s" if totals.total_jobs != 1 else ""), tooltip='Sum of total_bytes_processed across every cached job. This is the raw read volume BigQuery moved through compute - the dollar figures derive from total_bytes_billed, which rounds up per query.' ) }} {{ stat_card( "Slot Time", (("%.1f" | format(totals.total_slot_hours)) ~ " hrs") if totals.total_slot_hours else "-", meta="slot-hours across the scan window", tooltip='Sum of total_slot_ms across every cached job, converted to slot-hours. Slot time is BigQuery'"'"'s measure of compute work - a query with heavy JOINs / window functions can burn slots without scanning many bytes. Useful as a reservation-sizing signal.' ) }}