{% extends "layout.html" %}

{% block content %}
<h2>All Playbooks</h2>
<table class="list table table-striped table-bordered table-hover table-condensed">
  <thead>
    <tr>
      <th>Playbook</th>
      <th>Executed</th>
      <th><span class="ok label status-label">OK</span></th>
      <th><span class="changed label status-label">CHANGED</span></th>
      <th><span class="failed label status-label">FAILED</span></th>
      <th><span class="skipped label status-label">SKIPPED</span></th>
      <th><span class="unreachable label status-label">UNREACHABLE</span></th>
    </tr>
  </thead>
  <tbody>
      {% for playbook in playbooks %}
      <tr>
        <td>{{ macros.make_link('playbook.show_playbook', playbook.path|pathtruncate,
          playbook=playbook.id) }}</td>
        <td>{{ playbook.time_start |datefmt }}</td>
        <td>{{ stats[playbook.id].ok }}</td>
        <td>{{ stats[playbook.id].changed }}</td>
        <td>{{ stats[playbook.id].failed }}</td>
        <td>{{ stats[playbook.id].skipped }}</td>
        <td>{{ stats[playbook.id].unreachable }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}
