mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 08:08:15 -06:00
Added IFACE_ENABLED_CHOICES for InterfaceListFilterForm
This commit is contained in:
parent
c97f490ee8
commit
35f3e573b3
@ -48,6 +48,11 @@ IFACE_ORDERING_CHOICES = [
|
|||||||
[IFACE_ORDERING_NAME, 'Name (alphabetically)']
|
[IFACE_ORDERING_NAME, 'Name (alphabetically)']
|
||||||
]
|
]
|
||||||
|
|
||||||
|
IFACE_ENABLED_CHOICES = [
|
||||||
|
[IFACE_ENABLED,'Enabled'],
|
||||||
|
[IFACE_DISABLED,'Disabled']
|
||||||
|
]
|
||||||
|
|
||||||
# Interface form factors
|
# Interface form factors
|
||||||
# Virtual
|
# Virtual
|
||||||
IFACE_FF_VIRTUAL = 0
|
IFACE_FF_VIRTUAL = 0
|
||||||
|
@ -1574,7 +1574,7 @@ class InterfaceFilterForm(BootstrapMixin, forms.Form):
|
|||||||
class InterfaceListFilterForm(BootstrapMixin, forms.Form):
|
class InterfaceListFilterForm(BootstrapMixin, forms.Form):
|
||||||
site = forms.ModelChoiceField(required=False, queryset=Site.objects.all(), to_field_name='slug')
|
site = forms.ModelChoiceField(required=False, queryset=Site.objects.all(), to_field_name='slug')
|
||||||
device = forms.ModelChoiceField(required=False, queryset=Device.objects.all(), to_field_name='slug')
|
device = forms.ModelChoiceField(required=False, queryset=Device.objects.all(), to_field_name='slug')
|
||||||
enabled = forms.ModelChoiceField(choices=((INTERFACE_ENABLED,'Enabled'),(INTERFACE_DISABLED,'Disabled')),required=False)
|
enabled = forms.ModelChoiceField(choices=IFACE_ENABLED_CHOICES,required=False)
|
||||||
role = FilterChoiceField(
|
role = FilterChoiceField(
|
||||||
queryset=DeviceRole.objects.annotate(filter_count=Count('devices')),
|
queryset=DeviceRole.objects.annotate(filter_count=Count('devices')),
|
||||||
to_field_name='slug',
|
to_field_name='slug',
|
||||||
|
Loading…
Reference in New Issue
Block a user