mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-17 17:56:29 +00:00
feat(dcim): Add "facility" field to bulk edit forms for Site and Location
Introduces a new "facility" field in the bulk edit forms for Site and Location models. Updates fieldsets and nullable fields to incorporate the "facility" field. Closes #20438
This commit is contained in:
parent
69a7c97c3e
commit
18862586e5
@ -133,6 +133,11 @@ class SiteBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
queryset=Tenant.objects.all(),
|
queryset=Tenant.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
facility = forms.CharField(
|
||||||
|
label=_('Facility'),
|
||||||
|
max_length=50,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
asns = DynamicModelMultipleChoiceField(
|
asns = DynamicModelMultipleChoiceField(
|
||||||
queryset=ASN.objects.all(),
|
queryset=ASN.objects.all(),
|
||||||
label=_('ASNs'),
|
label=_('ASNs'),
|
||||||
@ -166,10 +171,10 @@ class SiteBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
model = Site
|
model = Site
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
FieldSet('status', 'region', 'group', 'tenant', 'asns', 'time_zone', 'description'),
|
FieldSet('status', 'region', 'group', 'tenant', 'facility', 'asns', 'time_zone', 'description'),
|
||||||
)
|
)
|
||||||
nullable_fields = (
|
nullable_fields = (
|
||||||
'region', 'group', 'tenant', 'asns', 'time_zone', 'description', 'comments',
|
'region', 'group', 'tenant', 'facility', 'asns', 'time_zone', 'description', 'comments',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -198,6 +203,11 @@ class LocationBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
queryset=Tenant.objects.all(),
|
queryset=Tenant.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
facility = forms.CharField(
|
||||||
|
label=_('Facility'),
|
||||||
|
max_length=50,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
description = forms.CharField(
|
description = forms.CharField(
|
||||||
label=_('Description'),
|
label=_('Description'),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
@ -207,9 +217,9 @@ class LocationBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
model = Location
|
model = Location
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
FieldSet('site', 'parent', 'status', 'tenant', 'description'),
|
FieldSet('site', 'parent', 'status', 'tenant', 'facility', 'description'),
|
||||||
)
|
)
|
||||||
nullable_fields = ('parent', 'tenant', 'description', 'comments')
|
nullable_fields = ('parent', 'tenant', 'facility', 'description', 'comments')
|
||||||
|
|
||||||
|
|
||||||
class RackRoleBulkEditForm(NetBoxModelBulkEditForm):
|
class RackRoleBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user