{% 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>Ok</th>
      <th>Changed</th>
      <th>Failed</th>
      <th>Skipped</th>
      <th>Unreachable</th>
    </tr>
  </thead>
  <tbody>
      {% for playbook in playbooks.order_by('time_start') %}
      <tr>
        <td>{{ macros.make_link('playbook', '%s' % playbook.path, playbook=playbook.id) }}</td>
        <td>{{ playbook.time_start |datetime }}</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 %}
