diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cfc3cae8..f2fba454f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ v2.5.5 (FUTURE) +## Enhancements + +* [#2809](https://github.com/digitalocean/netbox/issues/2809) - Remove VRF child prefixes table; link to main prefixes view + ## Bug Fixes * [#2824](https://github.com/digitalocean/netbox/issues/2824) - Fix template exception when viewing rack elevations list diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py index 3a4c36173..2f76089a2 100644 --- a/netbox/ipam/views.py +++ b/netbox/ipam/views.py @@ -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, }) diff --git a/netbox/templates/ipam/vrf.html b/netbox/templates/ipam/vrf.html index f89212804..4929e3b39 100644 --- a/netbox/templates/ipam/vrf.html +++ b/netbox/templates/ipam/vrf.html @@ -83,19 +83,19 @@ Description {{ vrf.description|placeholder }} + + + Prefixes + + {{ prefix_count }} + - {% include 'inc/custom_fields_panel.html' with obj=vrf %} {% include 'extras/inc/tags_panel.html' with tags=vrf.tags.all url='ipam:vrf_list' %}
-
-
- Prefixes -
- {% include 'responsive_table.html' with table=prefix_table %} -
-
+ {% include 'inc/custom_fields_panel.html' with obj=vrf %} + {% endblock %}