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

Fixes #557: Add 'global' choice to VRF filter for prefixes and IP addresses

This commit is contained in:
Jeremy Stretch
2016-09-15 16:03:53 -04:00
parent 2567412121
commit daadf7a49b
2 changed files with 10 additions and 6 deletions

View File

@@ -272,7 +272,8 @@ class PrefixFilterForm(BootstrapMixin, CustomFieldFilterForm):
'placeholder': 'Network',
}))
family = forms.ChoiceField(required=False, choices=IP_FAMILY_CHOICES, label='Address Family')
vrf = FilterChoiceField(choices=get_filter_choices(VRF, count_field='prefixes'), label='VRF')
vrf = FilterChoiceField(choices=get_filter_choices(VRF, count_field='prefixes', null_option=(0, 'Global')),
label='VRF')
tenant = FilterChoiceField(choices=get_filter_choices(Tenant, id_field='slug', count_field='prefixes'),
label='Tenant')
status = FilterChoiceField(choices=prefix_status_choices)