mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Update device filters to use IDs
This commit is contained in:
parent
82c70302fd
commit
a3861ed492
@ -3171,11 +3171,12 @@ class CableFilterForm(BootstrapMixin, forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
widget=ColorSelect()
|
widget=ColorSelect()
|
||||||
)
|
)
|
||||||
device = forms.ChoiceField(
|
device_id = FilterChoiceField(
|
||||||
|
queryset=Device.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
label='Device',
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
api_url='/api/dcim/devices/',
|
api_url='/api/dcim/devices/',
|
||||||
value_field='text',
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3246,11 +3247,12 @@ class ConsoleConnectionFilterForm(BootstrapMixin, forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
to_field_name='slug'
|
to_field_name='slug'
|
||||||
)
|
)
|
||||||
device = forms.ChoiceField(
|
device_id = FilterChoiceField(
|
||||||
|
queryset=Device.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
label='Device',
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
api_url='/api/dcim/devices/',
|
api_url='/api/dcim/devices/',
|
||||||
value_field='text',
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3261,11 +3263,12 @@ class PowerConnectionFilterForm(BootstrapMixin, forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
to_field_name='slug'
|
to_field_name='slug'
|
||||||
)
|
)
|
||||||
device = forms.ChoiceField(
|
device_id = FilterChoiceField(
|
||||||
|
queryset=Device.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
label='Device',
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
api_url='/api/dcim/devices/',
|
api_url='/api/dcim/devices/',
|
||||||
value_field='text',
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3276,11 +3279,12 @@ class InterfaceConnectionFilterForm(BootstrapMixin, forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
to_field_name='slug'
|
to_field_name='slug'
|
||||||
)
|
)
|
||||||
device = forms.ChoiceField(
|
device_id = FilterChoiceField(
|
||||||
|
queryset=Device.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
label='Device',
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
api_url='/api/dcim/devices/',
|
api_url='/api/dcim/devices/',
|
||||||
value_field='text',
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -3374,11 +3378,12 @@ class InventoryItemFilterForm(BootstrapMixin, forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
label='Search'
|
label='Search'
|
||||||
)
|
)
|
||||||
device = forms.ChoiceField(
|
device_id = FilterChoiceField(
|
||||||
|
queryset=Device.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
label='Device',
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
api_url='/api/dcim/devices/',
|
api_url='/api/dcim/devices/',
|
||||||
value_field='text',
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
manufacturer = FilterChoiceField(
|
manufacturer = FilterChoiceField(
|
||||||
|
Loading…
Reference in New Issue
Block a user