mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #5641: Allow filtering device components by label
This commit is contained in:
@ -60,12 +60,18 @@ def get_device_by_name_or_pk(name):
|
||||
|
||||
class DeviceComponentFilterForm(BootstrapMixin, forms.Form):
|
||||
field_order = [
|
||||
'q', 'region', 'site'
|
||||
'q', 'name', 'label', 'region', 'site'
|
||||
]
|
||||
q = forms.CharField(
|
||||
required=False,
|
||||
label='Search'
|
||||
)
|
||||
name = forms.CharField(
|
||||
required=False
|
||||
)
|
||||
label = forms.CharField(
|
||||
required=False
|
||||
)
|
||||
region = DynamicModelMultipleChoiceField(
|
||||
queryset=Region.objects.all(),
|
||||
to_field_name='slug',
|
||||
|
Reference in New Issue
Block a user