From 96a796ebde6339eb78d6573d89efa4243be2c72f Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 13 Dec 2022 14:04:50 -0500 Subject: [PATCH] Fixes #11173: Enable missing tags columns for contact, L2VPN lists --- docs/release-notes/version-3.3.md | 1 + netbox/dcim/tables/devicetypes.py | 2 +- netbox/ipam/tables/l2vpn.py | 9 ++++++--- netbox/tenancy/tables/contacts.py | 5 ++++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index b4ab9c751..aa99e739f 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -21,6 +21,7 @@ * [#11128](https://github.com/netbox-community/netbox/issues/11128) - Disable ordering changelog table by object to avoid exception * [#11142](https://github.com/netbox-community/netbox/issues/11142) - Correct available choices for status under IP range filter form * [#11168](https://github.com/netbox-community/netbox/issues/11168) - Honor `RQ_DEFAULT_TIMEOUT` config parameter when using Redis Sentinel +* [#11173](https://github.com/netbox-community/netbox/issues/11173) - Enable missing tags columns for contact, L2VPN lists --- diff --git a/netbox/dcim/tables/devicetypes.py b/netbox/dcim/tables/devicetypes.py index 566c56a90..728fa3dd0 100644 --- a/netbox/dcim/tables/devicetypes.py +++ b/netbox/dcim/tables/devicetypes.py @@ -63,7 +63,7 @@ class ManufacturerTable(ContactsColumnMixin, NetBoxTable): model = Manufacturer fields = ( 'pk', 'id', 'name', 'devicetype_count', 'inventoryitem_count', 'platform_count', 'description', 'slug', - 'contacts', 'actions', 'created', 'last_updated', + 'tags', 'contacts', 'actions', 'created', 'last_updated', ) default_columns = ( 'pk', 'name', 'devicetype_count', 'inventoryitem_count', 'platform_count', 'description', 'slug', diff --git a/netbox/ipam/tables/l2vpn.py b/netbox/ipam/tables/l2vpn.py index 4a6af7c9b..628f9b8f0 100644 --- a/netbox/ipam/tables/l2vpn.py +++ b/netbox/ipam/tables/l2vpn.py @@ -29,14 +29,17 @@ class L2VPNTable(TenancyColumnsMixin, NetBoxTable): template_code=L2VPN_TARGETS, orderable=False ) + tags = columns.TagColumn( + url_name='ipam:l2vpn_list' + ) class Meta(NetBoxTable.Meta): model = L2VPN fields = ( - 'pk', 'name', 'slug', 'identifier', 'type', 'description', 'import_targets', 'export_targets', 'tenant', 'tenant_group', - 'actions', + 'pk', 'name', 'slug', 'identifier', 'type', 'description', 'import_targets', 'export_targets', 'tenant', + 'tenant_group', 'tags', 'created', 'last_updated', ) - default_columns = ('pk', 'name', 'identifier', 'type', 'description', 'actions') + default_columns = ('pk', 'name', 'identifier', 'type', 'description') class L2VPNTerminationTable(NetBoxTable): diff --git a/netbox/tenancy/tables/contacts.py b/netbox/tenancy/tables/contacts.py index 234dc2ad7..8cb6c0700 100644 --- a/netbox/tenancy/tables/contacts.py +++ b/netbox/tenancy/tables/contacts.py @@ -37,10 +37,13 @@ class ContactRoleTable(NetBoxTable): name = tables.Column( linkify=True ) + tags = columns.TagColumn( + url_name='tenancy:contactrole_list' + ) class Meta(NetBoxTable.Meta): model = ContactRole - fields = ('pk', 'name', 'description', 'slug', 'created', 'last_updated', 'actions') + fields = ('pk', 'name', 'description', 'slug', 'tags', 'created', 'last_updated', 'actions') default_columns = ('pk', 'name', 'description')