mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-12 20:19:50 +02:00
update fields
This commit is contained in:
@@ -23,8 +23,8 @@ class ClusterTypeSerializer(OrganizationalModelSerializer):
|
||||
class Meta:
|
||||
model = ClusterType
|
||||
fields = [
|
||||
'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields',
|
||||
'created', 'last_updated', 'cluster_count',
|
||||
'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'comments', 'tags',
|
||||
'custom_fields', 'created', 'last_updated', 'cluster_count',
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'cluster_count')
|
||||
|
||||
@@ -37,8 +37,8 @@ class ClusterGroupSerializer(OrganizationalModelSerializer):
|
||||
class Meta:
|
||||
model = ClusterGroup
|
||||
fields = [
|
||||
'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields',
|
||||
'created', 'last_updated', 'cluster_count',
|
||||
'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'comments', 'tags',
|
||||
'custom_fields', 'created', 'last_updated', 'cluster_count',
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'cluster_count')
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class ClusterTypeBulkEditForm(OrganizationalModelBulkEditForm):
|
||||
fieldsets = (
|
||||
FieldSet('description'),
|
||||
)
|
||||
nullable_fields = ('description',)
|
||||
nullable_fields = ('description', 'comments')
|
||||
|
||||
|
||||
class ClusterGroupBulkEditForm(OrganizationalModelBulkEditForm):
|
||||
@@ -42,7 +42,7 @@ class ClusterGroupBulkEditForm(OrganizationalModelBulkEditForm):
|
||||
fieldsets = (
|
||||
FieldSet('description'),
|
||||
)
|
||||
nullable_fields = ('description',)
|
||||
nullable_fields = ('description', 'comments')
|
||||
|
||||
|
||||
class ClusterBulkEditForm(ScopedBulkEditForm, PrimaryModelBulkEditForm):
|
||||
|
||||
@@ -28,14 +28,14 @@ class ClusterTypeImportForm(OrganizationalModelImportForm):
|
||||
|
||||
class Meta:
|
||||
model = ClusterType
|
||||
fields = ('name', 'slug', 'description', 'owner', 'tags')
|
||||
fields = ('name', 'slug', 'description', 'owner', 'comments', 'tags')
|
||||
|
||||
|
||||
class ClusterGroupImportForm(OrganizationalModelImportForm):
|
||||
|
||||
class Meta:
|
||||
model = ClusterGroup
|
||||
fields = ('name', 'slug', 'description', 'owner', 'tags')
|
||||
fields = ('name', 'slug', 'description', 'owner', 'comments', 'tags')
|
||||
|
||||
|
||||
class ClusterImportForm(ScopedImportForm, PrimaryModelImportForm):
|
||||
|
||||
@@ -39,7 +39,7 @@ class ClusterTypeForm(OrganizationalModelForm):
|
||||
class Meta:
|
||||
model = ClusterType
|
||||
fields = (
|
||||
'name', 'slug', 'description', 'owner', 'tags',
|
||||
'name', 'slug', 'description', 'owner', 'comments', 'tags',
|
||||
)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class ClusterGroupForm(OrganizationalModelForm):
|
||||
class Meta:
|
||||
model = ClusterGroup
|
||||
fields = (
|
||||
'name', 'slug', 'description', 'owner', 'tags',
|
||||
'name', 'slug', 'description', 'owner', 'comments', 'tags',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ class ClusterGroupIndex(SearchIndex):
|
||||
('name', 100),
|
||||
('slug', 110),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
display_attrs = ('description',)
|
||||
|
||||
@@ -31,6 +32,7 @@ class ClusterTypeIndex(SearchIndex):
|
||||
('name', 100),
|
||||
('slug', 110),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
display_attrs = ('description',)
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ class ClusterTypeTable(OrganizationalModelTable):
|
||||
class Meta(OrganizationalModelTable.Meta):
|
||||
model = ClusterType
|
||||
fields = (
|
||||
'pk', 'id', 'name', 'slug', 'cluster_count', 'description', 'created', 'last_updated', 'tags', 'actions',
|
||||
'pk', 'id', 'name', 'slug', 'cluster_count', 'description', 'comments', 'created', 'last_updated', 'tags',
|
||||
'actions',
|
||||
)
|
||||
default_columns = ('pk', 'name', 'cluster_count', 'description')
|
||||
|
||||
@@ -51,8 +52,8 @@ class ClusterGroupTable(ContactsColumnMixin, OrganizationalModelTable):
|
||||
class Meta(OrganizationalModelTable.Meta):
|
||||
model = ClusterGroup
|
||||
fields = (
|
||||
'pk', 'id', 'name', 'slug', 'cluster_count', 'description', 'contacts', 'tags', 'created', 'last_updated',
|
||||
'actions',
|
||||
'pk', 'id', 'name', 'slug', 'cluster_count', 'description', 'comments', 'contacts', 'tags', 'created',
|
||||
'last_updated', 'actions',
|
||||
)
|
||||
default_columns = ('pk', 'name', 'cluster_count', 'description')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user