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

Closes #2809: Remove VRF child prefixes table; link to main prefixes view

This commit is contained in:
Jeremy Stretch
2019-01-31 10:06:08 -05:00
parent b508415983
commit ae0c8deec2
3 changed files with 14 additions and 13 deletions

View File

@ -126,14 +126,11 @@ class VRFView(View):
def get(self, request, pk):
vrf = get_object_or_404(VRF.objects.all(), pk=pk)
prefix_table = tables.PrefixTable(
list(Prefix.objects.filter(vrf=vrf).select_related('site', 'role')), orderable=False
)
prefix_table.exclude = ('vrf',)
prefix_count = Prefix.objects.filter(vrf=vrf).count()
return render(request, 'ipam/vrf.html', {
'vrf': vrf,
'prefix_table': prefix_table,
'prefix_count': prefix_count,
})