mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
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
This commit is contained in:
@ -295,7 +295,7 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|||||||
model = IPAddress
|
model = IPAddress
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, ('q', 'filter_id', 'tag')),
|
(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')),
|
(_('VRF'), ('vrf_id', 'present_in_vrf_id')),
|
||||||
(_('Tenant'), ('tenant_group_id', 'tenant_id')),
|
(_('Tenant'), ('tenant_group_id', 'tenant_id')),
|
||||||
(_('Device/VM'), ('device_id', 'virtual_machine_id')),
|
(_('Device/VM'), ('device_id', 'virtual_machine_id')),
|
||||||
@ -357,6 +357,10 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|||||||
choices=BOOLEAN_WITH_BLANK_CHOICES
|
choices=BOOLEAN_WITH_BLANK_CHOICES
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
dns_name = forms.CharField(
|
||||||
|
required=False,
|
||||||
|
label=_('DNS Name')
|
||||||
|
)
|
||||||
tag = TagFilterField(model)
|
tag = TagFilterField(model)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user