{# Audit cost-summary cards — vendored from governor_web/templates/dashboard/_cost_summary.html @ 19455c57c5a9. Same Total / Build / Consumption / fourth-card layout. Audit's fourth card is "Flagged Spend" (cost touched by detection rules) instead of cloud's Storage Monthly. Per-rule findings live on /opportunities — there's no Active Issues pane on the dashboard. #}
{# Total Spend #}

Total Spend

{{ totals.total_cost_usd | format_usd }}

across {{ "{:,}".format(totals.total_jobs) }} job{{ "s" if totals.total_jobs != 1 else "" }}

{# Build Spend — materialising jobs such as CTAS / MERGE / INSERT / UPDATE / DELETE #}

Build Spend

{{ totals.build_spend | format_usd }}

{% if totals.total_cost_usd and totals.build_spend %}

{{ "%.0f" | format(totals.build_spend / totals.total_cost_usd * 100) }}% of cached spend

{% else %}

materialising writes

{% endif %}
{# Consumption Spend — read-only jobs such as SELECTs from BI tools or ad-hoc analysts #}

Consumption Spend

{{ totals.consumption_spend | format_usd }}

{% if totals.total_cost_usd and totals.consumption_spend %}

{{ "%.0f" | format(totals.consumption_spend / totals.total_cost_usd * 100) }}% of cached spend

{% else %}

read-only consumers

{% endif %}
{# Flagged Spend — measured cost of jobs touched by ≥1 detection rule. #}

Flagged Spend

{{ (totals.flagged_spend | default(0)) | format_usd }}

{% if totals.total_cost_usd and totals.flagged_spend %}

{{ "%.0f" | format(totals.flagged_spend / totals.total_cost_usd * 100) }}% of cached spend

{% else %}

spend on flagged jobs

{% endif %}