{% load i18n sizeformat parse_date %}

<div class="info row detail">
  <hr class="header_rule">
  <dl>
    <dt>{% trans "ID" %}</dt>
    <dd>{{ vip.id }}</dd>

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

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

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

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

    <dt>{% trans "Address" %}</dt>
    <dd>{{ vip.address }}</dd>

    <dt>{% trans "Protocol Port" %}</dt>
    <dd>{{ vip.protocol_port }}</dd>

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

    <dt>{% trans "Pool" %}</dt>
    {% url 'horizon:project:loadbalancers:pooldetails' vip.pool_id as pool_url %}
    <dd><a href="{{pool_url}}">{{ vip.pool.name_or_id }}</a></dd>

    <dt>{% trans "Port ID" %}</dt>
    {% url 'horizon:project:networks:ports:detail' vip.port_id as port_url %}
    <dd><a href="{{port_url}}">{{ vip.port_id }}</a></dd>

    <dt>{% trans "Session Persistence" %}</dt>
    {% if vip.session_persistence %}
    <dd>{% trans "Type" %}: {{ vip.session_persistence.type }}</dd>
    {% if vip.session_persistence.cookie_name %}
    <dd>{% trans "Cookie Name" %}: {{ vip.session_persistence.cookie_name }}</dd>
    {% endif %}
    {% else %}
    <dd>{% trans "None" %}</dd>
    {% endif %}

    <dt>{% trans "Connection Limit" %}</dt>
    <dd>{{ vip.connection_limit }}</dd>

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

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