<commit_before>{% 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>

  {% if vpnservice.external_v4_ip or vpnservice.external_v6_ip %}
    <h4>Local Side Public IP Addresses</h4>
    <hr class="header_rule">
    <dl class="dl-horizontal">
      <dt>{% trans "IPv4" %}</dt>
      <dd>{{ vpnservice.external_v4_ip|default:_("None") }}</dd>
      <dt>{% trans "IPv6" %}</dt>
      <dd>{{ vpnservice.external_v6_ip|default:_("None") }}</dd>
    </dl>
  {% endif %}
</div><commit_msg>Fixed empty "VPN Connections" value from displaying a blank value<commit_after>{% 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>
      {% if vpnservice.ipsecsiteconns %}
        {% 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 %}
      {% else %}
        None
      {% endif %}
    </dd>

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

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

  {% if vpnservice.external_v4_ip or vpnservice.external_v6_ip %}
    <h4>Local Side Public IP Addresses</h4>
    <hr class="header_rule">
    <dl class="dl-horizontal">
      <dt>{% trans "IPv4" %}</dt>
      <dd>{{ vpnservice.external_v4_ip|default:_("None") }}</dd>
      <dt>{% trans "IPv6" %}</dt>
      <dd>{{ vpnservice.external_v6_ip|default:_("None") }}</dd>
    </dl>
  {% endif %}
</div>
{'fraction_non_alphanumeric': 0.22075826835170745, 'fraction_numerical': 0.005377789728421619, 'mean_word_length': 3.4927536231884058, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4267538', 'n_tokens_mistral': 1473, 'n_tokens_neox': 1389, 'n_words': 303}