Add more of the test view. Approve, Stop, Restart, and Delete tests

This commit is contained in:
AndyGrant committed 2018-06-10 21:30:45 -04:00
1 parent 96371ad961
commit b79d930875
6 files changed
+232 -15

No files matched your search

+108
View File
@@ -0,0 +1,108 @@
{% 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>
{% endblock %}