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

{% block title %}Aggregates{% endblock %}

{% block content %}
<div class="pull-right">
    {% if perms.ipam.add_aggregate %}
		<a href="{% url 'ipam:aggregate_add' %}" class="btn btn-primary">
			<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
			Add an aggregate
		</a>
    {% endif %}
    {% include 'inc/export_button.html' with obj_type='aggregates' %}
</div>
<h1>Aggregates</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' %}
        <p class="text-right">IPv4 total: <strong>{{ ipv4_total|intcomma }} /32s</strong></p>
        <p class="text-right">IPv6 total: <strong>{{ ipv6_total|intcomma }} /64s</strong></p>
	</div>
	<div class="col-md-3">
		{% include 'inc/filter_panel.html' %}
	</div>
</div>
{% endblock %}
