Skip to content

Commit

Permalink
Fixes #18376: Include tagged VLANs in interfaces list for Q-in-Q inte…
Browse files Browse the repository at this point in the history
…rfaces
  • Loading branch information
jeremystretch committed Jan 10, 2025
1 parent a79d869 commit 8bb1a68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions netbox/dcim/tables/template_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,18 @@
"""

INTERFACE_TAGGED_VLANS = """
{% if record.mode == 'tagged' %}
{% load i18n %}
{% if record.mode == 'access' %}
{% elif record.mode == 'tagged-all' %}
{% trans "All" %}
{% else %}
{% if value.count > 3 %}
<a href="{% url 'ipam:vlan_list' %}?{{ record|meta:"model_name" }}_id={{ record.pk }}">{{ value.count }} VLANs</a>
{% else %}
{% for vlan in value.all %}
<a href="{{ vlan.get_absolute_url }}">{{ vlan }}</a><br />
<a href="{{ vlan.get_absolute_url }}">{{ vlan }}</a><br />
{% endfor %}
{% endif %}
{% elif record.mode == 'tagged-all' %}
All
{% endif %}
"""

Expand Down

0 comments on commit 8bb1a68

Please sign in to comment.