{% extends 'infrastructure/base.html' %}
{% load i18n %}
{% load url from future %}
{% block title %}{% trans 'Role' %}: {{ role.name }}{% endblock %}

{% block page_header %}
  {% include 'horizon/common/_domain_page_header.html' with title=_('Deployment Role: ')|add:role.name %}
{% endblock page_header %}

{% block main %}

<div class="row">
  <div class="col-md-4">
    <h3>{% trans "Properties" %}</h3>
    <h4 class="info">{% blocktrans count counter=nodes|length %}{{ counter }} instance{% plural %}{{ counter }} instances{% endblocktrans %}</h4>
    <dl class="dl-horizontal dl-horizontal-left">
      <dt>{% trans 'Flavor' %}</dt>
      {% if flavor %}
        <dd><em>{{ flavor.name }}</em> {{ flavor.get_keys.cpu_arch }} | {{ flavor.vcpus }} {% trans "CPU" %} | {{ flavor.ram }} {% trans "MB RAM" %} | {{ flavor.disk }} {% trans "GB HDD" %}</dd>
      {% else %}
        <dd>{% trans 'No flavor associated' %}</dd>
      {% endif %}
      <dt>{% trans 'Image' %}</dt>
      {% if image %}
        <dd>{{ image.name }}</dd>
      {% else %}
        <dd>{% trans 'No image associated' %}</dd>
      {% endif %}
    </dl>
  </div>
  <div class="col-md-8">
    <h3>{% trans "Performance & Metrics" %}</h3>
    {% url 'horizon:infrastructure:roles:performance' role.uuid as node_perf_url %}
    {% include "infrastructure/_performance_chart_box.html" with meter_conf=meter_conf node_perf_url=node_perf_url col_size=4 %}
  </div>
</div>

{{ table.render }}
{% endblock %}
