{% macro test_table(tests, date_field='scheduled_date', table_id=None) %}
  <table class='table' {{"id="+table_id if table_id}}>
    <thead>
      <tr><th class='col-md-6'>Title</th><th>Cluster</th><th>User</th><th>Date</th></tr>
    </thead>
    {% for test in tests %}
      <tr><td><a href="/tests/id/{{test.test_id}}">{{test.title}}</a></td><td>{{test.cluster}}</td><td>{{test.user}}</td><td>{{test[date_field]}}</td></tr>
    {% endfor %}
  </table>
{% endmacro %}
