1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Improved device interface list performance

This commit is contained in:
Jeremy Stretch
2016-12-27 13:21:19 -05:00
parent 5716207ba6
commit e647065e63
6 changed files with 27 additions and 16 deletions

View File

@@ -23,7 +23,7 @@
<tr id="{{ iface }}">
<td>{{ iface }}</td>
{% if iface.connection %}
{% with iface.get_connected_interface as connected_iface %}
{% with iface.connected_interface as connected_iface %}
<td class="configured_device" data="{{ connected_iface.device }}">
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
</td>

View File

@@ -16,7 +16,7 @@
{% if not iface.is_physical %}
<td colspan="2" class="text-muted">Virtual interface</td>
{% elif iface.connection %}
{% with iface.get_connected_interface as connected_iface %}
{% with iface.connected_interface as connected_iface %}
<td>
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
</td>
@@ -27,7 +27,7 @@
{% elif iface.circuit_termination %}
{% with iface.circuit_termination.get_peer_termination as peer_termination %}
<td colspan="2">
<i class="fa fa-fw fa-globe"></i>
<i class="fa fa-fw fa-globe" title="Circuit"></i>
{% if peer_termination %}
<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a> via
{% endif %}