{% load i18n sizeformat %}

<div class="detail">
    <dl class="dl-horizontal">
        <dt>{% trans "Name" %}</dt>
        <dd>{{ template.name }}</dd>
        <dt>{% trans "ID" %}</dt>
        <dd>{{ template.id }}</dd>
        <dt>{% trans "Description" %}</dt>
        <dd>{{ template.description|default:_("None") }}</dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>{% trans "Flavor" %}</dt>
        <dd>{{ flavor.name }}</dd>
    </dl>
    {% if template.availability_zone %}
    <dl class="dl-horizontal">
        <dt>{% trans "Availability Zone" %}</dt>
        <dd>{{ template.availability_zone }}</dd>
    </dl>
    {% endif %}
    {% if template.floating_ip_pool %}
    <dl class="dl-horizontal">
        <dt>{% trans "Floating IP Pool" %}</dt>
        <dd><a href="{% url 'horizon:project:networks:detail' template.floating_ip_pool %}">{{ floating_ip_pool_name }}</a></dd>
    </dl>
    {% endif %}
    <dl class="dl-horizontal">
        <dt>{% trans "Plugin" %}</dt>
        <dd><a href="{% url 'horizon:project:data_processing.data_plugins:details' template.plugin_name %}">{{ template.plugin_name }}</a></dd>
        <dt>{% trans "Version" %}</dt>
        <dd>{{ template.hadoop_version }}</dd>
    </dl>

    <dl class="dl-horizontal">
        <dt>{% trans "Use auto-configuration" %}</dt>
        <dd>{{ template.use_autoconfig }}</dd>
    </dl>
  <dl class="dl-horizontal">
    <dt>{% trans "Proxy Gateway" %}</dt>
    <dd>{{ template.is_proxy_gateway }}</dd>
  </dl>

  <dl class="dl-horizontal">
    <dt>{% trans "Auto Security Group" %}</dt>
    <dd>{{ template.auto_security_group }}</dd>
  </dl>

  <dl class="dl-horizontal">
    <dt>{% trans "Security Groups" %}</dt>
    <dd>
        <ul class="list-bullet">
            {% for group in security_groups %}
                {% if group.id %}
                    <li><a href="{% url 'horizon:project:access_and_security:security_groups:detail' group.id %}">{{ group.name }}</a></li>
                {% else %}
                    <li>{{ group.name }}</li>
                {% endif %}
            {% endfor %}
        </ul>
    </dd>
  </dl>

  <dl class="dl-horizontal">
    <dt>{% trans "Node Processes" %}</dt>
    <dd>
        <ul class="list-bullet">
            {% for process in template.node_processes %}
                <li>{{ process }}</li>
            {% endfor %}
        </ul>
    </dd>
  </dl>
  <dl class="dl-horizontal">
    <h4>{% trans "HDFS placement" %}</h4>
    {% if template.volumes_per_node %}
    <h6>{% trans "Cinder volumes" %}</h6>
    <dt>{% trans "Volumes per node" %}</dt>
    <dd>{{ template.volumes_per_node }}</dd>
    <dt>{% trans "Volumes size" %}</dt>
    <dd>{{ template.volumes_size }}</dd>
    <dt>{% trans "Volumes type" %}</dt>
    <dd>{{ template.volume_type }}</dd>
    <dt>{% trans "Volumes local to instance" %}</dt>
    <dd>{{ template.volume_local_to_instance }}</dd>
    {% if template.volumes_availability_zone %}
      <dt>{% trans "Volumes Availability Zone" %}</dt>
      <dd>{{ template.volumes_availability_zone }}</dd>
    {% endif %}
    {% else %}
    <h6>{% trans "Ephemeral drive" %}</h6>
    {% endif %}
  </dl>
</div>
