Modern redesign #9

Merged
rektdie merged 9 commits from modern-redesign into master 2026-10-09 22:22:48 +02:00
5 changed files with 124 additions and 72 deletions
Showing only changes of commit 782e5190c3 - Show all commits

No files matched your search

+18 -12
View File
@@ -22,8 +22,20 @@
</script> </script>
{% endblock %} {% endblock %}
{% block page_head %}<div><h1 class="page-title">{{submit_text}}</h1><p class="page-sub">Pick a preset to fill in the defaults, then adjust anything below.</p></div>{% endblock %}
{% block content %} {% block content %}
<!-- Presets are generated by create_workload.js, based on the selected Engine -->
<div class="form">
<div class="col-full">
<h3>Presets</h3>
<div id="test-mode-buttons">
<!-- Generated based on the selected Engine -->
</div>
</div>
</div>
<form method="POST" action="{{submit_endpoint}}"> <form method="POST" action="{{submit_endpoint}}">
{% csrf_token %} {% csrf_token %}
@@ -121,7 +133,7 @@
<h3> SPSA Input </h3> <h3> SPSA Input </h3>
<div class="row"> <div class="row">
<textarea style="margin-left:24px" id="spsa_inputs" name="spsa_inputs" rows=9></textarea> <textarea id="spsa_inputs" name="spsa_inputs" rows=9></textarea>
</div> </div>
{% endif %} {% endif %}
@@ -187,7 +199,7 @@
</div> </div>
<div class="row"> <div class="row">
<label for="test_mode"> Play Reverses </label> <label for="datagen_play_reverses"> Play Reverses </label>
<select id="datagen_play_reverses" name="datagen_play_reverses"> <select id="datagen_play_reverses" name="datagen_play_reverses">
<option value="YES"> Yes </option> <option value="YES"> Yes </option>
<option selected value="NO"> No </option> <option selected value="NO"> No </option>
@@ -226,7 +238,7 @@
</div> </div>
<div class="row"> <div class="row">
<label for="throughput"> Throughput </label> <input value="1000" id="throughput" , name="throughput"> <label for="throughput"> Throughput </label> <input value="1000" id="throughput" name="throughput">
</div> </div>
{% if workload == "TEST" or workload == "DATAGEN" %} {% if workload == "TEST" or workload == "DATAGEN" %}
@@ -269,15 +281,9 @@
</div> </div>
</div> </div>
<input type="submit" class="anchorbutton btn-start mt-3 mw-84" name="submit" value="{{submit_text}}"> <div class="form-actions">
<input type="submit" class="anchorbutton btn-blue" name="submit" value="{{submit_text}}">
</div>
</form> </form>
<div class="form">
<div class="col-full">
<div id="test-mode-buttons">
<!-- Generated based on the selected Engine -->
</div>
</div>
</div>
{% endblock %} {% endblock %}
+8 -2
View File
@@ -1,20 +1,26 @@
{% extends "OpenBench/base.html" %} {% extends "OpenBench/base.html" %}
{% block page_head %}<div><h1 class="page-title">Login</h1><p class="page-sub">Sign in to create and manage tests.</p></div>{% endblock %}
{% block content %} {% block content %}
<div class="auth-wrap">
<form method="POST" action="/login/"> <form method="POST" action="/login/">
{% csrf_token %} {% csrf_token %}
<div class="form"> <div class="form">
<div class="col"> <div class="col">
<div class="row"> <div class="row">
<label type="text">Username</label> <input type="text" name="username"><br> <label for="username">Username</label>
<input id="username" type="text" name="username" autocomplete="username" autofocus>
</div> </div>
<div class="row"> <div class="row">
<label type="text">Password</label> <input type="password" name="password"><br> <label for="password">Password</label>
<input id="password" type="password" name="password" autocomplete="current-password">
</div> </div>
<input type="submit" name="submit" value="Login" class="anchorbutton btn-blue w-100"> <input type="submit" name="submit" value="Login" class="anchorbutton btn-blue w-100">
</div> </div>
</div> </div>
</form> </form>
</div>
{% endblock %} {% endblock %}
+12 -8
View File
@@ -11,12 +11,15 @@
</script> </script>
{% endblock %} {% endblock %}
{% block page_head %}<div><h1 class="page-title">Profile</h1><p class="page-sub">{{ profile.user.username|capfirst }}</p></div>{% endblock %}
{% block content %} {% block content %}
<form method="POST" action="/profile/"> <form method="POST" action="/profile/">
{% csrf_token %} {% csrf_token %}
<div class="form"> <div class="form">
<div class="col"> <div class="col">
<h3>Account</h3>
<div class="row"> <div class="row">
<label for="username">Username</label> <label for="username">Username</label>
<input id="username" readonly value="{{ profile.user.username }}"> <input id="username" readonly value="{{ profile.user.username }}">
@@ -26,39 +29,40 @@
<input id="email" value="{{ profile.user.email }}" name="email"> <input id="email" value="{{ profile.user.email }}" name="email">
</div> </div>
<h3>Change password</h3>
<div class="row"> <div class="row">
<label for="password1">New Password</label> <label for="password1">New Password</label>
<input id="password1" type="password" name="password1"> <input id="password1" type="password" name="password1" autocomplete="new-password">
</div> </div>
<div class="row"> <div class="row">
<label for="password2">New Password</label> <label for="password2">Repeat Password</label>
<input id="password2" type="password" name="password2"> <input id="password2" type="password" name="password2" autocomplete="new-password">
</div> </div>
<input class="anchorbutton btn-blue w-100" type="submit" value="Update Profile"> <input class="anchorbutton btn-blue w-100" type="submit" value="Update Profile">
</div> </div>
</div> </div>
</form> </form>
<br>
<form method="POST" action="/profileConfig/"> <form method="POST" action="/profileConfig/">
{% csrf_token %} {% csrf_token %}
<div class="form"> <div class="form">
<div class="col" id="engines-container"> <div class="col" id="engines-container">
<h3>Engines</h3>
<!-- Display engines which have repos already defined --> <!-- Display engines which have repos already defined -->
{% for engine, repo in profile.repos.items %} {% for engine, repo in profile.repos.items %}
<div class="row" id="engine-row-{{ engine }}"> <div class="row" id="engine-row-{{ engine }}">
<label for="engine-repo-{{engine}}">{{ engine }}</label> <label for="engine-repo-{{engine}}">{{ engine }}</label>
<input id="engine-repo-{{engine}}" type="text" name="engine-repo-{{engine}}" value="{{ repo|removePrefix:'https://github.com/' }}"> <input id="engine-repo-{{engine}}" type="text" name="engine-repo-{{engine}}" value="{{ repo|removePrefix:'https://github.com/' }}">
<span> <span title="Default engine">
<input id="radio-{{engine}}" type="radio" name="default-status" value="{{engine}}" <input id="radio-{{engine}}" type="radio" name="default-status" value="{{engine}}"
{% if profile.engine == engine %}checked{% endif %}> {% if profile.engine == engine %}checked{% endif %}>
</span> </span>
<span onclick="deleteRow(event)"> <span onclick="deleteRow(event)" title="Remove engine">
<i class="fa-solid fa-trash-can" style="color: #A00000;" data-engine="{{engine}}" ></i> <i class="fa-solid fa-trash-can" data-engine="{{engine}}" ></i>
</span> </span>
</div> </div>
{% endfor %} {% endfor %}
+12 -4
View File
@@ -1,26 +1,34 @@
{% extends "OpenBench/base.html" %} {% extends "OpenBench/base.html" %}
{% block page_head %}<div><h1 class="page-title">Register</h1><p class="page-sub">Create an account to start testing.</p></div>{% endblock %}
{% block content %} {% block content %}
<div class="auth-wrap">
<form id="registerForm" method="POST" action="/register/"> <form id="registerForm" method="POST" action="/register/">
{% csrf_token %} {% csrf_token %}
<div class="form"> <div class="form">
<div class="col"> <div class="col">
<div class="row"> <div class="row">
<label>Username</label><input name="username"> <label for="register-username">Username</label>
<input id="register-username" name="username" autocomplete="username" autofocus>
</div> </div>
<div class="row"> <div class="row">
<label>Password</label><input type="password" name="password1"> <label for="register-password1">Password</label>
<input id="register-password1" type="password" name="password1" autocomplete="new-password">
</div> </div>
<div class="row"> <div class="row">
<label>Password</label><input type="password" name="password2"> <label for="register-password2">Confirm Password</label>
<input id="register-password2" type="password" name="password2" autocomplete="new-password">
</div> </div>
<div class="row"> <div class="row">
<label>Email</label><input name="email"> <label for="register-email">Email</label>
<input id="register-email" name="email" autocomplete="email">
</div> </div>
<input class="anchorbutton btn-blue w-100" type="submit" name="submit" value="Create User"> <input class="anchorbutton btn-blue w-100" type="submit" name="submit" value="Create User">
</div> </div>
</div> </div>
</form> </form>
</div>
{% endblock %} {% endblock %}
+74 -46
View File
@@ -27,19 +27,25 @@
{% endblock %} {% endblock %}
{% block page_head %}<div><h1 class="page-title">Search Tests</h1>{% if not tests %}<p class="page-sub">Leave a filter empty to match everything.</p>{% endif %}</div>{% endblock %}
{% block content %} {% block content %}
{% if not tests %} {% if not tests %}
<form method="POST" action="/search/"> <form method="POST" action="/search/">
{% csrf_token %} {% csrf_token %}
<div class="form"> <div class="form">
<div class="col"> <div class="col">
<h3>Who &amp; what</h3>
<div class="row"> <div class="row">
<label for="keywords">Keywords</label> <label for="keywords">Keywords</label>
<input id="keywords" name="keywords" placeholder="Seperated By Spaces"><br> <input id="keywords" name="keywords" placeholder="Seperated By Spaces">
</div> </div>
<div class="row"> <div class="row">
<label for="author">Author</label> <label for="author">Author</label>
<input id="author" name="author" placeholder="All Authors By Default"><br> <input id="author" name="author" placeholder="All Authors By Default">
</div> </div>
<div class="row"> <div class="row">
<label for="engine">Engine</label> <label for="engine">Engine</label>
@@ -48,9 +54,8 @@
{% for name, data in config.engines.items %} {% for name, data in config.engines.items %}
<option value="{{name}}">{{name}}</option> <option value="{{name}}">{{name}}</option>
{% endfor %} {% endfor %}
</select><br> </select>
</div> </div>
<br>
<div class="row"> <div class="row">
<label for="opening-book">Opening Book</label> <label for="opening-book">Opening Book</label>
<select id="opening-book" name="opening-book"> <select id="opening-book" name="opening-book">
@@ -58,7 +63,7 @@
{% for name, data in config.books.items %} {% for name, data in config.books.items %}
<option value="{{name}}">{{name}}</option> <option value="{{name}}">{{name}}</option>
{% endfor %} {% endfor %}
</select><br> </select>
</div> </div>
<div class="row"> <div class="row">
<label for="test-mode">Test Mode</label> <label for="test-mode">Test Mode</label>
@@ -66,7 +71,7 @@
<option value="" selected>All Test Types</option> <option value="" selected>All Test Types</option>
<option value="SPRT">SPRT</option> <option value="SPRT">SPRT</option>
<option value="GAMES">FIXED</option> <option value="GAMES">FIXED</option>
</select><br> </select>
</div> </div>
<div class="row"> <div class="row">
<label for="syzygy-wdl">Syzygy WDL</label> <label for="syzygy-wdl">Syzygy WDL</label>
@@ -78,8 +83,15 @@
<option value="5-MAN"> 5-Man </option> <option value="5-MAN"> 5-Man </option>
<option value="4-MAN"> 4-Man </option> <option value="4-MAN"> 4-Man </option>
<option value="3-MAN"> 3-Man </option> <option value="3-MAN"> 3-Man </option>
</select><br> </select>
</div> </div>
</div>
<div class="col">
<h3>Time &amp; threads</h3>
<div class="row"> <div class="row">
<label for="tc-type">Time Type</label> <label for="tc-type">Time Type</label>
<select id="tc-type" name="tc-type" onchange="changed_timecontrol()"> <select id="tc-type" name="tc-type" onchange="changed_timecontrol()">
@@ -89,71 +101,87 @@
<option value="FIXED-TIME">Fixed Time</option> <option value="FIXED-TIME">Fixed Time</option>
<option value="FISCHER">Fischer</option> <option value="FISCHER">Fischer</option>
<option value="CYCLIC">Cyclic</option> <option value="CYCLIC">Cyclic</option>
</select><br> </select>
</div> </div>
<div class="row"> <div class="row">
<label for="tc-value-input">Time Value</label> <label for="tc-value-input">Time Value</label>
<select id="tc-value-select" name="tc-value-select" style="margin-right: 8px; flex-grow: 0"> <select id="tc-value-select" name="tc-value-select" aria-label="Time value comparison" style="flex-grow: 0">
<option value="=" selected>==</option> <option value="=" selected>=</option>
<option value=">=">&gt;=</option> <option value=">=">&gt;=</option>
<option value="<=">&lt;=</option> <option value="<=">&lt;=</option>
</select> </select>
<input id="tc-value-input" name="tc-value-input"><br> <input id="tc-value-input" name="tc-value-input">
</div> </div>
<div class="row"> <div class="row">
<label for="threads-input">Threads</label> <label for="threads-input">Threads</label>
<select id="threads-select" name="threads-select" style="margin-right: 8px; flex-grow: 0"> <select id="threads-select" name="threads-select" aria-label="Threads comparison" style="flex-grow: 0">
<option value="=">==</option> <option value="=">==</option>
<option value=">=" selected>&gt;=</option> <option value=">=" selected>&gt;=</option>
<option value="<=">&lt;=</option> <option value="<=">&lt;=</option>
</select> </select>
<input id="threads-input" name="threads-input" value="1"><br> <input id="threads-input" name="threads-input" value="1">
</div> </div>
<br>
<div class="row"> <h3>Show results</h3>
<div class="col">
<div class="row"> <div class="chips">
<label for="show-greens">Greens</label> <label class="chip chip-green" for="show-greens">
<input checked type="checkbox" id="show-greens" name="show-greens" value=""> <input checked type="checkbox" id="show-greens" name="show-greens" value="">Greens
</label>
<label class="chip chip-blue" for="show-blues">
<input checked type="checkbox" id="show-blues" name="show-blues" value="">Blues
</label>
<label class="chip chip-yellow" for="show-yellows">
<input checked type="checkbox" id="show-yellows" name="show-yellows" value="">Yellows
</label>
<label class="chip chip-red" for="show-reds">
<input checked type="checkbox" id="show-reds" name="show-reds" value="">Reds
</label>
<label class="chip" for="show-stopped">
<input checked type="checkbox" id="show-stopped" name="show-stopped" value="">Stopped
</label>
<label class="chip" for="show-deleted">
<input type="checkbox" id="show-deleted" name="show-deleted" value="">Deleted
</label>
</div> </div>
<div class="row">
<label for="show-blues">Blues</label>
<input checked type="checkbox" id="show-blues" name="show-blues" value="">
</div> </div>
</div> </div>
<div class="col">
<div class="row"> <div class="form-actions">
<label for="show-yellows">Yellows</label> <input type="submit" class="anchorbutton btn-blue" name="submit" value="Search Tests">
<input checked type="checkbox" id="show-yellows" name="show-yellows" value="">
</div>
<div class="row">
<label for="show-stopped">Stopped</label>
<input checked type="checkbox" id="show-stopped" name="show-stopped" value="">
</div>
</div>
<div class="col">
<div class="row">
<label for="show-reds">Reds</label>
<input checked type="checkbox" id="show-reds" name="show-reds" value="">
</div>
<div class="row">
<label for="show-deleted">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> </div>
</form> </form>
{% endif %} {% endif %}
{% if tests %}
<section class="card">
<header class="card-head">
<h2 class="card-title">Results</h2>
<span class="count">{{ tests|length }}</span>
</header>
<table class="test-list stripes hoverable"> <table class="test-list stripes hoverable">
<thead>
<tr class="table-header">
<th>Date</th>
<th>Author</th>
<th>Engine</th>
<th>Test</th>
<th class="textcenter">Diff</th>
<th>Time Control</th>
<th>Result</th>
</tr>
</thead>
<tbody>
{% for test in tests %} {% for test in tests %}
<tr> <tr>
<td class="datestamp">{{test.creation|date:"U"}}</td> <td class="datestamp col-date">{{test.creation|date:"U"}}</td>
{% include "OpenBench/Blocks/testsummary.html" %} {% include "OpenBench/Blocks/testsummary.html" %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>
</section>
{% endif %}
{% endblock %} {% endblock %}