Added VRF stats to home page

This commit is contained in:
Jeremy Stretch 2016-07-27 14:13:07 -04:00
parent 1413f5d89e
commit 618566abe8
2 changed files with 7 additions and 1 deletions

View File

@ -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(),

View File

@ -98,6 +98,11 @@
<strong>IPAM</strong>
</div>
<div class="list-group">
<div class="list-group-item">
<span class="badge pull-right">{{ stats.vrf_count }}</span>
<h4 class="list-group-item-heading"><a href="{% url 'ipam:vrf_list' %}">VRFs</a></h4>
<p class="list-group-item-text text-muted">Virtual routing and forwarding tables</p>
</div>
<div class="list-group-item">
<span class="badge pull-right">{{ stats.aggregate_count }}</span>
<h4 class="list-group-item-heading"><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></h4>