{% load i18n sizeformat parse_date %}

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

    <dt>{% trans "Description" %}</dt>
    <dd>{{ ipsecsiteconnection.description|default:_("-") }}</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 "Local Endpoint Group" %}</dt>
    {% url 'horizon:project:vpn:endpointgroupdetails' ipsecsiteconnection.local_ep_group_id as local_epg_url %}
    <dd><a href="{{ local_epg_url }}">{{ ipsecsiteconnection.local_ep_group_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 "Peer Endpoint Group" %}</dt>
    {% url 'horizon:project:vpn:endpointgroupdetails' ipsecsiteconnection.peer_ep_group_id as peer_epg_url %}
    <dd><a href="{{ peer_epg_url }}">{{ ipsecsiteconnection.peer_ep_group_id }}</a></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>
