From 660fc23e15080d333647eb29f343f2fefdc6e9d3 Mon Sep 17 00:00:00 2001 From: Rhys Barrie Date: Sat, 13 Nov 2021 23:29:26 -0500 Subject: [PATCH] netbox-community/netbox#7542: Add VLAN Group column to IP Prefix table --- netbox/ipam/tables/ip.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/tables/ip.py b/netbox/ipam/tables/ip.py index 3b8c55bda..a831a1788 100644 --- a/netbox/ipam/tables/ip.py +++ b/netbox/ipam/tables/ip.py @@ -206,6 +206,11 @@ class PrefixTable(BaseTable): site = tables.Column( linkify=True ) + vlan_group = tables.Column( + accessor='vlan__group', + linkify=True, + verbose_name='VLAN Group' + ) vlan = tables.Column( linkify=True, verbose_name='VLAN' @@ -230,8 +235,8 @@ class PrefixTable(BaseTable): class Meta(BaseTable.Meta): model = Prefix fields = ( - 'pk', 'id', 'prefix', 'prefix_flat', 'status', 'children', 'vrf', 'utilization', 'tenant', 'site', 'vlan', 'role', - 'is_pool', 'mark_utilized', 'description', 'tags', + 'pk', 'id', 'prefix', 'prefix_flat', 'status', 'children', 'vrf', 'utilization', 'tenant', 'site', 'vlan_group', + 'vlan', 'role', 'is_pool', 'mark_utilized', 'description', 'tags', ) default_columns = ( 'pk', 'prefix', 'status', 'children', 'vrf', 'utilization', 'tenant', 'site', 'vlan', 'role', 'description',