{% load i18n sizeformat parse_date %}

<div class="detail">
  <dl class="dl-horizontal">
    <dt>{% trans "ID" %}</dt>
    <dd>{{ pool.id }}</dd>

    <dt>{% trans "Name" %}</dt>
    <dd>{{ pool.name|default:_("-") }}</dd>

    <dt>{% trans "Description" %}</dt>
    <dd>{{ pool.description|default:_("-") }}</dd>

    <dt>{% trans "Project ID" %}</dt>
    <dd>{{ pool.tenant_id }}</dd>

    <dt>{% trans "VIP" %}</dt>
    {% if pool.vip_id %}
      {% url 'horizon:project:loadbalancers:vipdetails' pool.vip_id as vip_url %}
      <dd><a href="{{ vip_url }}">{{ pool.vip.name_or_id }}</a></dd>
    {% else %}
      <dd>{% trans "None" %}</dd>
    {% endif %}

    <dt>{% trans "Provider" %}</dt>
    <dd>{{ pool.provider|default:_("N/A") }}</dd>

    <dt>{% trans "Subnet" %}</dt>
    {% url 'horizon:project:networks:subnets:detail' pool.subnet_id as subnet_url %}
    <dd><a href="{{ subnet_url }}">{{ pool.subnet.name_or_id }} {{ pool.subnet.cidr }}</a></dd>

    <dt>{% trans "Protocol" %}</dt>
    <dd>{{ pool.protocol }}</dd>

    <dt>{% trans "Load Balancing Method" %}</dt>
    <dd>{{ pool.lb_method }}</dd>

    <dt>{% trans "Admin State Up" %}</dt>
    <dd>{{ pool.admin_state_up|yesno|capfirst }}</dd>

    <dt>{% trans "Status" %}</dt>
    <dd>{{ pool.status }}</dd>
  </dl>

  <dl class="dl-horizontal">
    <h4>{% trans "Members" %}</h4>
    <hr class="header_rule">
    {% if pool.members %}
      <ul>
      {% for member in pool.members %}
        {% url 'horizon:project:loadbalancers:memberdetails' member.id as member_url %}
        <li><a href="{{ member_url }}">{{ member.address }}:{{ member.protocol_port }}</a></li>
        {% endfor %}
      <ul>
    {% else %}
      {% trans "None" %}
    {% endif %}
  </dl>

  <dl class="dl-horizontal">
    <h4>{% trans "Health Monitors" %}</h4>
    <hr class="header_rule">
    {% if pool.health_monitors %}
      <ul>
        {% for monitor in pool.health_monitors %}
          {% url 'horizon:project:loadbalancers:monitordetails' monitor.id as monitor_url %}
          <li><a href="{{ monitor_url }}">{{ monitor.display_name }}</a></li>
        {% endfor %}
      </ul>
    {% else %}
      {% trans "None" %}
    {% endif %}
  </dl>
</div>
