Просмотр исходного кода

Fixes #11173: Enable missing tags columns for contact, L2VPN lists

jeremystretch 3 лет назад
Родитель
Сommit
96a796ebde

+ 1 - 0
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
 
 ---
 

+ 1 - 1
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',

+ 6 - 3
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):

+ 4 - 1
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')