{% extends "base.html" %}


{% block contents %}

<!-- <META HTTP-EQUIV="REFRESH" CONTENT="20"> -->




<div class=section>
    <div class='sectionheader'> <h2><a>Failed Simulation</a></h2> </div>

    <div class='sectioncontents'>
        <form action='/do/queue/add_sims/' method='post'>
        {% csrf_token %}
        <table class='std'>


        <col width='5'/>
        <col width='30'/> 
        <col width='40'/> 

        <tr>
        <th/>
        <th> File </th>
        <th> Details </th>
        </tr>


        {% csrf_token %}
        {% for sim_file in failed_simulations %}
        <tr class="{{ sim_file.get_status}}">
            <td> <input type="checkbox" name="simid_{{sim_file.id}}"/> </td>
            <td> 
                <div><a href="/simfiles/{{sim_file.id}}"> {{sim_file.get_short_filename }} </a> </div>
                <div><a href="/simfileruns/{{sim_file.get_last_run.id}}">(Last run {{sim_file.get_last_run.execution_date|timesince}} ago)</a></div>
            </td>
            <td>
                <div>Exception: {{sim_file.get_last_run.exception_type}}</div>
                <div><pre>{{sim_file.get_last_run.exception_traceback}} </pre></div>
            </td>
        </tr>
        {% endfor %}

        </table>
        <div class='centerform'> <input type="submit" value="Add to Simulation Queue"/> </div>
        </form>
    </div>
</div>














<div class=section>
    <div class='sectionheader'> <h2><a>Timeouts</a></h2> </div>

    <div class='sectioncontents'>
<form action='/do/queue/add_sims/' method='post'>
{% csrf_token %}
<table class='std'>

<tr>
  <th/>
  <th> File </th>
  <th> Last Run </th>
  <th> Result </th>
  <th> DocString </th>
</tr>


{% csrf_token %}
{% for sim_file in timeout_simulations %}
<tr class="{{ sim_file.get_status}}">
    <td> <input type="checkbox" name="simid_{{sim_file.id}}"/> </td>
    <td> <a href="/simfiles/{{sim_file.id}}"> {{sim_file.get_short_filename }} </a> </td>
    <td> <a href="/simfileruns/{{sim_file.get_last_run.id}}">{{sim_file.get_last_run.execution_date}} </td>
    <td> {{sim_file.get_last_run.get_status}} </td>
    <td> {{sim_file.get_docstring}} </td>
</tr>
{% endfor %}

</table>
<input type="submit" value="Add to Simulation Queue"/>
</form>
</div>
</div>





















<div class=section>
    <div class='sectionheader'> <h2><a>NonZero Simulations</a></h2> </div>
    <div class='sectioncontents'>
<form action='/do/queue/add_sims/' method='post'>
{% csrf_token %}
<table class='std'>

<tr>
  <th/>
  <th> File </th>
  <th> Last Run </th>
  <th> Result </th>
  <th> DocString </th>
</tr>


{% csrf_token %}
{% for sim_file in nonzero_exitcode_simulations %}
<tr class="{{ sim_file.get_status}}">
    <td> <input type="checkbox" name="simid_{{sim_file.id}}"/> </td>
    <td> <a href="/simfiles/{{sim_file.id}}"> {{sim_file.get_short_filename }} </a> </td>
    <td> <a href="/simfileruns/{{sim_file.get_last_run.id}}">{{sim_file.get_last_run.execution_date}} </td>
    <td> {{sim_file.get_last_run.get_status}} </td>
    <td> {{sim_file.get_docstring}} </td>
</tr>
{% endfor %}

</table>
<input type="submit" value="Add to Simulation Queue"/>
</form>
</div>
</div>
























<div class=section>
    <div class='sectionheader'> <h2><a>Changed Simulation</a></h2> </div>
    <div class='sectioncontents'>
<form action='/do/queue/add_sims/' method='post'>
{% csrf_token %}
<table class='std'>

<tr>
  <th/>
  <th> File </th>
  <th> Last Run </th>
  <th> Result </th>
  <th> DocString </th>
</tr>


{% csrf_token %}
{% for sim_file in changed_simulations %}
<tr class="{{ sim_file.get_status}}">
    <td> <input type="checkbox" name="simid_{{sim_file.id}}"/> </td>
    <td> <a href="/simfiles/{{sim_file.id}}"> {{sim_file.get_short_filename }} </a> </td>
    <td> <a href="/simfileruns/{{sim_file.get_last_run.id}}">{{sim_file.get_last_run.execution_date}} </td>
    <td> {{sim_file.get_last_run.get_status}} </td>
    <td> {{sim_file.get_docstring}} </td>
</tr>
{% endfor %}

</table>
<input type="submit" value="Add to Simulation Queue"/>
</form>
</div>
</div>
















<div class=section>
    <div class='sectionheader'> <h2><a>Not Run</a></h2> </div>
<form action='/do/queue/add_sims/' method='post'>
{% csrf_token %}
<table class='std'>

<tr>
  <th/>
  <th> File </th>
  <th> Last Run </th>
  <th> Result </th>
  <th> DocString </th>
</tr>


{% csrf_token %}
{% for sim_file in notrun_simulations %}
<tr class="{{ sim_file.get_status}}">
    <td> <input type="checkbox" name="simid_{{sim_file.id}}"/> </td>
    <td> <a href="/simfiles/{{sim_file.id}}"> {{sim_file.get_short_filename }} </a> </td>
    <td> <a href="/simfileruns/{{sim_file.get_last_run.id}}">{{sim_file.get_last_run.execution_date}} </td>
    <td> {{sim_file.get_last_run.get_status}} </td>
    <td> {{sim_file.get_docstring}} </td>
</tr>
{% endfor %}

</table>
<input type="submit" value="Add to Simulation Queue"/>
</form>
</div>


















{% endblock %}

