1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Addresses #395: Show child prefixes from all VRFs if the parent prefix is in the global table

This commit is contained in:
Jeremy Stretch
2016-08-02 15:48:12 -04:00
parent d294e916a4
commit 9f3647cd53
2 changed files with 12 additions and 4 deletions

View File

@ -152,13 +152,14 @@ class PrefixTable(BaseTable):
class PrefixBriefTable(BaseTable):
prefix = tables.TemplateColumn(PREFIX_LINK_BRIEF, verbose_name='Prefix')
vrf = tables.LinkColumn('ipam:vrf', args=[Accessor('vrf.pk')], default='Global', verbose_name='VRF')
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')], verbose_name='Site')
status = tables.TemplateColumn(STATUS_LABEL, verbose_name='Status')
role = tables.Column(verbose_name='Role')
class Meta(BaseTable.Meta):
model = Prefix
fields = ('prefix', 'status', 'site', 'role')
fields = ('prefix', 'vrf', 'status', 'site', 'role')
orderable = False