Redesign forms: create workload, search, login, register, profile
- create_workload: presets moved above the form, cards per section, sticky submit bar; fixed stray attribute and wrong label target - search: grouped filters, colour-coded result chips, results table with column headers - login/register/profile: labels linked to inputs, autocomplete hints, centred auth card Field ids/names, JS hooks and Django logic are unchanged.
This commit is contained in:
1 parent
8969b8d4dd
commit
782e5190c3
5 files changed
+159
-107
No files matched your search
@@ -22,8 +22,20 @@
|
||||
</script>
|
||||
{% 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 %}
|
||||
|
||||
<!-- 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}}">
|
||||
{% csrf_token %}
|
||||
|
||||
@@ -121,7 +133,7 @@
|
||||
<h3> SPSA Input </h3>
|
||||
|
||||
<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>
|
||||
|
||||
{% endif %}
|
||||
@@ -187,7 +199,7 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<option value="YES"> Yes </option>
|
||||
<option selected value="NO"> No </option>
|
||||
@@ -226,7 +238,7 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
{% if workload == "TEST" or workload == "DATAGEN" %}
|
||||
@@ -269,15 +281,9 @@
|
||||
</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>
|
||||
|
||||
<div class="form">
|
||||
<div class="col-full">
|
||||
<div id="test-mode-buttons">
|
||||
<!-- Generated based on the selected Engine -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,20 +1,26 @@
|
||||
{% 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 %}
|
||||
|
||||
<form method="POST" action="/login/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<label type="text">Username</label> <input type="text" name="username"><br>
|
||||
<div class="auth-wrap">
|
||||
<form method="POST" action="/login/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<label for="username">Username</label>
|
||||
<input id="username" type="text" name="username" autocomplete="username" autofocus>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="password">Password</label>
|
||||
<input id="password" type="password" name="password" autocomplete="current-password">
|
||||
</div>
|
||||
<input type="submit" name="submit" value="Login" class="anchorbutton btn-blue w-100">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label type="text">Password</label> <input type="password" name="password"><br>
|
||||
</div>
|
||||
<input type="submit" name="submit" value="Login" class="anchorbutton btn-blue w-100">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -11,12 +11,15 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_head %}<div><h1 class="page-title">Profile</h1><p class="page-sub">{{ profile.user.username|capfirst }}</p></div>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="/profile/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
<div class="col">
|
||||
<h3>Account</h3>
|
||||
<div class="row">
|
||||
<label for="username">Username</label>
|
||||
<input id="username" readonly value="{{ profile.user.username }}">
|
||||
@@ -26,39 +29,40 @@
|
||||
<input id="email" value="{{ profile.user.email }}" name="email">
|
||||
</div>
|
||||
|
||||
<h3>Change password</h3>
|
||||
<div class="row">
|
||||
<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 class="row">
|
||||
<label for="password2">New Password</label>
|
||||
<input id="password2" type="password" name="password2">
|
||||
<label for="password2">Repeat Password</label>
|
||||
<input id="password2" type="password" name="password2" autocomplete="new-password">
|
||||
</div>
|
||||
<input class="anchorbutton btn-blue w-100" type="submit" value="Update Profile">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br>
|
||||
|
||||
<form method="POST" action="/profileConfig/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
<div class="col" id="engines-container">
|
||||
|
||||
<h3>Engines</h3>
|
||||
|
||||
<!-- Display engines which have repos already defined -->
|
||||
{% for engine, repo in profile.repos.items %}
|
||||
<div class="row" id="engine-row-{{ engine }}">
|
||||
<label for="engine-repo-{{engine}}">{{ engine }}</label>
|
||||
<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}}"
|
||||
{% if profile.engine == engine %}checked{% endif %}>
|
||||
</span>
|
||||
|
||||
<span onclick="deleteRow(event)">
|
||||
<i class="fa-solid fa-trash-can" style="color: #A00000;" data-engine="{{engine}}" ></i>
|
||||
<span onclick="deleteRow(event)" title="Remove engine">
|
||||
<i class="fa-solid fa-trash-can" data-engine="{{engine}}" ></i>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -110,4 +114,4 @@
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -1,26 +1,34 @@
|
||||
{% 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 %}
|
||||
|
||||
<form id="registerForm" method="POST" action="/register/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<label>Username</label><input name="username">
|
||||
<div class="auth-wrap">
|
||||
<form id="registerForm" method="POST" action="/register/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<label for="register-username">Username</label>
|
||||
<input id="register-username" name="username" autocomplete="username" autofocus>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="register-password1">Password</label>
|
||||
<input id="register-password1" type="password" name="password1" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="register-password2">Confirm Password</label>
|
||||
<input id="register-password2" type="password" name="password2" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="register-email">Email</label>
|
||||
<input id="register-email" name="email" autocomplete="email">
|
||||
</div>
|
||||
<input class="anchorbutton btn-blue w-100" type="submit" name="submit" value="Create User">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Password</label><input type="password" name="password1">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Password</label><input type="password" name="password2">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Email</label><input name="email">
|
||||
</div>
|
||||
<input class="anchorbutton btn-blue w-100" type="submit" name="submit" value="Create User">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -27,19 +27,25 @@
|
||||
|
||||
{% 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 %}
|
||||
{% if not tests %}
|
||||
<form method="POST" action="/search/">
|
||||
{% csrf_token %}
|
||||
<div class="form">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<h3>Who & what</h3>
|
||||
|
||||
<div class="row">
|
||||
<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 class="row">
|
||||
<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 class="row">
|
||||
<label for="engine">Engine</label>
|
||||
@@ -48,9 +54,8 @@
|
||||
{% for name, data in config.engines.items %}
|
||||
<option value="{{name}}">{{name}}</option>
|
||||
{% endfor %}
|
||||
</select><br>
|
||||
</select>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<label for="opening-book">Opening Book</label>
|
||||
<select id="opening-book" name="opening-book">
|
||||
@@ -58,15 +63,15 @@
|
||||
{% for name, data in config.books.items %}
|
||||
<option value="{{name}}">{{name}}</option>
|
||||
{% endfor %}
|
||||
</select><br>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="test-mode">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>
|
||||
<option value="SPRT">SPRT</option>
|
||||
<option value="GAMES">FIXED</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="syzygy-wdl">Syzygy WDL</label>
|
||||
@@ -78,8 +83,15 @@
|
||||
<option value="5-MAN"> 5-Man </option>
|
||||
<option value="4-MAN"> 4-Man </option>
|
||||
<option value="3-MAN"> 3-Man </option>
|
||||
</select><br>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
|
||||
<h3>Time & threads</h3>
|
||||
|
||||
<div class="row">
|
||||
<label for="tc-type">Time Type</label>
|
||||
<select id="tc-type" name="tc-type" onchange="changed_timecontrol()">
|
||||
@@ -89,71 +101,87 @@
|
||||
<option value="FIXED-TIME">Fixed Time</option>
|
||||
<option value="FISCHER">Fischer</option>
|
||||
<option value="CYCLIC">Cyclic</option>
|
||||
</select><br>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="tc-value-input">Time Value</label>
|
||||
<select id="tc-value-select" name="tc-value-select" style="margin-right: 8px; flex-grow: 0">
|
||||
<option value="=" selected>==</option>
|
||||
<select id="tc-value-select" name="tc-value-select" aria-label="Time value comparison" style="flex-grow: 0">
|
||||
<option value="=" selected>=</option>
|
||||
<option value=">=">>=</option>
|
||||
<option value="<="><=</option>
|
||||
</select>
|
||||
<input id="tc-value-input" name="tc-value-input"><br>
|
||||
<input id="tc-value-input" name="tc-value-input">
|
||||
</div>
|
||||
<div class="row">
|
||||
<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=">=" selected>>=</option>
|
||||
<option value="<="><=</option>
|
||||
</select>
|
||||
<input id="threads-input" name="threads-input" value="1"><br>
|
||||
<input id="threads-input" name="threads-input" value="1">
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<label for="show-greens">Greens</label>
|
||||
<input checked type="checkbox" id="show-greens" name="show-greens" value="">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="show-blues">Blues</label>
|
||||
<input checked type="checkbox" id="show-blues" name="show-blues" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<label for="show-yellows">Yellows</label>
|
||||
<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>
|
||||
|
||||
<h3>Show results</h3>
|
||||
|
||||
<div class="chips">
|
||||
<label class="chip chip-green" for="show-greens">
|
||||
<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>
|
||||
<input type="submit" class="anchorbutton btn-blue w-100" name="submit" value="Search Tests">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="anchorbutton btn-blue" name="submit" value="Search Tests">
|
||||
</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>
|
||||
{% 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">
|
||||
<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 %}
|
||||
<tr>
|
||||
<td class="datestamp col-date">{{test.creation|date:"U"}}</td>
|
||||
{% include "OpenBench/Blocks/testsummary.html" %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user