1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3026: Tweak prefix/IP filter forms to filter using VRF ID rather than route distinguisher

This commit is contained in:
Jeremy Stretch
2019-03-28 10:06:25 -04:00
parent 3f5f75c71f
commit dff3165402
2 changed files with 4 additions and 7 deletions

View File

@ -524,14 +524,12 @@ class PrefixFilterForm(BootstrapMixin, CustomFieldFilterForm):
label='Mask length',
widget=StaticSelect2()
)
vrf = FilterChoiceField(
vrf_id = FilterChoiceField(
queryset=VRF.objects.all(),
to_field_name='rd',
label='VRF',
null_label='-- Global --',
widget=APISelectMultiple(
api_url="/api/ipam/vrfs/",
value_field="rd",
null_option=True,
)
)
@ -973,14 +971,12 @@ class IPAddressFilterForm(BootstrapMixin, CustomFieldFilterForm):
label='Mask length',
widget=StaticSelect2()
)
vrf = FilterChoiceField(
vrf_id = FilterChoiceField(
queryset=VRF.objects.all(),
to_field_name='rd',
label='VRF',
null_label='-- Global --',
widget=APISelectMultiple(
api_url="/api/ipam/vrfs/",
value_field="rd",
null_option=True,
)
)