Skip to content

Commit 516bea6

Browse files
Merge pull request #7829 from rhyser9/7542_prefix_vlan_group_column
Fix #7542: Add VLAN Group column to IP Prefix table
2 parents 496cabc + 660fc23 commit 516bea6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

netbox/ipam/tables/ip.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ class PrefixTable(BaseTable):
206206
site = tables.Column(
207207
linkify=True
208208
)
209+
vlan_group = tables.Column(
210+
accessor='vlan__group',
211+
linkify=True,
212+
verbose_name='VLAN Group'
213+
)
209214
vlan = tables.Column(
210215
linkify=True,
211216
verbose_name='VLAN'
@@ -230,8 +235,8 @@ class PrefixTable(BaseTable):
230235
class Meta(BaseTable.Meta):
231236
model = Prefix
232237
fields = (
233-
'pk', 'id', 'prefix', 'prefix_flat', 'status', 'children', 'vrf', 'utilization', 'tenant', 'site', 'vlan', 'role',
234-
'is_pool', 'mark_utilized', 'description', 'tags',
238+
'pk', 'id', 'prefix', 'prefix_flat', 'status', 'children', 'vrf', 'utilization', 'tenant', 'site', 'vlan_group',
239+
'vlan', 'role', 'is_pool', 'mark_utilized', 'description', 'tags',
235240
)
236241
default_columns = (
237242
'pk', 'prefix', 'status', 'children', 'vrf', 'utilization', 'tenant', 'site', 'vlan', 'role', 'description',

0 commit comments

Comments
 (0)