1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Enable the use of fieldsets on bulk edit forms

This commit is contained in:
jeremystretch
2022-02-04 09:59:53 -05:00
parent ac1c0b0715
commit 60e87cd496
9 changed files with 273 additions and 13 deletions

View File

@ -30,6 +30,9 @@ class ClusterTypeBulkEditForm(NetBoxModelBulkEditForm):
)
model = ClusterType
fieldsets = (
(None, ('description',)),
)
nullable_fields = ('description',)
@ -40,6 +43,9 @@ class ClusterGroupBulkEditForm(NetBoxModelBulkEditForm):
)
model = ClusterGroup
fieldsets = (
(None, ('description',)),
)
nullable_fields = ('description',)
@ -78,6 +84,10 @@ class ClusterBulkEditForm(NetBoxModelBulkEditForm):
)
model = Cluster
fieldsets = (
(None, ('type', 'group', 'tenant',)),
('Site', ('region', 'site_group', 'site',)),
)
nullable_fields = (
'group', 'site', 'comments', 'tenant',
)
@ -129,6 +139,10 @@ class VirtualMachineBulkEditForm(NetBoxModelBulkEditForm):
)
model = VirtualMachine
fieldsets = (
(None, ('cluster', 'status', 'role', 'tenant', 'platform')),
('Resources', ('vcpus', 'memory', 'disk'))
)
nullable_fields = (
'role', 'tenant', 'platform', 'vcpus', 'memory', 'disk', 'comments',
)
@ -178,6 +192,11 @@ class VMInterfaceBulkEditForm(NetBoxModelBulkEditForm):
)
model = VMInterface
fieldsets = (
(None, ('mtu', 'enabled', 'description')),
('Related Interfaces', ('parent', 'bridge')),
('802.1Q Switching', ('mode', 'untagged_vlan', 'tagged_vlans')),
)
nullable_fields = (
'parent', 'bridge', 'mtu', 'description',
)