mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* netbox-community/netbox#6930: Add ID column to devices, device types, and components * netbox-community/netbox#6930: Add ID column to sites, racks, and tenants * netbox-community/netbox#6930: Add ID column to power, providers, TODO circuits * netbox-community/netbox#6930: Add ID column to virtualization tables * netbox-community/netbox#6930: Add ID column to IPAM tables * netbox-community/netbox#6930: Add ID column to 'extras' tables * netbox-community/netbox#6930: Move ID column to BaseTable class * netbox-community/netbox#6930: Don't linkify ID in device component template tables * netbox-community/netbox#6930: Don't show ID column in interface/console/power connections tables * netbox-community/netbox#6930: Don't show ID column in device component template tables * netbox-community/netbox#6930: Add ID column to ObjectJournal, DeviceImport, and Circuit tables * Exclude ID column from selected tables * netbox-community/netbox#6930:revert default columns on ObjectChangeTable, not configurable * netbox-community/netbox#6930: Add object ID to tagged objects table in tag detail view Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
This commit is contained in:
@ -57,8 +57,8 @@ class CustomFieldTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = CustomField
|
||||
fields = (
|
||||
'pk', 'name', 'content_types', 'label', 'type', 'required', 'weight', 'default', 'description',
|
||||
'filter_logic', 'choices',
|
||||
'pk', 'id', 'name', 'content_types', 'label', 'type', 'required', 'weight', 'default',
|
||||
'description', 'filter_logic', 'choices',
|
||||
)
|
||||
default_columns = ('pk', 'name', 'content_types', 'label', 'type', 'required', 'description')
|
||||
|
||||
@ -78,7 +78,8 @@ class CustomLinkTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = CustomLink
|
||||
fields = (
|
||||
'pk', 'name', 'content_type', 'link_text', 'link_url', 'weight', 'group_name', 'button_class', 'new_window',
|
||||
'pk', 'id', 'name', 'content_type', 'link_text', 'link_url', 'weight', 'group_name',
|
||||
'button_class', 'new_window',
|
||||
)
|
||||
default_columns = ('pk', 'name', 'content_type', 'group_name', 'button_class', 'new_window')
|
||||
|
||||
@ -98,7 +99,7 @@ class ExportTemplateTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = ExportTemplate
|
||||
fields = (
|
||||
'pk', 'name', 'content_type', 'description', 'mime_type', 'file_extension', 'as_attachment',
|
||||
'pk', 'id', 'name', 'content_type', 'description', 'mime_type', 'file_extension', 'as_attachment',
|
||||
)
|
||||
default_columns = (
|
||||
'pk', 'name', 'content_type', 'description', 'mime_type', 'file_extension', 'as_attachment',
|
||||
@ -132,7 +133,7 @@ class WebhookTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Webhook
|
||||
fields = (
|
||||
'pk', 'name', 'content_types', 'enabled', 'type_create', 'type_update', 'type_delete', 'http_method',
|
||||
'pk', 'id', 'name', 'content_types', 'enabled', 'type_create', 'type_update', 'type_delete', 'http_method',
|
||||
'payload_url', 'secret', 'ssl_validation', 'ca_file_path',
|
||||
)
|
||||
default_columns = (
|
||||
@ -155,10 +156,16 @@ class TagTable(BaseTable):
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Tag
|
||||
fields = ('pk', 'name', 'items', 'slug', 'color', 'description', 'actions')
|
||||
fields = ('pk', 'id', 'name', 'items', 'slug', 'color', 'description', 'actions')
|
||||
default_columns = ('pk', 'name', 'items', 'slug', 'color', 'description', 'actions')
|
||||
|
||||
|
||||
class TaggedItemTable(BaseTable):
|
||||
id = tables.Column(
|
||||
verbose_name='ID',
|
||||
linkify=lambda record: record.content_object.get_absolute_url(),
|
||||
accessor='content_object__id'
|
||||
)
|
||||
content_type = ContentTypeColumn(
|
||||
verbose_name='Type'
|
||||
)
|
||||
@ -170,7 +177,7 @@ class TaggedItemTable(BaseTable):
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = TaggedItem
|
||||
fields = ('content_type', 'content_object')
|
||||
fields = ('id', 'content_type', 'content_object')
|
||||
|
||||
|
||||
class ConfigContextTable(BaseTable):
|
||||
@ -185,8 +192,8 @@ class ConfigContextTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = ConfigContext
|
||||
fields = (
|
||||
'pk', 'name', 'weight', 'is_active', 'description', 'regions', 'sites', 'roles', 'platforms',
|
||||
'cluster_groups', 'clusters', 'tenant_groups', 'tenants',
|
||||
'pk', 'id', 'name', 'weight', 'is_active', 'description', 'regions', 'sites', 'roles',
|
||||
'platforms', 'cluster_groups', 'clusters', 'tenant_groups', 'tenants',
|
||||
)
|
||||
default_columns = ('pk', 'name', 'weight', 'is_active', 'description')
|
||||
|
||||
@ -211,7 +218,7 @@ class ObjectChangeTable(BaseTable):
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = ObjectChange
|
||||
fields = ('time', 'user_name', 'action', 'changed_object_type', 'object_repr', 'request_id')
|
||||
fields = ('id', 'time', 'user_name', 'action', 'changed_object_type', 'object_repr', 'request_id')
|
||||
|
||||
|
||||
class ObjectJournalTable(BaseTable):
|
||||
@ -232,7 +239,7 @@ class ObjectJournalTable(BaseTable):
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = JournalEntry
|
||||
fields = ('created', 'created_by', 'kind', 'comments', 'actions')
|
||||
fields = ('id', 'created', 'created_by', 'kind', 'comments', 'actions')
|
||||
|
||||
|
||||
class JournalEntryTable(ObjectJournalTable):
|
||||
@ -250,5 +257,10 @@ class JournalEntryTable(ObjectJournalTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = JournalEntry
|
||||
fields = (
|
||||
'pk', 'created', 'created_by', 'assigned_object_type', 'assigned_object', 'kind', 'comments', 'actions'
|
||||
'pk', 'id', 'created', 'created_by', 'assigned_object_type', 'assigned_object', 'kind',
|
||||
'comments', 'actions'
|
||||
)
|
||||
default_columns = (
|
||||
'pk', 'created', 'created_by', 'assigned_object_type', 'assigned_object', 'kind',
|
||||
'comments', 'actions'
|
||||
)
|
||||
|
Reference in New Issue
Block a user