Skip to content

Commit

Permalink
Add dns_name filter on the IP Address page (#14046)
Browse files Browse the repository at this point in the history
* Add dns_name filter on the IP Address page #13957

* add dns_name field in the filterset field and remove extra method
  • Loading branch information
kprince28 authored Oct 17, 2023
1 parent 18a813a commit c671ac2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netbox/ipam/forms/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
model = IPAddress
fieldsets = (
(None, ('q', 'filter_id', 'tag')),
(_('Attributes'), ('parent', 'family', 'status', 'role', 'mask_length', 'assigned_to_interface')),
(_('Attributes'), ('parent', 'family', 'status', 'role', 'mask_length', 'assigned_to_interface', 'dns_name')),
(_('VRF'), ('vrf_id', 'present_in_vrf_id')),
(_('Tenant'), ('tenant_group_id', 'tenant_id')),
(_('Device/VM'), ('device_id', 'virtual_machine_id')),
Expand Down Expand Up @@ -357,6 +357,10 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
dns_name = forms.CharField(
required=False,
label=_('DNS Name')
)
tag = TagFilterField(model)


Expand Down

0 comments on commit c671ac2

Please sign in to comment.