{% extends 'nova/base.html' %}
{% load i18n %}
{% block title %}Access &amp; Security{% endblock %}

{% block page_header %}
  {% include "horizon/common/_page_header.html" with title=_("Access &amp; Security") %}
{% endblock page_header %}

{% block dash_main %}
  
  <div id="floating_ips">
    {% if floating_ips %}
      {% include 'nova/access_and_security/floating_ips/_list.html' %}
    {% else %}
      <div class="alert-message block-message info">
        <p><strong>{% trans "Info: " %}</strong>{% trans "There are currently no floating ips assigned to your tenant." %}</p>
        <div class="alert-actions">
          {% include "nova/access_and_security/floating_ips/_allocate.html" with form=allocate_form %}
        </div>
      </div>
    {% endif %}
  </div>

  <div id="security_groups">
    {% url horizon:nova:access_and_security:security_groups:create as create_sec_url %}
    {% if security_groups %}
      {% include 'nova/access_and_security/security_groups/_list.html' %}
    {% else %}
      <div class="message_box info">
        <h2>{% trans "Info" %}</h2>
        <p>{% blocktrans %}There are currently no security groups. <a href='{{ create_sec_url }}'>Create A Security Group</a>{% endblocktrans %}</p>
      </div>
    {% endif %}
  </div>

<div id="keypairs">
  {% if keypairs %}
    {% include 'nova/access_and_security/keypairs/_list.html' %}
  {% else %}
    <div class="alert-message block-message info">
      <p><strong>{% trans "Info: " %}</strong>{% trans "There are currently no keypairs." %}</p>
      <div class="alert-actions">
        <a id="keypairs_create_link" class="btn primary small" href="{% url horizon:nova:access_and_security:keypairs:create %}">{% trans "Create New Keypair" %}</a>
        <a id="keypairs_import_link" class="btn small" href="{% url horizon:nova:access_and_security:keypairs:import %}">{% trans "Import Keypair" %}</a>
      </div>
    </div>
  {% endif %}
</div>
{% endblock %}
