{% load i18n sizeformat parse_date %}

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

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

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

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

    <dt>{% trans "VPN Service" %}</dt>
    {% url 'horizon:project:vpn:vpnservicedetails' ipsecsiteconnection.vpnservice_id as vpnservice_url %}
    <dd><a href="{{ vpnservice_url }}">{{ ipsecsiteconnection.vpnservice.name_or_id }}</a></dd>

    <dt>{% trans "IKE Policy" %}</dt>
    {% url 'horizon:project:vpn:ikepolicydetails' ipsecsiteconnection.ikepolicy_id as ikepolicy_url %}
    <dd><a href="{{ ikepolicy_url }}">{{ ipsecsiteconnection.ikepolicy.name_or_id }}</a></dd>

    <dt>{% trans "IPSec Policy" %}</dt>
    {% url 'horizon:project:vpn:ipsecpolicydetails' ipsecsiteconnection.ipsecpolicy_id as ipsecpolicy_url %}
    <dd><a href="{{ ipsecpolicy_url }}">{{ ipsecsiteconnection.ipsecpolicy.name_or_id }}</a></dd>

    <dt>{% trans "Peer gateway public IPv4/IPv6 Address or FQDN" %}</dt>
    <dd>{{ ipsecsiteconnection.peer_address }}</dd>

    <dt>{% trans "Peer router identity for authentication (Peer ID)" %}</dt>
    <dd>{{ ipsecsiteconnection.peer_id }}</dd>

    <dt>{% trans "Remote peer subnet" %}</dt>
    <dd>
      {% for peer_cidr in ipsecsiteconnection.peer_cidrs %}
      {{ peer_cidr }}<br>
      {% endfor %}
    </dd>

    <dt>{% trans "Pre-Shared Key string" %}</dt>
    <dd>{{ ipsecsiteconnection.psk }}</dd>

    <dt>{% trans "MTU" %}</dt>
    <dd>{{ ipsecsiteconnection.mtu }}</dd>

    <dt>{% trans "Initiator state" %}</dt>
    <dd>{{ ipsecsiteconnection.initiator }}</dd>

    <dt>{% trans "Dead peer detection action" %}</dt>
    <dd>{{ ipsecsiteconnection.dpd.action }}</dd>

    <dt>{% trans "Dead peer detection interval" %}</dt>
    <dd>{{ ipsecsiteconnection.dpd.interval }}</dd>

    <dt>{% trans "Dead peer detection timeout" %}</dt>
    <dd>{{ ipsecsiteconnection.dpd.timeout }}</dd>

    <dt>{% trans "Authorization mode" %}</dt>
    <dd>{{ ipsecsiteconnection.auth_mode }}</dd>

    <dt>{% trans "Route mode" %}</dt>
    <dd>{{ ipsecsiteconnection.route_mode }}</dd>

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

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