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:
@ -614,10 +614,12 @@ class PowerConnectionTable(BaseTable):
|
|||||||
class InterfaceConnectionTable(BaseTable):
|
class InterfaceConnectionTable(BaseTable):
|
||||||
device_a = tables.LinkColumn('dcim:device', accessor=Accessor('interface_a.device'),
|
device_a = tables.LinkColumn('dcim:device', accessor=Accessor('interface_a.device'),
|
||||||
args=[Accessor('interface_a.device.pk')], verbose_name='Device A')
|
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'),
|
device_b = tables.LinkColumn('dcim:device', accessor=Accessor('interface_b.device'),
|
||||||
args=[Accessor('interface_b.device.pk')], verbose_name='Device B')
|
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):
|
class Meta(BaseTable.Meta):
|
||||||
model = InterfaceConnection
|
model = InterfaceConnection
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
|
<a href="{% url 'dcim:device' pk=connected_iface.device.pk %}">{{ connected_iface.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
</td>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% elif iface.circuit_termination %}
|
{% elif iface.circuit_termination %}
|
||||||
|
@ -134,7 +134,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ connected_interface.name }}</td>
|
<td>
|
||||||
|
<a href="{{ connected_interface.get_absolute_url }}">{{ connected_interface.name }}</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
|
Reference in New Issue
Block a user