From 62d497dd0bf7f829c9c1dc6b28e63b6455e2a871 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 14 May 2019 19:03:03 -0400 Subject: [PATCH] Closes #3186: Add interface name filter for IP addresses --- CHANGELOG.md | 1 + netbox/ipam/filters.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5ab7badb..6014da3dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * [#2813](https://github.com/digitalocean/netbox/issues/2813) - Add tenant group filters * [#3150](https://github.com/digitalocean/netbox/issues/3150) - Fix formatting of cable length during cable trace * [#3085](https://github.com/digitalocean/netbox/issues/3085) - Catch all exceptions during export template rendering +* [#3186](https://github.com/digitalocean/netbox/issues/3186) - Add interface name filter for IP addresses ## Bug Fixes diff --git a/netbox/ipam/filters.py b/netbox/ipam/filters.py index a6e986117..a5464e4d0 100644 --- a/netbox/ipam/filters.py +++ b/netbox/ipam/filters.py @@ -286,6 +286,12 @@ class IPAddressFilter(TenancyFilterSet, CustomFieldFilterSet): to_field_name='name', label='Virtual machine (name)', ) + interface = django_filters.ModelMultipleChoiceFilter( + field_name='interface__name', + queryset=Interface.objects.all(), + to_field_name='name', + label='Interface (ID)', + ) interface_id = django_filters.ModelMultipleChoiceFilter( queryset=Interface.objects.all(), label='Interface (ID)',