Explorar o código

Remove unused aggregate list template

jeremystretch %!s(int64=4) %!d(string=hai) anos
pai
achega
2a338110f2
Modificáronse 2 ficheiros con 0 adicións e 35 borrados
  1. 0 17
      netbox/ipam/views.py
  2. 0 18
      netbox/templates/ipam/aggregate_list.html

+ 0 - 17
netbox/ipam/views.py

@@ -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):

+ 0 - 18
netbox/templates/ipam/aggregate_list.html

@@ -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 %}