{# 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 %}
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=("of " ~ "{:,}".format(totals.total_logical_jobs) ~ " logical jobs (" ~ ("%.0f" | format(pagination.total_items / totals.total_logical_jobs * 100)) ~ "%)") if (totals.total_logical_jobs and pagination and pagination.total_items) else "logical jobs with at least one finding",
accent="amber",
tooltip="Number of logical jobs (aggregated by destination_table for builds, by normalized query hash for consumption) where at least one execution fired an issue or suggestion rule, out of the TOTAL number of logical jobs in the scan. NOT a count of raw executions - one logical job typically aggregates many runs. Each row of the cost-drivers table below is one of these flagged logical jobs."
) }}
{{ 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 non-failed job (BigQuery generally refunds bytes-billed on failed jobs, so they are excluded here and from every dollar figure on this row). The dollar columns 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 non-failed job (failed jobs are excluded so this matches the dollar figures on this row), 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.'
) }}