Fix ordering of searches to be most-recent first Fix for fixed-game tests not matching due to wrong arguments Display datestamps for searched tests Modify base template block to drop the <tr> tags
160 lines
7.3 KiB
HTML
160 lines
7.3 KiB
HTML
{% extends "OpenBench/base.html" %}
|
|
|
|
{% block scripts %}
|
|
|
|
<script>
|
|
|
|
function changed_timecontrol() {
|
|
var tc_type = document.getElementById("tc-type").value;
|
|
|
|
var dict = {
|
|
"" : "Anything",
|
|
"FIXED-DEPTH" : "All, or e.g D=10",
|
|
"FIXED-NODES" : "All, or e.g N=40000",
|
|
"FIXED-TIME" : "All, or e.g MT=1000",
|
|
"FISCHER" : "All, or e.g 15.0+0.15",
|
|
"CYCLIC" : "All, or e.g 40/10.0+0.0",
|
|
}
|
|
|
|
document.getElementById("tc-value-input").placeholder = dict[tc_type];
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
changed_timecontrol();
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if not tests %}
|
|
<form method="POST" action="/search/">
|
|
{% csrf_token %}
|
|
<div class="form">
|
|
<div class="col">
|
|
<div class="row">
|
|
<label>Keywords</label>
|
|
<input name="keywords" placeholder="Seperated By Spaces"><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Author</label>
|
|
<input name="author" placeholder="All Authors By Default"><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Engine</label>
|
|
<select id="engine" name="engine">
|
|
<option value="" selected>All Engines</option>
|
|
{% for name, data in config.engines.items %}
|
|
<option value="{{name}}">{{name}}</option>
|
|
{% endfor %}
|
|
</select><br>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<label>Opening Book</label>
|
|
<select id="opening-book" name="opening-book">
|
|
<option value="" selected>All Books</option>
|
|
{% for name, data in config.books.items %}
|
|
<option value="{{name}}">{{name}}</option>
|
|
{% endfor %}
|
|
</select><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Test Mode</label>
|
|
<select id="test-mode" name="test-mode">
|
|
<option value="" selected>All Test Types</option>
|
|
<option value="SPRT">SPRT</option>
|
|
<option value="GAMES">FIXED</option>
|
|
</select><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Syzygy WDL</label>
|
|
<select id="syzygy-wdl" name="syzygy-wdl">
|
|
<option value="" selected>All Syzygy Configurations</option>
|
|
<option value="DISABLED"> Disabled </option>
|
|
<option value="OPTIONAL"> Optional </option>
|
|
<option value="6-MAN"> 6-Man </option>
|
|
<option value="5-MAN"> 5-Man </option>
|
|
<option value="4-MAN"> 4-Man </option>
|
|
<option value="3-MAN"> 3-Man </option>
|
|
</select><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Time Type</label>
|
|
<select id="tc-type" name="tc-type" onchange="changed_timecontrol()">
|
|
<option value="" selected>All Time Controls</option>
|
|
<option value="FIXED-DEPTH">Fixed Depth</option>
|
|
<option value="FIXED-NODES">Fixed Nodes</option>
|
|
<option value="FIXED-TIME">Fixed Time</option>
|
|
<option value="FISCHER">Fischer</option>
|
|
<option value="CYCLIC">Cyclic</option>
|
|
</select><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Time Value</label>
|
|
<select id="tc-value-select" name="tc-value-select" style="margin-right: 8px; flex-grow: 0">
|
|
<option value="=" selected>==</option>
|
|
<option value=">=">>=</option>
|
|
<option value="<="><=</option>
|
|
</select>
|
|
<input id="tc-value-input" name="tc-value-input"><br>
|
|
</div>
|
|
<div class="row">
|
|
<label>Threads</label>
|
|
<select id="threads-select" name="threads-select" style="margin-right: 8px; flex-grow: 0">
|
|
<option value="=">==</option>
|
|
<option value=">=" selected>>=</option>
|
|
<option value="<="><=</option>
|
|
</select>
|
|
<input id="threads-input" name="threads-input" value="1"><br>
|
|
</div>
|
|
<br>
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="row">
|
|
<label>Greens</label>
|
|
<input checked type="checkbox" id="show-greens" name="show-greens" value="">
|
|
</div>
|
|
<div class="row">
|
|
<label>Blues</label>
|
|
<input checked type="checkbox" id="show-blues" name="show-blues" value="">
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="row">
|
|
<label>Yellows</label>
|
|
<input checked type="checkbox" id="show-yellows" name="show-yellows" value="">
|
|
</div>
|
|
<div class="row">
|
|
<label>Stopped</label>
|
|
<input checked type="checkbox" id="show-stopped" name="show-stopped" value="">
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="row">
|
|
<label>Reds</label>
|
|
<input checked type="checkbox" id="show-reds" name="show-reds" value="">
|
|
</div>
|
|
<div class="row">
|
|
<label>Deleted</label>
|
|
<input type="checkbox" id="show-deleted" name="show-deleted" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="submit" class="anchorbutton btn-blue w-100" name="submit" value="Search Tests">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
|
|
<table class="test-list stripes hoverable">
|
|
{% for test in tests %}
|
|
<tr>
|
|
<td class="datestamp">{{test.creation|date:"U"}}</td>
|
|
{% include "OpenBench/Blocks/testsummary.html" %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endblock %}
|