Fixes #10118: Fix display of connected LLDP neighbors for devices

This commit is contained in:
jeremystretch 2022-08-25 15:25:30 -04:00
parent 1b91d7adc6
commit b675f70305
2 changed files with 21 additions and 18 deletions

View File

@ -29,7 +29,8 @@
* [#10094](https://github.com/netbox-community/netbox/issues/10094) - Fix 404 when using "create and add another" to add contact assignments * [#10094](https://github.com/netbox-community/netbox/issues/10094) - Fix 404 when using "create and add another" to add contact assignments
* [#10108](https://github.com/netbox-community/netbox/issues/10108) - Linkify inside NAT IPs for primary device IPs in UI * [#10108](https://github.com/netbox-community/netbox/issues/10108) - Linkify inside NAT IPs for primary device IPs in UI
* [#10109](https://github.com/netbox-community/netbox/issues/10109) - Fix available prefixes calculation for container prefixes in the global table * [#10109](https://github.com/netbox-community/netbox/issues/10109) - Fix available prefixes calculation for container prefixes in the global table
* [#10111](https://github.com/netbox-community/netbox/issues/10111) - Wrap search QS to catch ValueError on identifier field * [#10111](https://github.com/netbox-community/netbox/issues/10111) - Fix ValueError exception when searching for L2VPN objects
* [#10118](https://github.com/netbox-community/netbox/issues/10118) - Fix display of connected LLDP neighbors for devices
* [#10134](https://github.com/netbox-community/netbox/issues/10134) - Custom fields data serializer should return a 400 response for invalid data * [#10134](https://github.com/netbox-community/netbox/issues/10134) - Custom fields data serializer should return a 400 response for invalid data
* [#10135](https://github.com/netbox-community/netbox/issues/10135) - Fix SSO support for SAML2 IDPs * [#10135](https://github.com/netbox-community/netbox/issues/10135) - Fix SSO support for SAML2 IDPs
* [#10147](https://github.com/netbox-community/netbox/issues/10147) - Permit the creation of 0U device types via REST API * [#10147](https://github.com/netbox-community/netbox/issues/10147) - Permit the creation of 0U device types via REST API

View File

@ -32,23 +32,25 @@
{% for iface in interfaces %} {% for iface in interfaces %}
<tr id="{{ iface.name }}"> <tr id="{{ iface.name }}">
<td>{{ iface }}</td> <td>{{ iface }}</td>
{% if iface.connected_endpoint.device %} {% with peer=iface.connected_endpoints.0 %}
<td class="configured_device" data="{{ iface.connected_endpoint.device.name }}" data-chassis="{{ iface.connected_endpoint.device.virtual_chassis.name }}"> {% if peer.device %}
<a href="{% url 'dcim:device' pk=iface.connected_endpoint.device.pk %}">{{ iface.connected_endpoint.device }}</a> <td class="configured_device" data="{{ peer.device.name }}" data-chassis="{{ peer.device.virtual_chassis.name }}">
</td> <a href="{% url 'dcim:device' pk=peer.device.pk %}">{{ peer.device }}</a>
<td class="configured_interface" data="{{ iface.connected_endpoint.name }}"> </td>
<span title="{{ iface.connected_endpoint.get_type_display }}">{{ iface.connected_endpoint }}</span> <td class="configured_interface" data="{{ peer.name }}">
</td> <span title="{{ peer.get_type_display }}">{{ peer }}</span>
{% elif iface.connected_endpoint.circuit %} </td>
{% with circuit=iface.connected_endpoint.circuit %} {% elif peer.circuit %}
<td colspan="2"> {% with circuit=peer.circuit %}
<i class="mdi mdi-lightning-bolt" title="Circuit"></i> <td colspan="2">
<a href="{{ circuit.get_absolute_url }}">{{ circuit.provider }} {{ circuit }}</a> <i class="mdi mdi-lightning-bolt" title="Circuit"></i>
</td> <a href="{{ circuit.get_absolute_url }}">{{ circuit.provider }} {{ circuit }}</a>
{% endwith %} </td>
{% else %} {% endwith %}
<td class="text-muted" colspan="2">None</td> {% else %}
{% endif %} <td class="text-muted" colspan="2">None</td>
{% endif %}
{% endwith %}
<td class="device"></td> <td class="device"></td>
<td class="interface"></td> <td class="interface"></td>
</tr> </tr>