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

fixes #2423 - interface connection links

This commit is contained in:
John Anderson
2018-09-15 17:23:58 -04:00
parent b97597c645
commit 57b225b680
3 changed files with 8 additions and 4 deletions

View File

@ -614,10 +614,12 @@ class PowerConnectionTable(BaseTable):
class InterfaceConnectionTable(BaseTable):
device_a = tables.LinkColumn('dcim:device', accessor=Accessor('interface_a.device'),
args=[Accessor('interface_a.device.pk')], verbose_name='Device A')
interface_a = tables.Column(verbose_name='Interface A')
interface_a = tables.LinkColumn('dcim:interface', accessor=Accessor('interface_a'),
args=[Accessor('interface_a.pk')], verbose_name='Interface A')
device_b = tables.LinkColumn('dcim:device', accessor=Accessor('interface_b.device'),
args=[Accessor('interface_b.device.pk')], verbose_name='Device B')
interface_b = tables.Column(verbose_name='Interface B')
interface_b = tables.LinkColumn('dcim:interface', accessor=Accessor('interface_b'),
args=[Accessor('interface_b.pk')], verbose_name='Interface B')
class Meta(BaseTable.Meta):
model = InterfaceConnection

View File

@ -44,7 +44,7 @@
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
</td>
<td>
<span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span>
<a href="{% url 'dcim:interface' pk=connected_iface.pk %}"><span title="{{ connected_iface.get_form_factor_display }}">{{ connected_iface }}</span></a>
</td>
{% endwith %}
{% elif iface.circuit_termination %}

View File

@ -134,7 +134,9 @@
</tr>
<tr>
<td>Name</td>
<td>{{ connected_interface.name }}</td>
<td>
<a href="{{ connected_interface.get_absolute_url }}">{{ connected_interface.name }}</a>
</td>
</tr>
<tr>
<td>Type</td>