Files
OpenBench/Templates/OpenBench/create_test.html
T

185 lines
7.2 KiB
HTML

{% extends "OpenBench/base.html" %}
{% load static %}
{% block scripts %}
{{ config|json_script:"json-config" }}
{{ networks|json_script:"json-networks" }}
{{ profile.repos|json_script:"json-repos" }}
<script src="{% static 'create_test.js' %}"></script>
<script>
document.addEventListener(
'DOMContentLoaded', function () {
set_test_type();
set_engine('{{ profile.engine }}', 'dev');
enforce_default_text('dev_repo', 'https://github.com/');
enforce_default_text('base_repo', 'https://github.com/');
}, false
);
</script>
{% endblock %}
{% block content %}
<form method="POST" action="/newTest/">
{% csrf_token %}
<div class="form w-100">
<div class="col">
<h3> Engines </h3>
<div class="row">
<label> Dev Engine </label>
<select id="dev_engine" name="dev_engine" onchange="set_engine(value, 'dev');">
{% for engine in config.engines %}
<option value="{{ engine }}">{{ engine }}</option>
{% endfor %}
</select>
</div>
<div class="row">
<label> Dev Source </label> <input id="dev_repo" name="dev_repo">
</div>
<div class="row">
<label> Base Engine </label>
<select id="base_engine" name="base_engine" onchange="set_engine(value, 'base');">
{% for engine in config.engines %}
<option value="{{ engine }}">{{ engine }}</option>
{% endfor %}
</select>
</div>
<div class="row">
<label> Base Source </label> <input id="base_repo" name="base_repo">
</div>
<h3> Dev Settings </h3>
<div class="row">
<label> Dev Branch </label> <input id="dev_branch" name="dev_branch" autofocus>
</div>
<div class="row">
<label> Dev Bench </label> <input value="Autofill" name="dev_bench">
</div>
<div class="row">
<label> Dev Network </label> <select id="dev_network" name="dev_network"></select>
</div>
<div class="row">
<label> Dev Options </label> <input id="dev_options" name="dev_options">
</div>
<div class="row">
<label> Dev Time </label> <input id="dev_time_control" name="dev_time_control">
</div>
<h3> Base Settings </h3>
<div class="row">
<label> Base Branch </label> <input id="base_branch" name="base_branch">
</div>
<div class="row">
<label> Base Bench </label> <input value="Autofill" name="base_bench">
</div>
<div class="row">
<label> Base Network </label> <select id="base_network" name="base_network"></select>
</div>
<div class="row">
<label> Base Options </label> <input id="base_options" name="base_options">
</div>
<div class="row">
<label> Base Time </label> <input id="base_time_control" name="base_time_control">
</div>
</div>
<div class="col">
<h3> Test Settings </h3>
<div class="row">
<label> Opening Book </label> <select id="book_name" name="book_name">
{% for name, data in config.books.items %}
<option value="{{ name }}">{{ name }}</option>
{% endfor %}
</select>
</div>
<div class="row">
<label> Test Mode </label>
<select onchange='set_test_type()' id="test_mode" name="test_mode">
<option selected value="SPRT"> SPRT</option>
<option value="GAMES"> Fixed Games</option>
</select>
</div>
<div class="row">
<label> Bounds </label> <input id="test_bounds" name="test_bounds">
</div>
<div class="row">
<label> Confidence </label> <input id="test_confidence" name="test_confidence">
</div>
<div class="row">
<label> Max Games </label> <input id="test_max_games" name="test_max_games">
</div>
<h3> General Settings </h3>
<div class="row">
<label> Priority </label> <input value="0" name="priority">
</div>
<div class="row">
<label> Throughput </label> <input value="1000" id="throughput" , name="throughput">
</div>
<div class="row">
<label> Syzygy WDL </label> <select name="syzygy_wdl">
<option selected 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>
</div>
<h3> Workload Settings </h3>
<div class="row">
<label> Report Rate </label> <input id="report_rate" name="report_rate">
</div>
<div class="row">
<label> Workload Size </label> <input id="workload_size" name="workload_size">
</div>
<h3> Adjudication Settings </h3>
<div class="row">
<label> Syzygy ADJ. </label>
<select name="syzygy_adj">
<option selected 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>
</div>
<div class="row">
<label> Win ADJ. </label> <input id="win_adj" name="win_adj">
</div>
<div class="row">
<label> Draw ADJ. </label> <input id="draw_adj" name="draw_adj">
</div>
</div>
</div>
<input type="submit" class="anchorbutton btn-start mt-3 mw-84" name="submit" value="Create Engine Test">
</form>
<div class="form">
<div class="col-full">
<div id="test-mode-buttons">
<!-- Generated based on the selected Engine -->
</div>
</div>
</div>
{% endblock %}