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

Closes #10545: Standardize description & comment fields on primary models (#10834)

* Standardize description & comments fields on primary models

* Update REST API serializers

* Update forms

* Update tables

* Update templates
This commit is contained in:
Jeremy Stretch
2022-11-04 08:28:09 -04:00
committed by GitHub
parent e2f5ee661a
commit bc6b5bc4be
105 changed files with 1014 additions and 534 deletions

View File

@ -2,7 +2,7 @@ from dcim.models import Device, Interface, Location, Region, Site, SiteGroup
from ipam.models import VLAN, VLANGroup
from netbox.forms import NetBoxModelForm
from tenancy.forms import TenancyForm
from utilities.forms import DynamicModelChoiceField, SlugField, StaticSelect
from utilities.forms import CommentField, DynamicModelChoiceField, SlugField, StaticSelect
from wireless.models import *
__all__ = (
@ -82,6 +82,7 @@ class WirelessLANForm(TenancyForm, NetBoxModelForm):
'group_id': '$vlan_group',
}
)
comments = CommentField()
fieldsets = (
('Wireless LAN', ('ssid', 'group', 'description', 'tags')),
@ -93,8 +94,8 @@ class WirelessLANForm(TenancyForm, NetBoxModelForm):
class Meta:
model = WirelessLAN
fields = [
'ssid', 'group', 'description', 'region', 'site_group', 'site', 'vlan_group', 'vlan', 'tenant_group',
'tenant', 'auth_type', 'auth_cipher', 'auth_psk', 'tags',
'ssid', 'group', 'region', 'site_group', 'site', 'vlan_group', 'vlan', 'tenant_group', 'tenant',
'auth_type', 'auth_cipher', 'auth_psk', 'description', 'comments', 'tags',
]
widgets = {
'auth_type': StaticSelect,
@ -183,6 +184,7 @@ class WirelessLinkForm(TenancyForm, NetBoxModelForm):
disabled_indicator='_occupied',
label='Interface'
)
comments = CommentField()
fieldsets = (
('Side A', ('site_a', 'location_a', 'device_a', 'interface_a')),
@ -196,7 +198,8 @@ class WirelessLinkForm(TenancyForm, NetBoxModelForm):
model = WirelessLink
fields = [
'site_a', 'location_a', 'device_a', 'interface_a', 'site_b', 'location_b', 'device_b', 'interface_b',
'status', 'ssid', 'tenant_group', 'tenant', 'description', 'auth_type', 'auth_cipher', 'auth_psk', 'tags',
'status', 'ssid', 'tenant_group', 'tenant', 'auth_type', 'auth_cipher', 'auth_psk', 'description',
'comments', 'tags',
]
widgets = {
'status': StaticSelect,