{% macro header(report_name, site_filter) %}

{{ report_name|upper }}

{% if site_filter %}
for site {{ site_filter }}
{% endif %}
{% endmacro %} {% macro network_summary(network_summary_data) %}

Snapshot Data Summary

{% for key, data in network_summary_data.items() %} {% endfor %}
{{ data.name }} {{ data.value }}
{% endmacro %} {% macro per_site_summary(per_site_summary_data, site_filter) %}

Site {{ site_filter }} Summary

{% for key, data in per_site_summary_data.items() %} {% endfor %}
{{ data.name }} {{ data.value }}
{% endmacro %} {% macro footer(report_name, current_time) %} {% endmacro %} {% macro stat_table(data, headers=['Item', 'Count', 'Ratio (%)']) %} {% for header in headers %} {% endfor %} {% for item, stats in data %} {% endfor %}
{{ header }}
{{ item }} {{ stats.count }} {{ stats.percentage|round(2) }}%
{% endmacro %} {% macro key_value_table(data) %} {% for item_name, item_value in data %} {% endfor %}
{{ item_name }} {{ item_value }}
{% endmacro %} {% macro section_title(title, index, site_filter=None) %}
{{ index }}

{{ title }} {% if site_filter %} for site {{ site_filter }}{% endif %}

{% endmacro %} {% macro report_introduction(report_details) %}
Report Introduction
{% for text in report_details.introduction %}

{{ text }}

{% endfor %}
{% endmacro %} {% macro standard_summary_section(network_summary_data, site_summary_data=None, site_filter=None) %} {{ network_summary(network_summary_data) }} {% if site_filter and site_summary_data %} {{ per_site_summary(site_summary_data, site_filter) }} {% endif %} {% endmacro %} {% macro stats_grid(stats_data, heading=None) %}
{% if heading %}

{{ heading }}

{% endif %}
{% for stat in stats_data %}
{{ stat.label }} {{ stat.value }}
{% endfor %}
{% endmacro %}