{% load i18n sizeformat parse_date %}
{% load url from future %}

<div class="info row detail">
  <hr class="header_rule">
  <dl class="dl-horizontal">
    <dt>{% trans "Name" %}</dt>
    <dd>{{ vpnservice.name|default:_("None") }}</dd>

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

    <dt>{% trans "ID" %}</dt>
    <dd>{{ vpnservice.id }}</dd>

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

    <dt>{% trans "Router ID" %}</dt>
    {% url 'horizon:project:routers:detail' vpnservice.router_id as router_url %}
    <dd><a href="{{ router_url }}">{{ vpnservice.router.name_or_id }}</a></dd>

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

    <dt>{% trans "VPN Connections" %}</dt>
    <dd>
      {% for conn in vpnservice.ipsecsiteconns %}
      {% url 'horizon:project:vpn:ipsecsiteconnectiondetails' conn.id as conn_url %}
      <a href="{{ conn_url }}">{{ conn.name_or_id }}</a><br>
      {% endfor %}
    </dd>

    <dt>{% trans "Admin State" %}</dt>
    <dd>{{ vpnservice.admin_state_up }}</dd>

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