{% extends '_base.html' %}
{% load humanize %}
{% load helpers %}

{% block content %}
<div class="pull-right">
    {% if perms.ipam.add_aggregate %}
		<a href="{% url 'ipam:aggregate_add' %}" class="btn btn-primary">
			<span class="fa fa-plus" aria-hidden="true"></span>
			Add an aggregate
		</a>
        <a href="{% url 'ipam:aggregate_import' %}" class="btn btn-info">
            <span class="fa fa-download" aria-hidden="true"></span>
            Import aggregates
        </a>
    {% endif %}
    {% include 'inc/export_button.html' with obj_type='aggregates' %}
</div>
<h1>{% block title %}Aggregates{% endblock %}</h1>
<div class="row">
	<div class="col-md-9">
        {% include 'utilities/obj_table.html' with bulk_edit_url='ipam:aggregate_bulk_edit' bulk_delete_url='ipam:aggregate_bulk_delete' %}
	</div>
	<div class="col-md-3">
		{% include 'inc/search_panel.html' %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong><i class="fa fa-bar-chart"></i> Statistics</strong>
            </div>
            <ul class="list-group">
                <li class="list-group-item">Total IPv4 IPs <span class="badge">{{ ipv4_total|intcomma }}</span></li>
                <li class="list-group-item">Total IPv6 /64s <span class="badge">{{ ipv6_total|intcomma }}</span></li>
            </ul>
        </div>
	</div>
</div>
{% endblock %}
