mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 12:12:53 -06:00
add 'vlan' to prefix bulk edit (#17142)
* add 'vlan' to prefix bulk edit * Move VLAN fields to a separate field set in bulk edit form --------- Co-authored-by: Pieter Lambrecht <pieter.lambrecht@accenture.com> Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
9e54cfe340
commit
6feb8bf0e3
@ -221,6 +221,19 @@ class PrefixBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
'group_id': '$site_group',
|
'group_id': '$site_group',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
vlan_group = DynamicModelChoiceField(
|
||||||
|
queryset=VLANGroup.objects.all(),
|
||||||
|
required=False,
|
||||||
|
label=_('VLAN Group')
|
||||||
|
)
|
||||||
|
vlan = DynamicModelChoiceField(
|
||||||
|
queryset=VLAN.objects.all(),
|
||||||
|
required=False,
|
||||||
|
label=_('VLAN'),
|
||||||
|
query_params={
|
||||||
|
'group_id': '$vlan_group',
|
||||||
|
}
|
||||||
|
)
|
||||||
vrf = DynamicModelChoiceField(
|
vrf = DynamicModelChoiceField(
|
||||||
queryset=VRF.objects.all(),
|
queryset=VRF.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
@ -269,9 +282,10 @@ class PrefixBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
FieldSet('tenant', 'status', 'role', 'description'),
|
FieldSet('tenant', 'status', 'role', 'description'),
|
||||||
FieldSet('region', 'site_group', 'site', name=_('Site')),
|
FieldSet('region', 'site_group', 'site', name=_('Site')),
|
||||||
FieldSet('vrf', 'prefix_length', 'is_pool', 'mark_utilized', name=_('Addressing')),
|
FieldSet('vrf', 'prefix_length', 'is_pool', 'mark_utilized', name=_('Addressing')),
|
||||||
|
FieldSet('vlan_group', 'vlan', name=_('VLAN Assignment')),
|
||||||
)
|
)
|
||||||
nullable_fields = (
|
nullable_fields = (
|
||||||
'site', 'vrf', 'tenant', 'role', 'description', 'comments',
|
'site', 'vlan', 'vrf', 'tenant', 'role', 'description', 'comments',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user