added two columns to Interfaces table, showing up tagged and untagged vlans

This commit is contained in:
gorban 2020-02-07 16:42:16 +03:00
parent 1a8eea5aa9
commit 1a20e0b1ac
2 changed files with 19 additions and 0 deletions

View File

@ -585,6 +585,8 @@
<th>Name</th> <th>Name</th>
<th>LAG</th> <th>LAG</th>
<th>Description</th> <th>Description</th>
<th>Tagged vlans</th>
<th>Untagged vlan</th>
<th>MTU</th> <th>MTU</th>
<th>Mode</th> <th>Mode</th>
<th>Cable</th> <th>Cable</th>

View File

@ -38,6 +38,23 @@
{% endfor %} {% endfor %}
</td> </td>
{# Tagged ports #}
<td>
{% if iface.tagged_vlans.all %}
{% for tag in iface.tagged_vlans.all %}
<a href="{% url 'ipam:vlan' tag.id %}">{{ tag }}</a>
<br>
{% endfor %}
{% endif %}
</td>
{# Untagged ports #}
<td>
{% if iface.untagged_vlan %}
{{ iface.untagged_vlan }}
{% endif %}
</td>
{# MTU #} {# MTU #}
<td>{{ iface.mtu|default:"&mdash;" }}</td> <td>{{ iface.mtu|default:"&mdash;" }}</td>