{% extends "base/base.html" %}
{% from "base/ui/job.html" import job_panel with context %}

{% block content %}
<div>
  <h1 class="h3 mb-3">Schedule Details</h1>
  <div class="card mb-3">
    <div class="card-header text-bg-info">
      Scheduled
    </div>
    <table class="table table-striped mb-0">
      <tbody>
        <tr>
          <th>Key</th>
          <td><code>{{ schedule.unique_key }}</code></td>
        </tr>
        <tr>
          <th>Schedule</th>
          <td><code>{{ schedule.cron }}</code></td>
        </tr>
        <tr>
          <th>Next Run</th>
          <td>{{ schedule.next_run|relative_time }}</td>
        </tr>
        <tr>
          <th>Last Enqueued</th>
          <td>{{ schedule.last_run|relative_time }}</td>
        </tr>
      </tbody>
    </table>
  </div>
  <h2 class="h4 mb-3">Job</h2>
  <p class="text-muted">
    The following job will be queued whenever the schedule is reached.
  </p>
  {{ job_panel(schedule.job) }}
</div>
{% endblock %}