{% extends 'base.html' %}
{% from 'utils.html' import list %}
{% from 'nodes.html' import list_nodes, list_nodes_by_environment %}

{% block title %}Chef role: {{ role.name }}{% endblock %}
{% block header %}{{ role.name }} <small>{{ role.description }}</small>{% endblock %}

{% block body %}
<div class="row">
  <div class="col-md-6">
    <h3>Nodes</h3>
    {{ list_nodes_by_environment(nodes) }}
  </div>

  <div class="col-md-6">
    <h3>Run list</h3>
  {% if role.env_run_lists %}
    <p class="text-warning">This role uses environment run lists.</p>
  {% else %}
    {{ list(role['run_list']) }}
  {% endif %}
  </div>
</div>
{% endblock %}
