{% extends "templates/base.jinja2" %}

{% block content %}
    <h1 class="view">Dashboard {{ director_version|safe }}</h1>

    <h2 id="upcoming_jobs">Upcoming Jobs (next 24h)</h2>
    {{ macros.upcoming_jobs_table(request, upcoming_jobs) }}

    <h2 id="running_jobs">Running Jobs</h2>
    {{ macros.jobs_table(request, running_jobs) }}

    <h2 id="last_jobs">Last 5 finished Jobs</h2>
    {{ macros.jobs_table(request, jobs) }}
{% endblock %}

{% block sidebar %}
      <h1 class="view">Statistics</h1>
        <table class="table table-striped table-bordered table-condensed word-wrapped">
         <tbody>
           <tr>
               <td>Clients:</td>
               <td>{{ num_clients }}</td>
           </tr>
           <tr>
               <td>Jobs:</td>
               <td>{{ num_jobs }}</td>
           </tr>
           <tr>
               <td>Volumes:</td>
               <td>{{ num_volumes }}</td>
           </tr>
           <tr>
               <td>Total backup size:</td>
               <td>{{ sum_volumes }}</td>
           </tr>
           <tr>
               <td>SQL database size:</td>
               <td>{{ database_size }}</td>
           </tr>
           <!-- total bytes, database size, number of files, df -h -->
         </tbody>
        </table>
{% endblock %}
