137 lines
5.5 KiB
HTML
137 lines
5.5 KiB
HTML
{% extends "OpenBench/base.html" %}
|
|
|
|
{% load mytags %}
|
|
|
|
{% block style %}
|
|
{% load static %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div id="configuration">
|
|
<table class="datatable left-align">
|
|
<tr><th>Engine</th><td>{{test.engine}}</td></tr>
|
|
<tr><th>Dev Branch</th><td>{{test.dev.name|prettyName}}</td></tr>
|
|
<tr><th>Dev Bench</th><td>{{test.dev.bench}}</td></tr>
|
|
<tr><th>Dev Options</th><td>{{test.devoptions}}</td></tr>
|
|
<tr><th>Dev Sha</th><td>{{test.dev.sha}}</td></tr>
|
|
<tr><th>Base Branch</th><td>{{test.base.name|prettyName}}</td></tr>
|
|
<tr><th>Base Bench</th><td>{{test.base.bench}}</td></tr>
|
|
<tr><th>Base Options</th><td>{{test.baseoptions}}</td></tr>
|
|
<tr><th>Base Sha</th><td>{{test.base.sha}}</td></tr>
|
|
<tr><th>Source Repo</th><td>{{test.source}}</td></tr>
|
|
<tr><th>Opening Book</th><td>{{test.bookname}}</td></tr>
|
|
<tr><th>Time Control</th><td>{{test.timecontrol}}s</td></tr>
|
|
<tr><th>Elo Bounds</th><td>[{{test.elolower}}, {{test.eloupper}}]</td></tr>
|
|
<tr><th>SPRT Bounds</th><td>({{test.lowerllr|twoDigitPrecision}}, {{test.upperllr|twoDigitPrecision}})</td></tr>
|
|
<tr><th>Creation</th><td>{{test.creation|date:'Y-m-d H:i:s'}}</td></tr>
|
|
<tr><th>Author</th><td>{{test.author}}</td></tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="actions">
|
|
|
|
<h2>Actions</h2>
|
|
|
|
<!-- Approve Button: For Admins, or Cross-approvers -->
|
|
{% if not test.approved and profile.approver and profile.user.username != test.author %}
|
|
<a class="anchorbutton" id="approvebutton" href="/test/{{test.id}}/APPROVE">Approve</a>
|
|
{% elif not test.approved and request.user.is_superuser %}
|
|
<a class="anchorbutton" id="approvebutton" href="/test/{{test.id}}/APPROVE">Approve</a>
|
|
{% else %}
|
|
<a class="anchorbutton deadbutton">Approve</a>
|
|
{% endif %}
|
|
|
|
<!-- Restart Button: For Approvers or Test Authors of finished tests -->
|
|
{% if test.finished and profile.approver %}
|
|
<a class="anchorbutton" id="stopbutton" href="/test/{{test.id}}/RESTART">Restart</a>
|
|
{% elif test.finished and profile.user.username == test.author %}
|
|
<a class="anchorbutton" id="stopbutton" href="/test/{{test.id}}/RESTART">Restart</a>
|
|
{% elif test.finished %}
|
|
<a class="anchorbutton deadbutton">Restart</a>
|
|
{% endif %}
|
|
|
|
<!-- Stop Button: For Approvers or Test Authors of active tests -->
|
|
{% if not test.finished and profile.approver %}
|
|
<a class="anchorbutton" id="restartbutton" href="/test/{{test.id}}/STOP">Stop</a>
|
|
{% elif not test.finished and profile.user.username == test.author %}
|
|
<a class="anchorbutton" id="restartbutton" href="/test/{{test.id}}/STOP">Stop</a>
|
|
{% elif not test.finished %}
|
|
<a class="anchorbutton deadbutton">Stop</a>
|
|
{% endif %}
|
|
|
|
<!-- Delete Button: For Approvers or Test Authors -->
|
|
{% if profile.approver or profile.user.username == test.author %}
|
|
<a class="anchorbutton" id="deletebutton" href="/test/{{test.id}}/DELETE">Delete</a>
|
|
{% else %}
|
|
<a class="anchorbutton deadbutton">Delete</a>
|
|
{% endif %}
|
|
|
|
<!-- Dev vs Base [Git Diff Link] -->
|
|
<h4>{{test.dev.name|prettyName}} vs {{test.base.name|prettyName}}
|
|
<a href="{{test|gitDiffLink}}">DIFF</a>
|
|
</h4>
|
|
|
|
<!-- ELO, SPRT, LLR, Games -->
|
|
<pre>{{test|longStatBlock|linebreaksbr}}</pre>
|
|
|
|
|
|
<!-- Forum to modify the Priority or Throughput -->
|
|
<form method="POST" action="/test/{{test.id}}/MODIFY">
|
|
|
|
{% csrf_token %}
|
|
|
|
<label>Priority</label><input value="{{test.priority}}" name="priority"><br>
|
|
<label>Throughput</label><input value="{{test.throughput}}" name="throughput"><br>
|
|
|
|
<!-- Edit Button: For Approvers or Test Authors -->
|
|
{% if profile.approver or profile.user.username == test.author %}
|
|
<input type="submit" name="submit" value="Modify">
|
|
{% else %}
|
|
<input class="deadbutton" type="submit" name="submit" value="Modify">
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div id="results">
|
|
|
|
<table class="datatable">
|
|
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>USER</th>
|
|
<th>OS</th>
|
|
<th>UPDATED</th>
|
|
<th style="width: 60px">GAMES</th>
|
|
<th style="width: 60px">WON</th>
|
|
<th style="width: 60px">LOST</th>
|
|
<th style="width: 60px">DRAWN</th>
|
|
<th style="width: 60px">TIME</th>
|
|
<th style="width: 60px">CRASH</th>
|
|
</tr>
|
|
|
|
{% for result in results %}
|
|
<tr>
|
|
<td>{{result.machine.id}}</td>
|
|
<td>{{result.machine.user.username|slice:"6"}}</td>
|
|
<td>{{result.machine.osname|truncatewords:1|slice:":-2"}}</td>
|
|
<td>{{result.updated|date:'Y-m-d H:i'}}</td>
|
|
<td class="numeric">{{result.games}}</td>
|
|
<td class="numeric">{{result.wins}}</td>
|
|
<td class="numeric">{{result.losses}}</td>
|
|
<td class="numeric">{{result.draws}}</td>
|
|
<td class="numeric">{{result.timeloss}}</td>
|
|
<td class="numeric">{{result.crashes}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|