{% load i18n %} {% include "netbox_nsm/inc/nsm_ip_analyzer_applet_assets.html" %}
{{ nsm_panel_label }}{% if nsm_security_badge %} {{ nsm_security_badge }}{% endif %} {% if nsm_page_addr_analyzable %} {% endif %} {% trans "Assign" %}
{% if not nsm_rulebook_groups and not nsm_link_type_groups %}
{% trans "None" %}
{% endif %} {# ── Rulebooks → Rulebook → Field → Rule ────────────────────────────── #} {% if nsm_rulebook_groups %}
{% trans "Rulebooks" %} {{ nsm_unique_rules_total }}
{% for group in nsm_rulebook_groups %} {% with rb=group.rulebook %}
{% if group.rules_tab_url %} {{ rb.name }} {% else %} {{ rb.name }} {% endif %} {{ group.unique_count }}
{% for fg in group.field_groups %}
{{ fg.field.name }} {{ fg.rule_count }}
    {% trans "Loading…" %}
    {% endfor %}
    {% endwith %} {% endfor %}
    {% endif %} {% if nsm_rulebook_groups and nsm_link_type_groups %} {% endif %} {# ── ObjectLink type groups (manual assignments) ─────────────────── #} {% for group in nsm_link_type_groups %}
    15 %}style="max-height:420px;overflow-y:auto;"{% endif %}> {% for linked in group.objects %} {% if group.show_comment %}{% endif %} {% if group.show_actions %}{% endif %} {% endfor %}
    {% endfor %} {# ── Rulebooks assigned to this object (Device / VM / VDC only) ────── #} {% if nsm_enforcer_assignments %}
    {% for assignment in nsm_enforcer_assignments %} {% endfor %}
    {% endif %} {# ── Per-interface analysis (Device / VM only) ─────────────────────── #} {% if nsm_interface_analysis %}
    {% for iface in nsm_interface_analysis %}
    {% if iface.parent_url %} {{ iface.parent_name }} {% endif %} {% if iface.url %} {{ iface.name }} {% else %} {{ iface.name }} {% endif %} {{ iface.entry_count }}
    {% if iface.link_rows %}
    {% for link in iface.link_rows %} {{ link.type_label }}: {% if link.url %} {{ link.name|safe }} {% else %} {{ link.name|safe }} {% endif %} {% endfor %}
    {% endif %} {% if iface.rulebook_groups %}
    {% for group in iface.rulebook_groups %} {% with rb=group.rulebook %}
    {% if group.rules_tab_url %} {{ rb.name }} {% else %} {{ rb.name }} {% endif %} {{ group.unique_count }}
    {% for fg in group.field_groups %}
    {{ fg.field.name }} {{ fg.rule_count }}
      {% trans "Loading…" %}
      {% endfor %}
      {% endwith %} {% endfor %}
      {% endif %}
      {% endfor %}
      {% endif %}