{% extends 'generic/object.html' %}
{% load render_table from django_tables2 %}

{% block content %}
  <div class="row mb-3">
    <div class="col col-md-6">
      <div class="card">
        <h5 class="card-header">Kriten Task</h5>
        <div class="card-body">
          <table class="table table-hover attr-table">
            <tr>
              <th scope="row">Kriten</th>
              <td>
                <a href="{{ object.kriten_cluster.get_absolute_url }}">{{ object.kriten_cluster }}</a>
              </td>
            </tr>
            <tr>
              <th scope="row">Name</th>
              <td>{{ object.name }}</td>
            </tr>
            <tr>
              <th scope="row">Number of Kriten Jobs</th>
              <td>{{ object.kritenjobs.count }}</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
    <div class="col col-md-6">
      <div class="card">
        <h5 class="card-header">Details</h5>
        <div class="card-body">
          <table class="table table-hover attr-table">
            <tr>
              <th scope="row">Name</th>
              <td>{{ object.name}}</td>
            </tr>
            <tr>
              <th scope="row">Runner</th>
              <td>{{ object.runner}}</td>
            </tr>
            <tr>
              <th scope="row">Command</th>
              <td>{{ object.command}}</td>
            </tr>
            <tr>
              <th scope="row">Schema</th>
              <td>{{ object.schema}}</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
    <div class="col col-md-6">
    </div>
  </div>
  <div class="row">
    <div class="col col-md-12">
      <div class="card">
        <h5 class="card-header">Kriten Jobs</h5>
        <div class="card-body table-responsive">
          {% render_table kritenjobs_table %}
        </div>
      </div>
    </div>
  </div>
{% endblock content %}
