mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
Added VRF stats to home page
This commit is contained in:
parent
1413f5d89e
commit
618566abe8
@ -5,7 +5,7 @@ from django.shortcuts import render
|
|||||||
from circuits.models import Provider, Circuit
|
from circuits.models import Provider, Circuit
|
||||||
from dcim.models import Site, Rack, Device, ConsolePort, PowerPort, InterfaceConnection
|
from dcim.models import Site, Rack, Device, ConsolePort, PowerPort, InterfaceConnection
|
||||||
from extras.models import UserAction
|
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 secrets.models import Secret
|
||||||
from tenancy.models import Tenant
|
from tenancy.models import Tenant
|
||||||
|
|
||||||
@ -26,6 +26,7 @@ def home(request):
|
|||||||
'power_connections_count': PowerPort.objects.filter(power_outlet__isnull=False).count(),
|
'power_connections_count': PowerPort.objects.filter(power_outlet__isnull=False).count(),
|
||||||
|
|
||||||
# IPAM
|
# IPAM
|
||||||
|
'vrf_count': VRF.objects.count(),
|
||||||
'aggregate_count': Aggregate.objects.count(),
|
'aggregate_count': Aggregate.objects.count(),
|
||||||
'prefix_count': Prefix.objects.count(),
|
'prefix_count': Prefix.objects.count(),
|
||||||
'ipaddress_count': IPAddress.objects.count(),
|
'ipaddress_count': IPAddress.objects.count(),
|
||||||
|
@ -98,6 +98,11 @@
|
|||||||
<strong>IPAM</strong>
|
<strong>IPAM</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<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">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.aggregate_count }}</span>
|
<span class="badge pull-right">{{ stats.aggregate_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></h4>
|
||||||
|
Loading…
Reference in New Issue
Block a user