diff --git a/CHANGELOG.md b/CHANGELOG.md index 19859dc0f..2ec56bbb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ NetBox now supports modeling physical cables for console, power, and interface c * [#1444](https://github.com/digitalocean/netbox/issues/1444) - Added an `asset_tag` field for racks * [#1931](https://github.com/digitalocean/netbox/issues/1931) - Added a count of assigned IP addresses to the interface API serializer * [#2000](https://github.com/digitalocean/netbox/issues/2000) - Dropped support for Python 2 +* [#2057](https://github.com/digitalocean/netbox/issues/2057) - Added description columns to interface connections list * [#2104](https://github.com/digitalocean/netbox/issues/2104) - Added a `status` field for racks * [#2165](https://github.com/digitalocean/netbox/issues/2165) - Improved natural ordering of Interfaces * [#2292](https://github.com/digitalocean/netbox/issues/2292) - Removed the deprecated UserAction model diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py index 72bf30c14..361bfcebd 100644 --- a/netbox/dcim/tables.py +++ b/netbox/dcim/tables.py @@ -716,6 +716,10 @@ class InterfaceConnectionTable(BaseTable): args=[Accessor('pk')], verbose_name='Interface A' ) + description_a = tables.Column( + accessor=Accessor('description'), + verbose_name='Description' + ) device_b = tables.LinkColumn( viewname='dcim:device', accessor=Accessor('connected_endpoint.device'), @@ -728,6 +732,10 @@ class InterfaceConnectionTable(BaseTable): args=[Accessor('connected_endpoint.pk')], verbose_name='Interface B' ) + description_b = tables.Column( + accessor=Accessor('connected_endpoint.description'), + verbose_name='Description' + ) cable = tables.LinkColumn( viewname='dcim:cable', args=[Accessor('cable.pk')] @@ -735,7 +743,7 @@ class InterfaceConnectionTable(BaseTable): class Meta(BaseTable.Meta): model = Interface - fields = ('device_a', 'interface_a', 'device_b', 'interface_b', 'cable') + fields = ('device_a', 'interface_a', 'description_a', 'device_b', 'interface_b', 'description_b', 'cable') # diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index 31787ec6d..045562e30 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -1732,6 +1732,8 @@ class InterfaceConnectionsListView(ObjectListView): # Avoid duplicate connections by only selecting the lower PK in a connected pair _connected_interface__isnull=False, pk__lt=F('_connected_interface') + ).order_by( + 'device' ) filter = filters.InterfaceConnectionFilter filter_form = forms.InterfaceConnectionFilterForm