{# Spec 125: one row per dbt model (local-mode grouping). Expects: model_groups: list[dict] — ModelGroup DTOs from OpportunityExplorerService.query_model_groups pagination: PaginationContext #}
| {{ col_label }} | {% endfor %}State | ||||||
|---|---|---|---|---|---|---|---|
| {{ g.project_name }} | {{ g.dbt_model_name }} {% if g.opportunity_count > 1 %} {{ g.opportunity_count }} issues {% endif %} | {% if g.opportunity_count == 1 %} {{ g.opportunity_types[0] | replace('_', ' ') }} {% else %} {# Show first 2 types + "+N more" if there are further ones #} {{ g.opportunity_types[0] | replace('_', ' ') }}{% if g.opportunity_types | length >= 2 %}, {{ g.opportunity_types[1] | replace('_', ' ') }}{% endif %}{% if g.opportunity_types | length > 2 %} +{{ g.opportunity_types | length - 2 }} more{% endif %} {% endif %} | {% if g.workload_kind == 'build' %} Build {% elif g.workload_kind == 'consumption' %} Consumption {% elif g.workload_kind == 'mixed' %} Mixed {% else %} Unclassified {% endif %} | {% if g.total_query_cost_value is not none %} {{ g.total_query_cost_value | format_usd }} {% else %} — {% endif %} | {% if g.total_savings_value is not none and g.total_savings_value > 0 %} ~{{ g.total_savings_value | format_usd }} ↓ {% else %} — {% endif %} | {{ g.last_detected_at.strftime("%d/%m/%Y") if g.last_detected_at else "—" }} | {% if g.worst_state == 'high_risk' %} High risk {% elif g.worst_state == 'failed' %} Failed {% elif g.worst_state == 'requires_review' %} Review {% elif g.worst_state == 'generating' %} Generating {% elif g.worst_state == 'upstream_fix' %} Upstream fix {% elif g.worst_state == 'safe' %} Safe {% elif g.worst_state == 'resolved' %} Resolved {% elif g.worst_state == 'skipped' %} Skipped {% else %} Awaiting {% endif %} |
No opportunities match your filters
{% endif %}