Pass adjudication settings from the server. Allow defaults

This commit is contained in:
andrew committed 2023-02-20 21:20:09 -05:00
1 parent 2f9508f533
commit aa3e43b125
6 files changed
+121 -43

No files matched your search

+23 -18
View File
@@ -4,21 +4,23 @@
var Configurations = {
{% for name, data in config.engines.items %}
'{{name}}' : {
'base' : "{{data.base}}",
'book' : "{{data.book}}",
'bounds' : "{{data.bounds}}",
"{{name}}" : {
"base" : "{{data.base}}",
"book" : "{{data.book}}",
"bounds" : "{{data.bounds}}",
"win_adj" : "{{data.win_adj}}",
"draw_adj" : "{{data.draw_adj}}",
},
{% endfor %}
};
var TestModes = {
{% for name, data in config.engines.items %}
'{{name}}' : [
"{{name}}" : [
{% for mode in data.testmodes %}
{
{% for key, value in mode.items %}
'{{key}}' : '{{value}}',
"{{key}}" : "{{value}}",
{% endfor %}
},
{% endfor %}
@@ -162,14 +164,12 @@
baseopt.selected = (hasdefault == false); basenet.add(baseopt);
}
var base_branch = document.getElementById("basebranch");
base_branch.value = Configurations[engine]["base"];
var book_selection = document.getElementById("bookname");
book_selection.value = Configurations[engine]["book"];
document.getElementById("basebranch").value = Configurations[engine]["base"];
document.getElementById("bookname" ).value = Configurations[engine]["book"];
document.getElementById("win_adj" ).value = Configurations[engine]["win_adj"];
document.getElementById("draw_adj" ).value = Configurations[engine]["draw_adj"];
}
document.addEventListener(
'DOMContentLoaded', function () {
set_test_type();
@@ -231,18 +231,23 @@
<label> Priority </label> <input value="0" name="priority"><br>
<label> Throughput </label> <input value="1000" id="throughput", name="throughput"><br>
<label> Syzygy ADJ </label> <select name="syzygy_adj">
<option selected value="OPTIONAL"> Optional </option>
<option value="REQUIRED"> Required </option>
<option value="DISABLED"> Disabled </option>
</select><br>
<label> Syzygy WDL </label> <select name="syzygy_wdl">
<option value="OPTIONAL"> Optional </option>
<option value="REQUIRED"> Required </option>
<option selected value="DISABLED"> Disabled </option>
</select><br>
<h3> Adjudication Settings </h3>
<label> Syzygy ADJ. </label> <select name="syzygy_adj">
<option selected value="OPTIONAL"> Optional </option>
<option value="REQUIRED"> Required </option>
<option value="DISABLED"> Disabled </option>
</select><br>
<label> Win ADJ. </label> <input id="win_adj" name="win_adj"><br>
<label> Draw ADJ. </label> <input id="draw_adj" name="draw_adj"><br>
</div>
<br><input type="submit" name="submit" value="Create Engine Test">
+4 -2
View File
@@ -35,9 +35,11 @@
{% endif %}
<tr><th>Source Repo</th><td><a href="{{test.source}}">{{test.source}}</a></td></tr>
<tr><th>Opening Book</th><td><a href="{{config.framework}}/raw/master/Books/">{{test.bookname}}</a></td></tr>
<tr><th>Syzygy ADJ</th><td>{{test.syzygy_adj}}</td></tr>
<tr><th>Syzygy WDL</th><td>{{test.syzygy_wdl}}</td></tr>
<tr><th>Syzygy ADJ.</th><td>{{test.syzygy_adj}}</td></tr>
<tr><th>Win ADJ.</th><td>{{test.win_adj}}</td></tr>
<tr><th>Draw ADJ.</th><td>{{test.draw_adj}}</td></tr>
</table>
</div>