Skip to content

Commit c671ac2

Browse files
authored
Add dns_name filter on the IP Address page (#14046)
* Add dns_name filter on the IP Address page #13957 * add dns_name field in the filterset field and remove extra method
1 parent 18a813a commit c671ac2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

netbox/ipam/forms/filtersets.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
295295
model = IPAddress
296296
fieldsets = (
297297
(None, ('q', 'filter_id', 'tag')),
298-
(_('Attributes'), ('parent', 'family', 'status', 'role', 'mask_length', 'assigned_to_interface')),
298+
(_('Attributes'), ('parent', 'family', 'status', 'role', 'mask_length', 'assigned_to_interface', 'dns_name')),
299299
(_('VRF'), ('vrf_id', 'present_in_vrf_id')),
300300
(_('Tenant'), ('tenant_group_id', 'tenant_id')),
301301
(_('Device/VM'), ('device_id', 'virtual_machine_id')),
@@ -357,6 +357,10 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
357357
choices=BOOLEAN_WITH_BLANK_CHOICES
358358
)
359359
)
360+
dns_name = forms.CharField(
361+
required=False,
362+
label=_('DNS Name')
363+
)
360364
tag = TagFilterField(model)
361365

362366

0 commit comments

Comments
 (0)