{# /opportunities summary cards. Audit always runs ``local_runtime_mode = True`` so we render the two-card local layout only - the cloud- only "Estimated Savings", "Projected Savings", "Clearing Savings" cards are gone (audit doesn't run dry-runs and refuses to surface the existing rules' hardcoded-percentage savings figures). #} {% from "components/_summary_card.html" import summary_card %} {% set _coverage_pct = ((summary.with_solutions_count / summary.active_count) * 100) if summary.active_count else 0 %} {# Build the "Query Cost" subvalues - Build / Consumption / Query breakdown depending on which buckets carry non-zero cost. #} {% set _cost_sub = [] %} {% if summary.build_query_cost %} {% set _ = _cost_sub.append("Build " ~ (summary.build_query_cost | format_usd)) %} {% endif %} {% if summary.consumption_query_cost %} {% set _ = _cost_sub.append("Consumption " ~ (summary.consumption_query_cost | format_usd)) %} {% endif %} {% if summary.other_query_cost %} {% set _ = _cost_sub.append("Query " ~ (summary.other_query_cost | format_usd)) %} {% endif %}
{{ summary_card( "Active Opportunities", summary.active_count, subvalues=[ (summary.with_solutions_count ~ " ready"), (("%.0f" | format(_coverage_pct)) ~ "% coverage") ] ) }} {{ summary_card( "Query Cost", summary.total_query_cost | format_usd, subvalues=_cost_sub if _cost_sub else ["Per run"] ) }}