{% extends "layout.html" %}
{% block content %}
<h2>Luigi Task History</h2>
<table class="table table-striped table-bordered">
  <thead>
    <tr>
    <th>Name</th>
    <th>Host</th>
    <th>Last Action</th>
    <th>Status</th>
    <th>Parameters</th>
  </tr>
  </thead>
  <tbody>
    {% for task in tasks %}
      <tr>
        <td><a href="/history/by_id/{{task.id}}">{{task.name}}</a></td>
        <td>{{task.host}}</td>
        <td>{{task.events[0].ts}}</td>
        <td>{{task.events[0].event_name}}</td>
		<td>{% for (k, param) in task.parameters.items() %}
				<table class="table-condensed"><tr><td>{{k}}</td><td>{{param.value}}</td></tr></table>
    		{% end %}</td>
      </tr>
    {% end %}
  </tbody>
</table>
{% end %}
