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

{% block content %}
  <div class="row">
    <div class="col col-md-6">
      <div class="card">
        <h5 class="card-header">{% trans "Aggregate" %}</h5>
        <div class="card-body">
          <table class="table table-hover attr-table">
            <tr>
              <td>{% trans "Family" %}</td>
              <td>IPv{{ object.family }}</td>
            </tr>
            <tr>
              <td>{% trans "RIR" %}</td>
              <td>
                <a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
              </td>
            </tr>
            <tr>
              <td>{% trans "Utilization" %}</td>
              <td>
                {% utilization_graph object.get_utilization %}
              </td>
            </tr>
            <tr>
              <td>{% trans "Tenant" %}</td>
              <td>
                {% if object.tenant.group %}
                  {{ object.tenant.group|linkify }} /
                {% endif %}
                {{ object.tenant|linkify|placeholder }}
              </td>
            </tr>
            <tr>
              <td>{% trans "Date Added" %}</td>
              <td>{{ object.date_added|annotated_date|placeholder }}</td>
            </tr>
            <tr>
              <td>{% trans "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' %}
      {% include 'inc/panels/comments.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 %}
