{% extends 'ipam/aggregate/base.html' %}
{% load buttons %}
{% load helpers %}
{% load plugins %}

{% block content %}
  <div class="row">
    <div class="col col-md-6">
      <div class="card">
        <h5 class="card-header">Aggregate</h5>
        <div class="card-body">
          <table class="table table-hover attr-table">
            <tr>
              <td>Family</td>
              <td>IPv{{ object.family }}</td>
            </tr>
            <tr>
              <td>RIR</td>
              <td>
                <a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
              </td>
            </tr>
            <tr>
              <td>Utilization</td>
              <td>
                {% utilization_graph object.get_utilization %}
              </td>
            </tr>
            <tr>
              <td>Tenant</td>
              <td>
                {% if object.tenant.group %}
                  {{ object.tenant.group|linkify }} /
                {% endif %}
                {{ object.tenant|linkify|placeholder }}
              </td>
            </tr>
            <tr>
              <td>Date Added</td>
              <td>{{ object.date_added|annotated_date|placeholder }}</td>
            </tr>
            <tr>
              <td>Description</td>
              <td>{{ object.description|placeholder }}</td>
            </tr>
          </table>
        </div>
      </div>
      {% plugin_left_page object %}
    </div>
    <div class="col col-md-6">
      {% include 'inc/panels/custom_fields.html' %}
      {% include 'inc/panels/tags.html' %}
      {% plugin_right_page object %}
    </div>
  </div>
  <div class="row mb-3">
    <div class="col col-md-12">
      {% plugin_full_width_page object %}
    </div>
  </div>
{% endblock %}
