Closes #5678: Show available type choices for all device component import forms

This commit is contained in:
Jeremy Stretch 2021-01-26 10:17:58 -05:00
parent d4e83ca1c0
commit 90e8f26cd4
2 changed files with 17 additions and 0 deletions

View File

@ -8,6 +8,7 @@
* [#5570](https://github.com/netbox-community/netbox/issues/5570) - Add "management only" filter widget for interfaces list * [#5570](https://github.com/netbox-community/netbox/issues/5570) - Add "management only" filter widget for interfaces list
* [#5586](https://github.com/netbox-community/netbox/issues/5586) - Allow filtering virtual chassis by name and master * [#5586](https://github.com/netbox-community/netbox/issues/5586) - Allow filtering virtual chassis by name and master
* [#5612](https://github.com/netbox-community/netbox/issues/5612) - Add GG45 and TERA port types, and CAT7a and CAT8 cable types * [#5612](https://github.com/netbox-community/netbox/issues/5612) - Add GG45 and TERA port types, and CAT7a and CAT8 cable types
* [#5678](https://github.com/netbox-community/netbox/issues/5678) - Show available type choices for all device component import forms
### Bug Fixes ### Bug Fixes

View File

@ -2352,6 +2352,10 @@ class ConsolePortCSVForm(CSVModelForm):
queryset=Device.objects.all(), queryset=Device.objects.all(),
to_field_name='name' to_field_name='name'
) )
type = CSVChoiceField(
choices=ConsolePortTypeChoices,
help_text='Port type'
)
class Meta: class Meta:
model = ConsolePort model = ConsolePort
@ -2425,6 +2429,10 @@ class ConsoleServerPortCSVForm(CSVModelForm):
queryset=Device.objects.all(), queryset=Device.objects.all(),
to_field_name='name' to_field_name='name'
) )
type = CSVChoiceField(
choices=ConsolePortTypeChoices,
help_text='Port type'
)
class Meta: class Meta:
model = ConsoleServerPort model = ConsoleServerPort
@ -2510,6 +2518,10 @@ class PowerPortCSVForm(CSVModelForm):
queryset=Device.objects.all(), queryset=Device.objects.all(),
to_field_name='name' to_field_name='name'
) )
type = CSVChoiceField(
choices=PowerPortTypeChoices,
help_text='Port type'
)
class Meta: class Meta:
model = PowerPort model = PowerPort
@ -2630,6 +2642,10 @@ class PowerOutletCSVForm(CSVModelForm):
queryset=Device.objects.all(), queryset=Device.objects.all(),
to_field_name='name' to_field_name='name'
) )
type = CSVChoiceField(
choices=PowerOutletTypeChoices,
help_text='Outlet type'
)
power_port = CSVModelChoiceField( power_port = CSVModelChoiceField(
queryset=PowerPort.objects.all(), queryset=PowerPort.objects.all(),
required=False, required=False,