{% set selected_lens = selected_lens | default('all') %} {% if local_model_dashboard %} {% if local_model_drivers and local_model_drivers | length > 0 %}
{% for driver in local_model_drivers %} {% endfor %}
Model Materialization Cost Bytes Issues Enhancements Score Execution State Opportunity
{{ driver.model_name }} {{ driver.materialization | title }} {{ driver.cost }} {{ driver.bytes }} {% if driver.issues > 0 %} {{ driver.issues }} {% else %} 0 {% endif %} {% if driver.enhancements > 0 %} {{ driver.enhancements }} {% else %} 0 {% endif %} {{ driver.score }} {{ driver.duration }} {% if driver.job_state == 'DONE' %} Done {% elif driver.job_state == 'FAILED' %} Failed {% else %} {{ driver.job_state | title }} {% endif %} {% if driver.opportunity_url %} View{% if driver.opportunity_count > 1 %} {{ driver.opportunity_count }}{% endif %} {% else %} {% endif %}
{# Expand / collapse toggle #} {% if local_model_dashboard and local_model_pagination and local_model_pagination.total_items > 5 %}
{% if local_model_pagination.page_size == 5 %} {% else %} {% endif %}
{% endif %} {% set pagination = local_model_pagination %} {% include "dashboard/_cost_drivers_pagination.html" %} {% else %}

{% if search_query is defined and search_query %} No models match your search {% else %} No local model results found for the latest run {% endif %}

{% endif %} {% elif project_drivers and project_drivers | length > 0 %}
{% for driver in project_drivers %} {% endfor %}
Project {% if selected_lens == 'storage' %}Monthly Cost{% else %}Spend{% endif %} {% if selected_lens == 'storage' %}Datasets{% else %}Jobs{% endif %} {% if selected_lens == 'storage' %}Physical Size{% else %}Slot Time{% endif %} {% if selected_lens == 'storage' %}Logical Size{% else %}Data Processed{% endif %} {% if selected_lens == 'storage' %}Latest Snapshot{% else %}Duration{% endif %} Opportunities {% if selected_lens == 'storage' %}Potential Savings{% else %}Verified Savings{% endif %}
{{ driver.config_name }}
{{ driver.spend }} {{ driver.percentage }}%
{{ "{:,}".format(driver.job_count) }} {{ driver.slot_time }} {{ driver.data_processed }} {{ driver.duration }} {% if driver.opportunity_count > 0 %} {{ driver.opportunity_count }} {% else %} 0 {% endif %} {% if driver.potential_savings and driver.potential_savings != "$0.00" %} {{ driver.potential_savings }} {% else %} $0.00 {% endif %}
{% include "dashboard/_cost_drivers_pagination.html" %} {% else %}

{% if search_query is defined and search_query %} No projects match your search {% else %} {% if selected_lens == 'storage' %} No storage drivers found for this period {% else %} No cost drivers found for this period {% endif %} {% endif %}

{% endif %}