From 618566abe8bfce6c5670070cc0c8458c9f98efd5 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 27 Jul 2016 14:13:07 -0400 Subject: [PATCH] Added VRF stats to home page --- netbox/netbox/views.py | 3 ++- netbox/templates/home.html | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/netbox/netbox/views.py b/netbox/netbox/views.py index 5abde702e..801a0a8b9 100644 --- a/netbox/netbox/views.py +++ b/netbox/netbox/views.py @@ -5,7 +5,7 @@ from django.shortcuts import render from circuits.models import Provider, Circuit from dcim.models import Site, Rack, Device, ConsolePort, PowerPort, InterfaceConnection from extras.models import UserAction -from ipam.models import Aggregate, Prefix, IPAddress, VLAN +from ipam.models import Aggregate, Prefix, IPAddress, VLAN, VRF from secrets.models import Secret from tenancy.models import Tenant @@ -26,6 +26,7 @@ def home(request): 'power_connections_count': PowerPort.objects.filter(power_outlet__isnull=False).count(), # IPAM + 'vrf_count': VRF.objects.count(), 'aggregate_count': Aggregate.objects.count(), 'prefix_count': Prefix.objects.count(), 'ipaddress_count': IPAddress.objects.count(), diff --git a/netbox/templates/home.html b/netbox/templates/home.html index b9362b2c4..9c0b69cef 100644 --- a/netbox/templates/home.html +++ b/netbox/templates/home.html @@ -98,6 +98,11 @@ IPAM
+
+ {{ stats.vrf_count }} +

VRFs

+

Virtual routing and forwarding tables

+
{{ stats.aggregate_count }}

Aggregates