{% extends "base.html" %}
{% block main %}
      <div class="jumbotron">
        <h1>{{job.name}}</h1>
        <h2>Next run: {{job.next_run}}</h2>
        <h2>Interval: {{job.interval}} seconds</h2>
        <h3>Command: <pre>{{job.command}}</pre></h3>
      </div>
      <div>
        <form method="POST">
            <input type="hidden" name="run_now" value="1">
            <input type="submit" class="btn btn-primary" value="Run Now">
        </form>
      </div>
      <hr>
      <div id="events">
        {% for event in events %}
        <h3>Type: {{event.type}} {% if event.type == 'finished'%} Return Code: {{event.return_code}}{% endif %} </h3>
        <h4>ID: <a href="{{url_for("run_id", id=event.run_id)}}">{{event.run_id}}</a></h4>
        <h3>Time: {{event.datetime}} </h3>
        <h3>Host: {{event.host}} </h3>
        <hr>
        {% endfor %}
      </div>
{% endblock main %}
