{% load i18n %}
{% if addr_analysis %}
{% for section in addr_analysis %}
{% if section.field_name %}
{{ section.field_name }}
{% endif %}
{% for type_block in section.types %}
{% if type_block.type_name and type_block.type_name != section.field_name %}
{{ type_block.type_name }}
{% endif %}
{% if type_block.nodes or object_tree or type_block.intersection_tree %}
{% if section.field_slug == "diff" and type_block.intersection_tree %}
IPAM hierarchy (in both)
{% if type_block.intersection_leaf_count %}IPs: {{ type_block.intersection_leaf_count }}{% endif %}
{% for node in type_block.intersection_tree %}
{% include "netbox_nsm/inc/addr_intersection_flat_node.html" with node=node %}
{% endfor %}
{% endif %}
{% trans "All" %}
{% if summary_type_counts %}
{% include "netbox_nsm/inc/addr_type_count_badges.html" with counts=summary_type_counts diff_summary=type_block.diff_summary %}
{% else %}
{% include "netbox_nsm/inc/addr_type_count_badges.html" with counts=type_block diff_summary=type_block.diff_summary %}
{% endif %}
{% if type_block.all_copy_lines %}
{% endif %}
{% if object_tree %}
{% include "netbox_nsm/inc/ipa_object_tree_node.html" with nodes=object_tree depth=0 %}
{% else %}
{% for node in type_block.nodes %}
{% include "netbox_nsm/inc/addr_tree_node.html" with node=node depth=0 prefix=section.field_slug show_copy=True forloop_counter=forloop.counter diff_label_a=type_block.diff_summary.label_a diff_label_b=type_block.diff_summary.label_b %}
{% endfor %}
{% endif %}
{% else %}
—
{% endif %}
{% endfor %}
{% endfor %}
{% elif object_tree %}
{% trans "All" %}
{% if summary_type_counts %}
{% include "netbox_nsm/inc/addr_type_count_badges.html" with counts=summary_type_counts %}
{% endif %}
{% include "netbox_nsm/inc/ipa_object_tree_node.html" with nodes=object_tree depth=0 %}