{% load i18n nbsp %}

<div class="detail">
  <h4>{% trans "Information" %}</h4>
  <hr class="header_rule">
  <dl class="dl-horizontal">
    <dt>{% trans "Name" %}</dt>
    <dd>{{ cluster.name }}</dd>
    <dt>{% trans "Profile" %}</dt>
    <dd><a href="{{ cluster.profile_url }}">{{ cluster.profile_name }}</a></dd>
    {% if cluster.policies %}
      <dt>{% trans "Policies" %}</dt>
      {% for policy in cluster.policies %}
        <dd>
          <a href="{% url 'horizon:cluster:policies:detail' policy.policy_id %}">{{ policy.policy_name }}</a>
        </dd>
      {% endfor %}
    {% endif %}
    <dt>{% trans "ID" %}</dt>
    <dd>{{ cluster.id }}</dd>
    <dt>{% trans "Status" %}</dt>
    <dd>{{ cluster.status }}</dd>
    {% if cluster.status_reason %}
      <dt>{% trans "Status Reason" %}</dt>
      <dd>{{ cluster.status_reason }}</dd>
    {% endif %}
    <dt>{% trans "Max Size" %}</dt>
    <dd>{{ cluster.max_size }}</dd>
    <dt>{% trans "Min Size" %}</dt>
    <dd>{{ cluster.min_size }}</dd>
    <dt>{% trans "Desired Capacity" %}</dt>
    <dd>{{ cluster.desired_capacity }}</dd>
    <dt>{% trans "Timeout" %}</dt>
    <dd>{{ cluster.timeout }}</dd>
    <dt>{% trans "Created" context "Created time" %}</dt>
    <dd>{{ cluster.created_at|parse_isotime }}</dd>
    {% if cluster.updated_at %}
    <dt>{% trans "Updated" context "Updated time" %}</dt>
    <dd>{{ cluster.updated_at|parse_isotime }}</dd>
    {% endif %}
  </dl>

  {% if cluster.metadat.vars %}
    <h4>{% trans "Metadata" %}</h4>
    <hr class="header_rule">
    <dl class="dl-horizontal">
      <dd>{{ cluster.metadata|force_escape|nbsp|linebreaksbr }}</dd>
    </dl>
  {% endif %}
</div>
