
{% load i18n sizeformat %}


<div class="detail">
    {% for node_group in cluster.node_groups %}
        <dl class="well">
            <h4>{% blocktrans with node_group_name=node_group.name %}Name: {{ node_group_name }}{% endblocktrans %}</h4>
            <dt>{% trans "Number of Nodes" %}</dt>
            <dd>{{ node_group.count }}</dd>

            <dt>{% trans "Flavor" %}</dt>
            <dd>{{ node_group.flavor_name|default:_("Flavor is not specified") }}</dd>

            {% if node_group.floating_ip_pool %}
            <dt>{% trans "Floating IP Pool" %}</dt>
            <dd><a href="{% url 'horizon:project:networks:detail' node_group.floating_ip_pool %}">{{ node_group.floating_ip_pool_name }}</a></dd>
            {% endif %}

            <dt>{% trans "Template" %}</dt>
            {% if node_group.node_group_template_id %}
                <dd><a href="{% url 'horizon:project:data_processing.clusters:details' node_group.node_group_template_id %}">{{ node_group.node_group_template.name }} </a></dd>
            {% else %}
                <dd>{% trans "Template not specified" %}</dd>
            {% endif %}

            <dt>{% trans "Use auto-configuration" %}</dt>
            <dd>{{ node_group.use_autoconfig }}</dd>

            <dt>{% trans "Proxy Gateway" %}</dt>
            <dd>{{ node_group.is_proxy_gateway|yesno }}</dd>

            <dt>{% trans "Auto Security Group" %}</dt>
            <dd>{{ node_group.auto_security_group|yesno }}</dd>

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

            <dt>{% trans "Node Processes" %}</dt>
            {% if node_group.node_processes %}
                <dd>
                    <ul class="list-bullet" id="sahara-bullet-list">
                        {% for process in node_group.node_processes %}
                            <li>{{ process }}</li>
                        {% endfor %}
                    </ul>
                </dd>
            {% else %}
                <dd>{% trans "Node processes are not specified" %}</dd>
            {% endif %}

            <h4> {% trans "HDFS placement" %}</h4>
             {% if node_group.volumes_per_node %}
                <dt> {% trans "Volumes per node" %} </dt>
                <dd>{{ node_group.volumes_per_node }}</dd>
                <dt> {% trans "Volumes size" %} </dt>
                <dd>{{ node_group.volumes_size }}</dd>
                <dt> {% trans "Volumes type" %} </dt>
                <dd>{{ node_group.volume_type }}</dd>
                <dt> {% trans "Volumes local to instance" %} </dt>
                <dd>{{ node_group.volume_local_to_instance }}</dd>
            {% else %}
                <dt> {% trans "Drive type" %} </dt>
                <dd> {% trans "Ephemeral drive" %} </dd>
            {% endif %}

        </dl>
    {% endfor %}
</div>
