Files
OpenBench/Templates/OpenBench/viewTest.html
T

135 lines
4.5 KiB
HTML

{% extends "OpenBench/base.html" %}
{% load mytags %}
{% block style %}
{% load static %}
{% endblock %}
{% block content %}
<div style="float:left">
<table>
<tr>
<th style="text-align:left">Dev Branch</th>
<td style="text-align:left">{{test.dev.name}}</td>
</tr>
<tr>
<th style="text-align:left">Dev Bench</th>
<td style="text-align:left">{{test.dev.bench}}</td>
</tr>
<tr>
<th style="text-align:left">Dev Options</th>
<td style="text-align:left">{{test.devoptions}}</td>
</tr>
<tr>
<th style="text-align:left">Dev Protocol</th>
<td style="text-align:left">{{test.dev.protocol}}</td>
</tr>
<tr>
<th style="text-align:left">Dev Sha</th>
<td style="text-align:left">{{test.dev.sha}}</td>
</tr>
<tr>
<th style="text-align:left">Base Branch</th>
<td style="text-align:left">{{test.base.name}}</td>
</tr>
<tr>
<th style="text-align:left">Base Bench</th>
<td style="text-align:left">{{test.base.bench}}</td>
</tr>
<tr>
<th style="text-align:left">Base Options</th>
<td style="text-align:left">{{test.baseoptions}}</td>
</tr>
<tr>
<th style="text-align:left">Base Protocol</th>
<td style="text-align:left">{{test.base.protocol}}</td>
</tr>
<tr>
<th style="text-align:left">Base Sha</th>
<td style="text-align:left">{{test.base.sha}}</td>
</tr>
<tr>
<th style="text-align:left">Source Repo</th>
<td style="text-align:left">{{test.source}}</td>
</tr>
<tr>
<th style="text-align:left">Opening Book</th>
<td style="text-align:left">{{test.bookname}}</td>
</tr>
<tr>
<th style="text-align:left">Time Control</th>
<td style="text-align:left">{{test.timecontrol}}s</td>
</tr>
<tr>
<th style="text-align:left">Elo Bounds</th>
<td style="text-align:left">[{{test.elolower}}, {{test.eloupper}}]</td>
</tr>
<tr>
<th style="text-align:left">SPRT Bounds</th>
<td style="text-align:left">({{test.lowerllr|twoDigitPrecision}}, {{test.upperllr|twoDigitPrecision}})</td>
</tr>
<tr>
<th style="text-align:left">Creation</th>
<td style="text-align:left">{{test.creation|date:'Y-m-d H:i:s'}}</td>
</tr>
<tr>
<th style="text-align:left">Author</th>
<td style="text-align:left">{{test.author}}</td>
</tr>
</table>
</div>
<div style="float:left;margin-left:40px">
<h2>Actions</h2>
<a class="buttonlink" href="/approveTest/{{test.id}}/" style="background-color: #9DF779">Approve</a>
{% if test.finished %}
<a class="buttonlink" href="/restartTest/{{test.id}}/" style="background-color: #EEF788">Restart</a>
{% else %}
<a class="buttonlink" href="/stopTest/{{test.id}}/" style="background-color: #EEF788">Stop</a>
{% endif %}
<a class="buttonlink" href="/deleteTest/{{test.id}}/" style="background-color: #FA8E8E">Delete</a>
<h4>{{test.dev.name}} vs {{test.base.name}} <a href="{{test|gitDiffLink}}">DIFF</a></h4>
{% autoescape off %}
<pre>{{test|statParagraph}}</pre>
{% endautoescape %}
<form method="POST" action="/editTest/{{test.id}}/">
{% csrf_token %}
<label type="text">Priority</label>
<input style="width: 240px" type="text" value="{{test.priority}}" name="priority"></br>
<label type="text">Throughput</label>
<input style="width: 240px" type="text" value="{{test.throughput}}" name="throughput"></br>
<input type="submit" name="submit" value="Modify">
</form>
</div>
<br>
<table style="padding-top:40px">
<tr>
<th>User</th>
<th>Machine</th>
<th>Updated</th>
<th>Games</th>
<th>Wins</th>
<th>Losses</th>
<th>Draws</th>
<th>Crashes</th>
<th>Time</th>
</tr>
{% for result in results %}
<tr>
<td>{{result.machine.owner}}</th>
<td>{{result.machine.osname}}</th>
<td>{{result.lastseen}}</td>
<td>{{result.games}}</td>
<td>{{result.wins}}</td>
<td>{{result.losses}}</td>
<td>{{result.draws}}</td>
<td>{{result.crashes}}</td>
<td>{{result.time}}</td>
</tr>
{% endfor %}
</table>
{% endblock %}