Remove unused aggregate list template

This commit is contained in:
jeremystretch 2021-08-23 16:53:06 -04:00
parent e890944160
commit 2a338110f2
2 changed files with 0 additions and 35 deletions

View File

@ -208,23 +208,6 @@ class AggregateListView(generic.ObjectListView):
filterset = filtersets.AggregateFilterSet
filterset_form = forms.AggregateFilterForm
table = tables.AggregateDetailTable
template_name = 'ipam/aggregate_list.html'
def extra_context(self):
ipv4_total = 0
ipv6_total = 0
for aggregate in self.queryset:
if aggregate.prefix.version == 6:
# Report equivalent /64s for IPv6 to keep things sane
ipv6_total += int(aggregate.prefix.size / 2 ** 64)
else:
ipv4_total += aggregate.prefix.size
return {
'ipv4_total': ipv4_total,
'ipv6_total': ipv6_total,
}
class AggregateView(generic.ObjectView):

View File

@ -1,18 +0,0 @@
{% extends 'generic/object_list.html' %} {% load humanize %} {% block sidebar %}
<div class="card mb-3">
<div class="card-header d-flex justify-content-between align-items-center">
<h5>Statistics</h5>
<i class="mdi mdi-chart-line"></i>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex align-items-center justify-content-between">
Total IPv4 IPs
<span class="badge rounded-pill bg-primary">{{ ipv4_total|intcomma }}</span>
</li>
<li class="list-group-item d-flex align-items-center justify-content-between">
Total IPv6 /64s
<span class="badge rounded-pill bg-primary">{{ ipv6_total|intcomma }}</span>
</li>
</ul>
</div>
{% endblock %}