{% 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">
        <h2 class="card-header">{% trans "Aggregate" %}</h2>
        <table class="table table-hover attr-table">
          <tr>
            <th scope="row">{% trans "Family" %}</th>
            <td>IPv{{ object.family }}</td>
          </tr>
          <tr>
            <th scope="row">{% trans "RIR" %}</th>
            <td>
              <a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
            </td>
          </tr>
          <tr>
            <th scope="row">{% trans "Utilization" %}</th>
            <td>
              {% utilization_graph object.get_utilization %}
            </td>
          </tr>
          <tr>
            <th scope="row">{% trans "Tenant" %}</th>
            <td>
              {% if object.tenant.group %}
                {{ object.tenant.group|linkify }} /
              {% endif %}
              {{ object.tenant|linkify|placeholder }}
            </td>
          </tr>
          <tr>
            <th scope="row">{% trans "Date Added" %}</th>
            <td>{{ object.date_added|isodate|placeholder }}</td>
          </tr>
          <tr>
            <th scope="row">{% trans "Description" %}</th>
            <td>{{ object.description|placeholder }}</td>
          </tr>
        </table>
      </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 %}
