Reworked CSS (#103)

Recklessly merging, YOLO.
This commit is contained in:
Luecx authored and GitHub committed 2022-11-22 03:13:40 -05:00
1 parent d577d18eb5
commit e8fcc6a787
20 files changed
+1050 -707

No files matched your search

+9 -277
View File
@@ -1,295 +1,27 @@
body { html, body, header {
font-family: "Courier Prime"; height: 100%;
font-size: 18px; line-height: 1.5rem;
background: #303030; font-weight: 400;
} }
a:link, a:visited, a:hover, a:active {
text-decoration: none;
color: #FFFFFF;
}
#sidebar {
float: left;
margin: 16px;
margin-top: 60px;
}
#sidebar ul {
list-style-type: none;
padding: 0px 18px;
}
#sidebar li a {
color: #A2A2A2;
font-size: 15px;
}
#sidebar .header {
font-size: 15px;
color: #00AF00;
}
#content {
float: left;
margin-top: 0;
color: #EAEAEA;
}
#content label {
width: 128px;
padding-right: 10px;
text-align: right;
display: inline-block;
color: #A2A2A2;
font-size: 14px;
}
#content input, #content select {
background-color: #BBBBBB;
color: #000000;
padding: 10px;
margin: 1px 0px;
width: 320px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
#content button {
padding: 8px 0px;
margin: 2px 0px;
display: inline-block;
vertical-align: middle;
width: 290px;
background-color: #777777;
color: black;
border: none;
border-radius: 16px;
cursor: pointer;
font-weight: bold;
}
#content button:hover {
background-color: #00AF00;
}
#content input[type=submit] {
background-color: #00AF00;
color: #000000;
border: none;
border-radius: 16px;
cursor: pointer;
width: 100%;
font-weight: bold;
}
#content input:read-only {
font-weight: bold;
}
#content input:-moz-read-only {
font-weight: bold;
}
#content #configuration {
float: left;
margin-top: 20px;
}
#content #actions {
margin-left: 32px;
float: right;
}
#content #actions h4 {
color: #A2A2A2;
font-size: 15px;
font-weight: bold;
}
#content #actions .anchorbutton {
color: #000000;
padding: 8px 8px;
margin: 0px 8px;
border-radius: 16px;
font-weight: bold;
text-align: center;
display: inline-block;
width: 25%;
}
#content #actions .anchorbutton a:hover {
background-color: #00AF00;
}
#content #actions #approvebutton {
background-color: #9DF779;
}
#content #actions #stopbutton {
background-color: #EEF788;
}
#content #actions #restartbutton {
background-color: #EEF788;
}
#content #actions #deletebutton {
background-color: #FA8E8E;
}
#content #actions .deadbutton {
background-color: #808080;
pointer-events: none;
}
#content #actions input {
width: 260px;
}
#content #actions input[type=submit] {
width: 100%;
}
#content .left-align {
text-align: left;
}
#content tr:hover {
background-color: #666666;
}
#content th {
color: #00AF00;
font-size: 16px;
font-weight: 100;
padding: 7px 12px 5px 12px;
background-color: #000000;
}
#content td {
padding: 7px 12px 5px 12px;
}
#content .numeric {
text-align: right;
}
#content tr {
background-color: #202020;
}
#content .table-spacer th {
background: #303030;
height: 16px;
}
#content .statblock { #content .statblock {
line-height: 70%;
color: black; color: black;
background-color: #CCCCCC; background-color: #CCCCCC;
border-radius: 4px; font-family: Courier, serif;
font-family: "Courier New";
} }
#content .green { #content .green {
background-color: #9DF779 background-color: #6bd26b
/*background: linear-gradient(to bottom, #75bb76 0%, #44EB44 100%);*/
} }
#content .yellow { #content .yellow {
background-color: #EEF788 background-color: #EEF788
} }
#content .red { #content .red {
/*background: linear-gradient(to bottom, #FA8E8E 0%, #da7474 100%);*/
background-color: #FA8E8E background-color: #FA8E8E
} }
#content #results {
display: inline-block;
width: inherit;
}
#content table {
line-height: 96%;
}
#content .textcenter {
text-align: center;
}
#content strong {
font-size: 14px;
font-weight: bold;
}
#content a:not(.TitleLink) {
font-weight: 100;
color: #8BBAD6;
}
#content a.redlink {
color: #FF4D4D;
}
#content a.unstarred {
color: #808080;
}
#content h1, h2, h3 {
color: #a7a7a7;
text-align: center;
}
#content #pagebrowse {
text-align: center;
margin: 16px 0px 16px 0px;
}
#content .page {
text-align: center;
display: inline-block;
padding: 8px 0px;
width: 5%;
background-color: #1A1A1A;
border-radius: 8px;
}
#content .page:hover {
background-color: #00AF00;
}
#error {
background-color: #EE7676;
padding: 8px;
text-align: center;
}
#content form h3 {
margin-left: 110px;
margin-bottom: 2px;
font-size: 16px;
font-weight: normal;
color: #00AF00;
}
#content h4 a {
font-size: 18px;
}
#content form .settings-column {
float: left;
padding-bottom: 16px;
}
#content #test-mode-buttons button {
width: 49.8%;
}
#content #test-mode-buttons .left-floated {
float: left;
}
#content #test-mode-buttons .right-floated {
float: right;
}
+44 -12
View File
@@ -33,6 +33,7 @@ def oneDigitPrecision(value):
except: except:
return value return value
def twoDigitPrecision(value): def twoDigitPrecision(value):
try: try:
value = round(value, 2) value = round(value, 2)
@@ -44,8 +45,8 @@ def twoDigitPrecision(value):
except: except:
return value return value
def gitDiffLink(test):
def gitDiffLink(test):
if type(test) != OpenBench.models.Test: if type(test) != OpenBench.models.Test:
dev = test['dev']['source'] dev = test['dev']['source']
base = test['base']['source'] base = test['base']['source']
@@ -62,10 +63,9 @@ def gitDiffLink(test):
return OpenBench.utils.pathjoin(repo, 'compare', return OpenBench.utils.pathjoin(repo, 'compare',
'{0}...{1}'.format(basesha[:8], devsha[:8])) '{0}...{1}'.format(basesha[:8], devsha[:8]))
def shortStatBlock(test): def shortStatBlock(test):
if test.test_mode == "SPRT": if test.test_mode == "SPRT":
currentllr = twoDigitPrecision(test.currentllr) currentllr = twoDigitPrecision(test.currentllr)
lowerllr = twoDigitPrecision(test.lowerllr) lowerllr = twoDigitPrecision(test.lowerllr)
upperllr = twoDigitPrecision(test.upperllr) upperllr = twoDigitPrecision(test.upperllr)
@@ -78,7 +78,6 @@ def shortStatBlock(test):
+ 'Games: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws) + 'Games: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws)
if test.test_mode == "GAMES": if test.test_mode == "GAMES":
lower, elo, upper = OpenBench.stats.ELO(test.wins, test.losses, test.draws) lower, elo, upper = OpenBench.stats.ELO(test.wins, test.losses, test.draws)
error = max(upper - elo, elo - lower) error = max(upper - elo, elo - lower)
@@ -88,8 +87,29 @@ def shortStatBlock(test):
return 'Elo: {0} +- {1} (95%) [N={2}]\n'.format(elo, error, test.max_games) \ return 'Elo: {0} +- {1} (95%) [N={2}]\n'.format(elo, error, test.max_games) \
+ 'Games: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws) + 'Games: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws)
def longStatBlock(test):
def shortBoldBlock(test):
if test.test_mode == "SPRT":
currentllr = twoDigitPrecision(test.currentllr)
lowerllr = twoDigitPrecision(test.lowerllr)
upperllr = twoDigitPrecision(test.upperllr)
elolower = twoDigitPrecision(test.elolower)
eloupper = twoDigitPrecision(test.eloupper)
llrbounds = '({}, {}) '.format(lowerllr, upperllr)
return 'LLR: {0}'.format(currentllr)
if test.test_mode == "GAMES":
lower, elo, upper = OpenBench.stats.ELO(test.wins, test.losses, test.draws)
error = max(upper - elo, elo - lower)
elo = twoDigitPrecision(elo)
error = twoDigitPrecision(error)
return 'Elo: {0} +- {1}'.format(elo, error, test.max_games)
def longStatBlock(test):
tokens = test.devoptions.split(' ') tokens = test.devoptions.split(' ')
threads = tokens[0].split('=')[1] threads = tokens[0].split('=')[1]
hash = tokens[1].split('=')[1] hash = tokens[1].split('=')[1]
@@ -101,7 +121,6 @@ def longStatBlock(test):
error = twoDigitPrecision(error) error = twoDigitPrecision(error)
if test.test_mode == 'SPRT': if test.test_mode == 'SPRT':
lowerllr = twoDigitPrecision(test.lowerllr) lowerllr = twoDigitPrecision(test.lowerllr)
currentllr = twoDigitPrecision(test.currentllr) currentllr = twoDigitPrecision(test.currentllr)
upperllr = twoDigitPrecision(test.upperllr) upperllr = twoDigitPrecision(test.upperllr)
@@ -114,56 +133,69 @@ def longStatBlock(test):
+ 'GAMES | N: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws) + 'GAMES | N: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws)
if test.test_mode == 'GAMES': if test.test_mode == 'GAMES':
return 'ELO | {0} +- {1} (95%)\n'.format(elo, error) \ return 'ELO | {0} +- {1} (95%)\n'.format(elo, error) \
+ 'CONF | {0}s Threads={1} Hash={2}MB\n'.format(test.timecontrol, threads, hash) \ + 'CONF | {0}s Threads={1} Hash={2}MB\n'.format(test.timecontrol, threads, hash) \
+ 'GAMES | N: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws) + 'GAMES | N: {0} W: {1} L: {2} D: {3}'.format(test.games, test.wins, test.losses, test.draws)
def testResultColour(test):
def testResultColour(test):
if test.passed: return 'green' if test.passed: return 'green'
if test.failed: if test.failed:
if test.wins >= test.losses: return 'yellow' if test.wins >= test.losses: return 'yellow'
return 'red' return 'red'
return '' return ''
def sumAttributes(iterable, attribute): def sumAttributes(iterable, attribute):
try: return sum([getattr(f, attribute) for f in iterable]) try:
except: return 0 return sum([getattr(f, attribute) for f in iterable])
except:
return 0
def insertCommas(value): def insertCommas(value):
return '{:,}'.format(int(value)) return '{:,}'.format(int(value))
def prettyName(name): def prettyName(name):
if re.search('[0-9a-fA-F]{40}', name): if re.search('[0-9a-fA-F]{40}', name):
return name[:16].upper() return name[:16].upper()
return name return name
def prettyDevName(test): def prettyDevName(test):
if test.dev.name == test.base.name and test.devnetname != '': if test.dev.name == test.base.name and test.devnetname != '':
try: return OpenBench.models.Network.objects.get(sha256=test.devnetwork).name try:
except: return test.devnetname # File has since been deleted ? return OpenBench.models.Network.objects.get(sha256=test.devnetwork).name
except:
return test.devnetname # File has since been deleted ?
return prettyName(test.dev.name) return prettyName(test.dev.name)
def testIsFRC(test): def testIsFRC(test):
return "FRC" in test.bookname.upper() or "960" in test.bookname.upper() return "FRC" in test.bookname.upper() or "960" in test.bookname.upper()
def resolveNetworkURL(sha256): def resolveNetworkURL(sha256):
if OpenBench.models.Network.objects.filter(sha256=sha256): if OpenBench.models.Network.objects.filter(sha256=sha256):
return '/networks/download/{0}'.format(sha256) return '/networks/download/{0}'.format(sha256)
return sha256 # Legacy Networks return sha256 # Legacy Networks
def testIdToPrettyName(test_id): def testIdToPrettyName(test_id):
return prettyName(OpenBench.models.Test.objects.get(id=test_id).dev.name) return prettyName(OpenBench.models.Test.objects.get(id=test_id).dev.name)
def testIdToTimeControl(test_id): def testIdToTimeControl(test_id):
return OpenBench.models.Test.objects.get(id=test_id).timecontrol return OpenBench.models.Test.objects.get(id=test_id).timecontrol
register = django.template.Library() register = django.template.Library()
register.filter('oneDigitPrecision', oneDigitPrecision) register.filter('oneDigitPrecision', oneDigitPrecision)
register.filter('twoDigitPrecision', twoDigitPrecision) register.filter('twoDigitPrecision', twoDigitPrecision)
register.filter('gitDiffLink', gitDiffLink) register.filter('gitDiffLink', gitDiffLink)
register.filter('shortStatBlock', shortStatBlock) register.filter('shortStatBlock', shortStatBlock)
register.filter('shortBoldBlock', shortBoldBlock)
register.filter('longStatBlock', longStatBlock) register.filter('longStatBlock', longStatBlock)
register.filter('testResultColour', testResultColour) register.filter('testResultColour', testResultColour)
register.filter('sumAttributes', sumAttributes) register.filter('sumAttributes', sumAttributes)
+1 -1
View File
@@ -93,7 +93,7 @@ def getMachineStatus(username=None):
if username != None: if username != None:
machines = machines.filter(user__username=username) machines = machines.filter(user__username=username)
return ": {0} Machines / ".format(len(machines)) + \ return "{0} Machines / ".format(len(machines)) + \
"{0} Threads / ".format(sum([f.threads for f in machines])) + \ "{0} Threads / ".format(sum([f.threads for f in machines])) + \
"{0} MNPS ".format(round(sum([f.threads * f.mnps for f in machines]), 2)) "{0} MNPS ".format(round(sum([f.threads * f.mnps for f in machines]), 2))
+1 -1
View File
@@ -379,7 +379,7 @@ def machines(request):
# # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
data = {'machines' : OpenBench.utils.getRecentMachines()} data = {'machines' : OpenBench.utils.getRecentMachines(10080)}
return render(request, 'machines.html', data) return render(request, 'machines.html', data)
+41 -6
View File
@@ -1,13 +1,48 @@
<div id="pagebrowse"> <div class="d-flex justify-content-center mb-5" id="pagebrowse">
{% if paging.prev != paging.next %} {% if paging.prev != paging.next %}
<a class="page" href="/{{paging.url}}/{{paging.prev}}">&lt;--</a>
<nav aria-label="Page navigation">
<ul class="pagination">
<li class="page-item"><a class="page-link" href="/{{paging.url}}/{{paging.prev}}"><i class="fa-solid fa-arrow-left"></i></a></li>
{% for page in paging.pages %} {% for page in paging.pages %}
{% if page != "..." %}
<a class="page" href="/{{paging.url}}/{{page}}">{{page}}</a> {% if page == paging.page %}
<li class="page-item"><a class="page-link bg-light" href="/{{paging.url}}/{{page}}">{{page}}</a></li>
{% elif page != "..." %}
<li class="page-item"><a class="page-link" href="/{{paging.url}}/{{page}}">{{page}}</a></li>
{% else %} {% else %}
<a class="page"> {{page}} </a> <li class="page-item"><a class="page-link" href="#">{{page}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<a class="page" href="/{{paging.url}}/{{paging.next}}">--&gt;</a> <li class="page-item"><a class="page-link" href="/{{paging.url}}/{{paging.next}}"><i class="fa-solid fa-arrow-right"></i></a></li>
</ul>
</nav>
{% endif %} {% endif %}
{# {% if paging.prev != paging.next %}#}
{# <a class="page" href="/{{paging.url}}/{{paging.prev}}">&lt;--</a>#}
{# {% for page in paging.pages %}#}
{# {% if page != "..." %}#}
{# <a class="page" href="/{{paging.url}}/{{page}}">{{page}}</a>#}
{# {% else %}#}
{# <a class="page"> {{page}} </a>#}
{# {% endif %}#}
{# {% endfor %}#}
{# <a class="page" href="/{{paging.url}}/{{paging.next}}">--&gt;</a>#}
{# {% endif %}#}
{##}
{# {% if paging.prev != paging.next %}#}
{# <a class="page" href="/{{paging.url}}/{{paging.prev}}">&lt;--</a>#}
{# {% for page in paging.pages %}#}
{# {% if page != "..." %}#}
{# <a class="page" href="/{{paging.url}}/{{page}}">{{page}}</a>#}
{# {% else %}#}
{# <a class="page"> {{page}} </a>#}
{# {% endif %}#}
{# {% endfor %}#}
{# <a class="page" href="/{{paging.url}}/{{paging.next}}">--&gt;</a>#}
{# {% endif %}#}
</div> </div>
+40 -9
View File
@@ -1,11 +1,42 @@
{% load mytags %} {% load mytags %}
<tr> <tr class="w-100" onclick="location.href='/test/{{ test.id }}'">
<td><a href="/user/{{test.author}}">{{test.author|capfirst|slice:":6"}}</a></td> <td>
<td>{{test.engine}}</td> <a class="text-left btn btn-primary-outline btn-block btn-link text-decoration-none " href="/user/{{ test.author }}" role="button">
{% if test.error %} <td><a href="/test/{{test.id}}"><span style="color: red">[x]</span> {{test|prettyDevName}}</a></td> {{ test.author|capfirst|slice:":6" }}
{% elif test|testIsFRC %} <td><a href="/test/{{test.id}}">{{test|prettyDevName}}<span style="color: green">[FRC]</span></a></td> </a>
{% else %} <td><a href="/test/{{test.id}}">{{test|prettyDevName}}</a></td> {% endif %} </td>
<td class="textcenter"><a href="{{test|gitDiffLink}}">diff</a></td> <td class="text-left text-truncate"><a class="text-left btn btn-primary-outline btn-block"
<td>{{test.timecontrol}}</td> role="button">{{ test.engine }}</a></td>
<td class='statblock {{test|testResultColour}}'><strong>{{test|shortStatBlock|linebreaksbr}}</strong></td> {% if test.error %}
<td class="text-left text-truncate"><a class="text-left btn btn-outline-danger btn-block text-danger"
href="/test/{{ test.id }}"
role="button"><span>[x]</span> {{ test|prettyDevName }}</a></td>
{% elif test|testIsFRC %}
<td class="text-left text-truncate"><a class="text-left btn btn-primary-outline btn-block"
href="/test/{{ test.id }}" role="button">{{ test|prettyDevName }}<span
style="color: green">[FRC]</span></a></td>
{% else %}
<td class="text-left text-truncate"><a class="text-left btn btn-primary-outline btn-block"
href="/test/{{ test.id }}" role="button">{{ test|prettyDevName }}</a>
</td> {% endif %}
<td class="text-center"><a class="btn btn-primary-outline btn-link btn-block text-decoration-none" href="{{ test|gitDiffLink }}" role="button">diff</a>
</td>
<td class="text-center"><a class="btn btn-primary-outline btn-block" role="button">{{ test.timecontrol }}</a></td>
{# <td class="align-middle statblock {{ test|testResultColour }}">#}
{# <label style="font-size: 0.8rem; line-height:1.1rem" class="align-middle align-text-bottom text-monospace px-0">#}
{# <div class="row">#}
{# <div class="col-12 ">{{ test|shortStatBlock|linebreaksbr }}</div>#}
{# </div>#}
{# </label>#}
{# </td>#}
<td style="font-size: 0.8rem; line-height:1.2rem; border-radius:7px;"
class='text-monospace statblock {{ test|testResultColour }}'>
<div class="px-2 row h-100 mh-100 py-0">
{# <!-- <div class="col-4 align-self-center text-center"><h6><strong>{{ test|shortBoldBlock|linebreaksbr }}</strong></h6></div> -->#}
<div class="col-12 ">{{ test|shortStatBlock|linebreaksbr }}</div>
</div>
</td>
</tr> </tr>
+112 -51
View File
@@ -2,30 +2,51 @@
<html lang="en"> <html lang="en">
{% load static %} {% load static %}
<head> <head>
<link rel="stylesheet" href="{% static 'style.css' %}">
<link rel="icon" type="image/svg+xml" href="{% static 'logo.svg' %}"> <link rel="icon" type="image/svg+xml" href="{% static 'logo.svg' %}">
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css ' rel='stylesheet'> <link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css' rel='stylesheet'>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,400;1,100&amp;display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,400;1,100&amp;display=swap"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
{# <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"#}
{# integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">#}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
{# <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"#}
{# integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"#}
{# crossorigin="anonymous"></script>#}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/css/bootstrap-nightfall.min.css"
rel="stylesheet" media="(prefers-color-scheme: dark)">
<link rel="stylesheet" href="{% static 'style.css' %}">
<title>OpenBench</title> <title>OpenBench</title>
<script> <script>
{% block scripts %} {% block scripts %}
{% endblock %} {% endblock %}
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function () {
var timestamps = document.getElementsByClassName('timestamp'); var timestamps = document.getElementsByClassName('timestamp');
var options = { var options = {
year : 'numeric', month : '2-digit', year: 'numeric', month: '2-digit',
day : '2-digit', hour : '2-digit', day: '2-digit', hour: '2-digit',
minute : '2-digit', second : '2-digit', minute: '2-digit', second: '2-digit',
hour12 : false, hour12: false,
}; };
for (var i = 0; i < timestamps.length; i++) { for (var i = 0; i < timestamps.length; i++) {
@@ -35,71 +56,111 @@
}, false); }, false);
</script> </script>
</head> </head>
<body> <body class="container-fluid p-0 w-100 h-100 bg-body">
<!-- Views may return an error message --> <!-- Views may return an error message -->
{% if error %} {% if error %}
<div id="error"> <div id="error">
<pre>{{error}}</pre> <pre>{{ error }}</pre>
</div> </div>
{% endif %} {% endif %}
<nav class="navbar navbar-expand-lg navbar-light bg-dark sticky-top">
<div class="container container-xxl" style="max-width: 1540px;">
<a class="navbar-brand w-100" href="#">
<h2><i class="fa-solid fa-chess-knight fa-1x"></i> OpenBench Testing Framework</h2>
</a>
</div>
</nav>
<div id="sidebar"> <div class="">
<div class="container container-xxl" style="max-width: 1540px;">
<ul> <div class="row h-100">
<li class="header">Admin</li> <div class="col-12 col-md-3 col-xl-2 h-75 pt-5">
<label class="mb-2" style="color:green;"><strong>Admin<br></strong></label>
<ul class="list-unstyled font-weight-normal pb-2 w-100">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a href="/logout/">Logout</a></li> <li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
<li><a href="/profile/">Profile</a></li> href="/logout/"><i class="fa-solid fa-right-from-bracket fa-fw"></i> Logout</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
href="/profile/"><i class="fa-solid fa-user fa-fw"></i> Profile</a></li>
{% else %} {% else %}
<li><a href="/login">Login</a></li> <li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
<li><a href="/register">Register</a></li> href="/login"><i class="fa-solid fa-right-to-bracket fa-fw"></i> Login</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
href="/register"><i class="fa-solid fa-registered fa-fw"></i> Register</a></li>
{% endif %} {% endif %}
</ul> </ul>
<ul> <hr>
<li class="header">Tests</li>
<li><a href="/index">Index</a></li> <label class="mb-2" style="color:green;"><strong>Tests<br></strong></label>
<li><a href="/greens">Greens</a></li> <ul class="list-unstyled font-weight-normal pb-2">
<li><a href="/search">Search</a></li> <li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/index"><i
class="fa-solid fa-house fa-fw"></i> Index</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/greens"><i
class="fa-solid fa-heart fa-fw"></i> Greens</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/search"><i
class="fa-solid fa-magnifying-glass fa-fw"></i> Search</a></li>
</ul> </ul>
<ul> <hr>
<li class="header">Actions</li>
<li><a href="/newTest">Create Test</a></li> <label class="mb-2" style="color:green;"><strong>Actions<br></strong></label>
<li><a href="/networks/upload">Upload Net</a></li> <ul class="list-unstyled font-weight-normal pb-2">
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/newTest"><i
class="fa-solid fa-plus fa-fw"></i> Create Test</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
href="/networks/upload"><i class="fa-solid fa-upload fa-fw"></i> Upload Network</a></li>
</ul> </ul>
<ul> <hr>
<li class="header">Info</li>
<li><a href="/users">Users</a></li> <label class="mb-2" style="color:green;"><strong>Info<br></strong></label>
<li><a href="/events">Events</a></li> <ul class="list-unstyled font-weight-normal pb-2">
<li><a href="/machines">Machines</a></li> <li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/users"><i
<li><a href="/networks">Networks</a></li> class="fa-solid fa-users fa-fw"></i> Users</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/events"><i
class="fa-solid fa-circle-exclamation fa-fw"></i> Events</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/machines"><i
class="fa-solid fa-microchip fa-fw"></i> Machines</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light" href="/networks"><i
class="fa-solid fa-circle-nodes fa-fw"></i> Networks</a></li>
</ul> </ul>
<ul> <hr>
<li class="header">Support</li>
<li><a href="{{config.framework}}">OpenBench</a></li> <label class="mb-2" style="color:green;"><strong>Support<br></strong></label>
<li><a href="https://discord.gg/9MVg7fBTpM">Discord</a></li> <ul class="list-unstyled font-weight-normal pb-2">
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
href="{{ config.framework }}"><i class="fa-brands fa-github fa-fw"></i> OpenBench</a></li>
<li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
href="https://discord.gg/9MVg7fBTpM"><i class="fa-brands fa-discord fa-fw"></i> Discord</a></li>
</ul> </ul>
<ul> <hr>
<li class="header">Engines</li>
<label class="mb-2" style="color:green;"><strong>Engines<br></strong></label>
<ul class="list-unstyled font-weight-normal pb-2">
{% for engine, data in config.engines.items|dictsort:"0.lower" %} {% for engine, data in config.engines.items|dictsort:"0.lower" %}
<li><a href="{{data.source}}">{{engine}}</a></li> <li><a class="w-100 rounded border-0 btn btn-outline-dark text-start text-light"
href="{{ data.source }}">{{ engine }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
<div class="col-12 col-md-9 col-xl-10 pt-5">
<div id="content"> <div class="w-100 mb-5" id="content">
<h2> <a class="TitleLink" href="/">OpenBench Testing Framework</a></h2>
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div> </div>
</div>
</div>
</div>
</div>
</body>
</body>
</html> </html>
+102 -52
View File
@@ -2,79 +2,129 @@
<html lang="en"> <html lang="en">
{% load static %} {% load static %}
<head> <head>
<link rel="stylesheet" href="{% static 'style.css' %}"> <link rel="stylesheet" href="{% static 'style.css' %}">
<link rel="icon" type="image/svg+xml" href="{% static 'logo.svg' %}"> <link rel="icon" type="image/svg+xml" href="{% static 'logo.svg' %}">
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css' rel='stylesheet'>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,400;1,100&amp;display=swap"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital@0;1&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital@0;1&display=swap" rel="stylesheet">
<title> Ethereal 13.75 (NNUE) </title> <title> Ethereal 13.75 (NNUE) </title>
<style> <style>
body, html, :root {
body { height: 100%;
background: #202020;
transform: scale(1.05);
} }
#content {
font-family: "Open Sans", sans-serif;
}
#content h1 {
font-size: 64px;
font-weight: bold;
margin: 20px 0px;
color: #00AF00;
font-style: italic;
}
#content p {
font-size: 16px;
margin: 16px 100px;
text-align: justify
}
#content #buyethereal {
font-size: 32px;
display: block;
border-radius: 8px;
color: black;
font-weight: bold;
background: #00AF00;
text-align: center;
margin-top: 20px;
line-height: 64px;
border-color: black;
margin: 0px 100px;
}
</style> </style>
</head> </head>
<body> <body class="w-100 h-100">
<div id="content"> <div class="container-fluid h-100">
<div class="container h-100" style="max-width: 1500px">
<div class="min-vh-100 d-flex align-items-center">
<div class="jumbotron container align-items-center text-center">
{# <img class="w-100 mw-100" src="https://github.com/AndyGrant/Ethereal/blob/master/logo.png?raw=true">#}
<h1 class="mb-5"> <strong>Ethereal 13.75</strong> </h1>
<h1> Ethereal 13.75 </h1> <p> Ethereal 13.75 (NNUE) has been released. Since 13.50, a large number of changes have been made to
improve the search, time management, and NNUE architecture and training methods. Ethereal has
received multiple iterations of NNUE updates since 13.50, finally arriving at a pair of newly
trained Networks that are larger, but still faster than previous Networks. These Networks are
trained using the sum total of training data built up since 13.00.</p>
<p> Ethereal 13.75 (NNUE) has been released. Since 13.50, a large number of changes have been made to improve the search, time management, and NNUE architecture and training methods. Ethereal has received multiple iterations of NNUE updates since 13.50, finally arriving at a pair of newly trained Networks that are larger, but still faster than previous Networks. These Networks are trained using the sum total of training data built up since 13.00.</p> <p> Ethereal 13.75 (NNUE) once again includes two NNUE Networks for evaluation. These Networks continue
Ethereal's long standing legacy of original work. These Networks are not trained on, nor duplicated
from the works of any other Computer Chess team. With it, Ethereal continues to refine new ideas and
techniques, allowing older processors to outperform NNUE implementations found in other engines,
while still harnessing the full power of the AVX/AVX2 instruction sets for CPUs with support. </p>
<p> Ethereal 13.75 (NNUE) once again includes two NNUE Networks for evaluation. These Networks continue Ethereal's long standing legacy of original work. These Networks are not trained on, nor duplicated from the works of any other Computer Chess team. With it, Ethereal continues to refine new ideas and techniques, allowing older processors to outperform NNUE implementations found in other engines, while still harnessing the full power of the AVX/AVX2 instruction sets for CPUs with support. </p> <p> Additionally, Ethereal 13.00 was the first engine to offer a secondary Network trained exclusively
for Fischer Random Chess (FRC). Ethereal 13.75 once again provides a secondary Network, updated with
all of the improvements found between releases. This Network outperforms the standard Network by
significant margins in FRC play, showcasing a creative style by Ethereal, not reliant on Opening
Theory.</p>
<p> Additionally, Ethereal 13.00 was the first engine to offer a secondary Network trained exclusively for Fischer Random Chess (FRC). Ethereal 13.75 once again provides a secondary Network, updated with all of the improvements found between releases. This Network outperforms the standard Network by significant margins in FRC play, showcasing a creative style by Ethereal, not reliant on Opening Theory.</p> <p> The commercial NNUE version requires a CPU with the SSSE3 instruction set (which almost all CPUs
have), and will not run on systems lacking these instructions. AVX/AVX2 have become ubiquitous in
modern processor design, and are necessary to capitalize on the full strength of Neural Network
technology. If you are unsure if your system is supported, please reach out to me via email at <a>andrew@grantnet.us</a>
for assistance. </p>
<p> The commercial NNUE version requires a CPU with the SSSE3 instruction set (which almost all CPUs have), and will not run on systems lacking these instructions. AVX/AVX2 have become ubiquitous in modern processor design, and are necessary to capitalize on the full strength of Neural Network technology. If you are unsure if your system is supported, please reach out to me via email at <a>andrew@grantnet.us</a> for assistance. </p> <p><a href="https://stripe.com">Stripe</a> will verify your payment of $40 USD. Afterwards, you will
receive an email from <a>andrew@grantnet.us</a> or <a>andrewgrantethereal@gmail.com</a> within 24
hours containing a download link for the Standard/Fischer NNUE Networks, as well as the binary or
executable files for Windows and Linux. You should select the binary matching your Operating System.
Users with Intel CPUs containing BMI2 support (Also known as PEXT), should use the pext binary for
optimal performance. AMD CPU users should use the popcnt binary, unless they have a 5XXX series
Ryzen. AVX2 binaries will be the fastest, followed by AVX, and finally SSSE3. You should use the
fastest your CPU allows. </p>
<p> <a href="https://stripe.com">Stripe</a> will verify your payment of $40 USD. Afterwards, you will receive an email from <a>andrew@grantnet.us</a> or <a>andrewgrantethereal@gmail.com</a> within 24 hours containing a download link for the Standard/Fischer NNUE Networks, as well as the binary or executable files for Windows and Linux. You should select the binary matching your Operating System. Users with Intel CPUs containing BMI2 support (Also known as PEXT), should use the pext binary for optimal performance. AMD CPU users should use the popcnt binary, unless they have a 5XXX series Ryzen. AVX2 binaries will be the fastest, followed by AVX, and finally SSSE3. You should use the fastest your CPU allows. </p> <p> If you purchased Ethereal 13.00, or 13.25, or 13.50, you should have received an email containing
updates to 13.75 free of charge. If you did not, and the email cannot be found in your spam folder,
<p> If you purchased Ethereal 13.00, or 13.25, or 13.50, you should have received an email containing updates to 13.75 free of charge. If you did not, and the email cannot be found in your spam folder, please reach out to me via <a>andrew@grantnet.us</a> or <a>andrewgrantethereal@gmail.com.</p> please reach out to me via <a>andrew@grantnet.us</a> or <a>andrewgrantethereal@gmail.com.</p>
<br> <br>
<a id="buyethereal" href="https://buy.stripe.com/aEU7wz19x7EGbJeaEG"> Buy Ethereal 13.75 (NNUE) </a> {# <button class="btn btn-primary" id="buyethereal" href="https://buy.stripe.com/aEU7wz19x7EGbJeaEG"> Buy#}
{# Ethereal 13.75 (NNUE)#}
{# <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">#}
{# Special Offer!#}
{# </span>#}
{# </button>#}
<button type="button" class="btn btn-primary position-relative" id="buyethereal" href="https://buy.stripe.com/aEU7wz19x7EGbJeaEG">
Buy Ethereal 13.75 (NNUE)
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
Christmas Offer
</span>
</button>
</div> </div>
</body> </div>
</div>
</div>
{# <div id="content">#}
{##}
{# <h1> Ethereal 13.75 </h1>#}
{##}
{# <p> Ethereal 13.75 (NNUE) has been released. Since 13.50, a large number of changes have been made to improve the search, time management, and NNUE architecture and training methods. Ethereal has received multiple iterations of NNUE updates since 13.50, finally arriving at a pair of newly trained Networks that are larger, but still faster than previous Networks. These Networks are trained using the sum total of training data built up since 13.00.</p>#}
{##}
{# <p> Ethereal 13.75 (NNUE) once again includes two NNUE Networks for evaluation. These Networks continue Ethereal's long standing legacy of original work. These Networks are not trained on, nor duplicated from the works of any other Computer Chess team. With it, Ethereal continues to refine new ideas and techniques, allowing older processors to outperform NNUE implementations found in other engines, while still harnessing the full power of the AVX/AVX2 instruction sets for CPUs with support. </p>#}
{##}
{# <p> Additionally, Ethereal 13.00 was the first engine to offer a secondary Network trained exclusively for Fischer Random Chess (FRC). Ethereal 13.75 once again provides a secondary Network, updated with all of the improvements found between releases. This Network outperforms the standard Network by significant margins in FRC play, showcasing a creative style by Ethereal, not reliant on Opening Theory.</p>#}
{##}
{# <p> The commercial NNUE version requires a CPU with the SSSE3 instruction set (which almost all CPUs have), and will not run on systems lacking these instructions. AVX/AVX2 have become ubiquitous in modern processor design, and are necessary to capitalize on the full strength of Neural Network technology. If you are unsure if your system is supported, please reach out to me via email at <a>andrew@grantnet.us</a> for assistance. </p>#}
{##}
{# <p> <a href="https://stripe.com">Stripe</a> will verify your payment of $40 USD. Afterwards, you will receive an email from <a>andrew@grantnet.us</a> or <a>andrewgrantethereal@gmail.com</a> within 24 hours containing a download link for the Standard/Fischer NNUE Networks, as well as the binary or executable files for Windows and Linux. You should select the binary matching your Operating System. Users with Intel CPUs containing BMI2 support (Also known as PEXT), should use the pext binary for optimal performance. AMD CPU users should use the popcnt binary, unless they have a 5XXX series Ryzen. AVX2 binaries will be the fastest, followed by AVX, and finally SSSE3. You should use the fastest your CPU allows. </p>#}
{##}
{# <p> If you purchased Ethereal 13.00, or 13.25, or 13.50, you should have received an email containing updates to 13.75 free of charge. If you did not, and the email cannot be found in your spam folder, please reach out to me via <a>andrew@grantnet.us</a> or <a>andrewgrantethereal@gmail.com.</p>#}
{##}
{# <br>#}
{##}
{# <a id="buyethereal" href="https://buy.stripe.com/aEU7wz19x7EGbJeaEG"> Buy Ethereal 13.75 (NNUE) </a>#}
{# </div>#}
</body>
</html> </html>
+40 -17
View File
@@ -4,31 +4,54 @@
{% block content %} {% block content %}
<table> <table class="table table-striped table-sm table-hover">
<thead class="bg-black">
<tr> <tr>
<th>Date</th> <th style="color:green">Date</th>
<th>User</th> <th style="color:green">User</th>
<th>Test</th> <th style="color:green">Test</th>
<th>Worker</th> <th style="color:green">Worker</th>
<th>TC</th> <th style="color:green">TC</th>
<th>Summary</th> <th style="color:green">Summary</th>
<th>Logs</th> <th style="color:green">Logs</th>
</tr> </tr>
</thead>
{% for event in events %} {% for event in events %}
<tr> <tr>
<td class="timestamp">{{event.created|date:'U'}}</td> <td class="timestamp">
<td>{{event.author|capfirst}}</td> {{ event.created|date:'U' }}
<td><a href="/test/{{event.test_id}}">{{event.test_id|testIdToPrettyName}}</a></td> </td>
<td>{% if event.machine_id %} {{event.machine_id}} {% endif %}</td> <td>
<td>{{event.test_id|testIdToTimeControl}}</td> {{ event.author|capfirst }}
<td>{{event.summary}}</td> </td>
<td>{% if event.log_file %}<a href='/event/{{event.id}}'>View</a>{% endif %}</td> <td>
<a class="text-decoration-none" href="/test/{{ event.test_id }}">
{{ event.test_id|testIdToPrettyName }}
</a>
</td>
<td>
{% if event.machine_id %}
{{ event.machine_id }}
{% endif %}
</td>
<td>
{{ event.test_id|testIdToTimeControl }}
</td>
<td>
{{ event.summary }}
</td>
<td>
{% if event.log_file %}
<a href='/event/{{ event.id }}'>
<i class="fa fa-download"></i>
</a>
{% endif %}
</td>
</tr> </tr>
{% endfor %} {% endfor %}
<table> </table>
{% include "OpenBench/Blocks/pagebrowser.html" %} {% include "OpenBench/Blocks/pagebrowser.html" %}
+54 -14
View File
@@ -2,37 +2,77 @@
{% block content %} {% block content %}
<table class="datatable">
<!-- Only show Pending tests for the front page of the Index -->
{% if paging.page == 1 %} {% if paging.page == 1 %}
<!-- Currently Pending tests (Waiting to be approved) -->
{% if pending %} {% if pending %}
<tr><th colspan='6'>Pending</th></tr> <div class="align-self-center w-100 text-center mt-4 bg-black font-weight-bold mb-0 py-2 rounded-top" style="color:green;">
<h5>
Pending
</h5>
</div>
<table class="table table-sm table-hover table-striped datatable">
<thead class="bg-black">
<tr>
<th class="px-3" style="width:10%; color:green;" scope="col">Author</th>
<th class="px-3" style="width:10%; color:green;" scope="col">Engine</th>
<th class="px-3" style=" color:green;" scope="col">Name</th>
<th class="px-3 text-center" style="width: 5%; color:green;" scope="col"><i class="fa-brands fa-github"></i></th>
<th class="px-3 text-center" style="width:12%; color:green;" scope="col">TC <i class="fa-solid fa-clock"></i></th>
<th class="px-3" style=" color:green;" scope="col">Result</th>
</tr>
</thead>
{% for test in pending %} {% for test in pending %}
{% include "OpenBench/Blocks/testsummary.html" %} {% include "OpenBench/Blocks/testsummary.html" %}
{% endfor %} {% endfor %}
<tr class="table-spacer"><th></th></tr> <tr class="table-spacer">
<th></th>
</tr>
</table>
{% endif %} {% endif %}
<!-- Currently Running tests (Waiting to be completed) -->
{% if active %} {% if active %}
<tr><th colspan='6'>Active {{status}}</th></tr> <div class="align-self-center w-100 text-center mt-4 bg-black font-weight-bold mb-0 py-2 rounded-top" style="color:green;">
<h5>
Active {{ status }}
</h5>
</div>
<table class="table table-sm table-hover table-striped datatable" style="table-layout: fixed">
<thead class="bg-black">
<tr>
<th class="px-3" style="width:10%; color:green;" scope="col">Author</th>
<th class="px-3" style="width:10%; color:green;" scope="col">Engine</th>
<th class="px-3" style=" color:green;" scope="col">Name</th>
<th class="px-3 text-center" style="width: 5%; color:green;" scope="col"><i class="fa-brands fa-github"></i></th>
<th class="px-3 text-center" style="width:12%; color:green;" scope="col">TC <i class="fa-solid fa-clock"></i></th>
<th class="px-3" style=" color:green;" scope="col">Result</th>
</tr>
</thead>
{% for test in active %} {% for test in active %}
{% include "OpenBench/Blocks/testsummary.html" %} {% include "OpenBench/Blocks/testsummary.html" %}
{% endfor %} {% endfor %}
<tr class="table-spacer"><th></th></tr> </table>
{% endif %}
{% endif %} {% endif %}
{% endif %}
<!-- Tests which have already finished --> <div class="align-self-center w-100 text-center mt-4 bg-black font-weight-bold mb-0 py-2 rounded-top" style="color:green;">
<tr><th colspan='6'>Finished</th></tr> <h5>
Finished
</h5>
</div>
<table class="mw-100 table table-sm table-hover table-striped datatable" style="table-layout: fixed">
<thead class="bg-black">
<tr>
<th class="px-3" style="width:10%; color:green;" scope="col">Author</th>
<th class="px-3" style="width:10%; color:green;" scope="col">Engine</th>
<th class="px-3" style=" color:green;" scope="col">Name</th>
<th class="px-3 text-center" style="width: 5%; color:green;" scope="col"><i class="fa-brands fa-github"></i></th>
<th class="px-3 text-center" style="width:12%; color:green;" scope="col">TC <i class="fa-solid fa-clock"></i></th>
<th class="px-3" style=" color:green;" scope="col">Result</th>
</tr>
</thead>
{% for test in completed %} {% for test in completed %}
{% include "OpenBench/Blocks/testsummary.html" %} {% include "OpenBench/Blocks/testsummary.html" %}
{% endfor %} {% endfor %}
</table> </table>
{% include "OpenBench/Blocks/pagebrowser.html" %} {% include "OpenBench/Blocks/pagebrowser.html" %}
+15 -3
View File
@@ -4,9 +4,21 @@
<form method="POST" action="/login/"> <form method="POST" action="/login/">
{% csrf_token %} {% csrf_token %}
<label type="text">Username</label> <input type="text" name="username"><br> <div class="form-group">
<label type="text">Password</label> <input type="password" name="password"><br> <div class="row">
<input type="submit" name="submit" value="Login"> <div class="col-12 col-xl-6">
<label for="login-username-input">Username</label>
<input class="form-control" id="login-username-input" type="text" name="username" placeholder="Your Username"><br>
</div>
<div class="col-12 col-xl-6">
<label for="login-password-input">Password</label>
<input class="form-control" id="login-username-input" type="password" name="password" placeholder="Your Password"><br>
</div>
</div>
<input class="btn btn-primary" type="submit" name="submit" value="Login">
</div>
{# <label type="text">Username</label> <input type="text" name="username"><br>#}
{# <label type="text">Password</label> <input type="password" name="password"><br>#}
</form> </form>
{% endblock %} {% endblock %}
+17 -17
View File
@@ -4,27 +4,27 @@
{% block content %} {% block content %}
<table> <table class="table table-striped table-sm table-hover">
<thead class="bg-black">
<tr> <tr>
<th>#</th> <th style="color:green;">#</th>
<th>User</th> <th style="color:green;">User</th>
<th>System</th> <th style="color:green;">System</th>
<th>Updated</th> <th style="color:green;">Updated</th>
<th>Workload</th> <th style="color:green;">Workload</th>
<th>Threads</th> <th style="color:green;">Threads</th>
<th>MNPS</th> <th style="color:green;">MNPS</th>
</tr> </tr>
</thead>
{% for machine in machines %} {% for machine in machines %}
<tr> <tr>
<td class="numeric">{{machine.id}}</td> <td class="numeric">{{ machine.id }}</td>
<td>{{machine.user.username|capfirst}}</td> <td>{{ machine.user.username|capfirst }}</td>
<td>{{machine.osname|truncatewords:1|slice:":-2"}}</td> <td>{{ machine.osname|truncatewords:1|slice:":-2" }}</td>
<td class="timestamp">{{machine.updated|date:'U'}}</td> <td class="timestamp">{{ machine.updated|date:'U' }}</td>
<td> <a href="/test/{{machine.workload.id}}">{{machine.workload.dev.name|prettyName}}</a></td> <td><a href="/test/{{ machine.workload.id }}">{{ machine.workload.dev.name|prettyName }}</a></td>
<td class="numeric">{{machine.threads}}</td> <td class="numeric">{{ machine.threads }}</td>
<td class="numeric">{{machine.mnps|twoDigitPrecision}}</td> <td class="numeric">{{ machine.mnps|twoDigitPrecision }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
+9 -7
View File
@@ -55,16 +55,18 @@
{% block content %} {% block content %}
<table id="network-table"> <table class="table table-striped table-hover table-sm" id="network-table">
<thead class="bg-black">
<tr> <tr>
<th onclick=sort_networks("default")></th> <th style="color:green" onclick=sort_networks("default")></th>
<th onclick=sort_networks("engine")>Engine</th> <th style="color:green" onclick=sort_networks("engine")>Engine</th>
<th onclick=sort_networks("author")>Uploader</th> <th style="color:green" onclick=sort_networks("author")>Uploader</th>
<th onclick=sort_networks("name")>Name</th> <th style="color:green" onclick=sort_networks("name")>Name</th>
<th onclick=sort_networks("hash")>Hash</th> <th style="color:green" onclick=sort_networks("hash")>Hash</th>
<th></th> <th></th>
</tr> </tr>
</thead>
{% for network in networks %} {% for network in networks %}
<tr> <tr>
@@ -82,7 +84,7 @@
<td>{{network.sha256}}</td> <td>{{network.sha256}}</td>
<td><a class="redlink" onclick="return confirm('YOU ARE DELETING THIS NETWORK FILE FOREVER')" href="/networks/delete/{{network.sha256}}"> <td><a class="redlink" onclick="return confirm('YOU ARE DELETING THIS NETWORK FILE FOREVER')" href="/networks/delete/{{network.sha256}}">
<i class="fas fa-minus-circle"></i></a></td> <i class="fas fa-trash"></i></a></td>
</tr> </tr>
{% endfor %} {% endfor %}
+206 -69
View File
@@ -4,21 +4,21 @@
var Configurations = { var Configurations = {
{% for name, data in config.engines.items %} {% for name, data in config.engines.items %}
'{{name}}' : { '{{ name }}' : {
'base' : "{{data.base}}", 'base' : "{{ data.base }}",
'book' : "{{data.book}}", 'book' : "{{ data.book }}",
'bounds' : "{{data.bounds}}", 'bounds' : "{{ data.bounds }}",
}, },
{% endfor %} {% endfor %}
}; };
var TestModes = { var TestModes = {
{% for name, data in config.engines.items %} {% for name, data in config.engines.items %}
'{{name}}' : [ '{{ name }}' : [
{% for mode in data.testmodes %} {% for mode in data.testmodes %}
{ {
{% for key, value in mode.items %} {% for key, value in mode.items %}
'{{key}}' : '{{value}}', '{{ key }}' : '{{ value }}',
{% endfor %} {% endfor %}
}, },
{% endfor %} {% endfor %}
@@ -29,10 +29,10 @@
var Networks = [ var Networks = [
{% for network in networks %} {% for network in networks %}
{ {
"name" : "{{network.name}}", "name" : "{{ network.name }}",
"sha256" : "{{network.sha256}}", "sha256" : "{{ network.sha256 }}",
"engine" : "{{network.engine}}", "engine" : "{{ network.engine }}",
"default" : "{{network.default}}", "default" : "{{ network.default }}",
}, },
{% endfor %} {% endfor %}
]; ];
@@ -51,14 +51,14 @@
if (mode == "SPRT") { if (mode == "SPRT") {
document.getElementById("test_bounds").value = Configurations[engine]["bounds"] document.getElementById("test_bounds").value = Configurations[engine]["bounds"]
document.getElementById("test_confidence").value = "{{config.tests.confidence}}"; document.getElementById("test_confidence").value = "{{ config.tests.confidence }}";
document.getElementById("test_max_games").value = "N/A"; document.getElementById("test_max_games").value = "N/A";
} }
if (mode == "GAMES") { if (mode == "GAMES") {
document.getElementById("test_bounds").value = "N/A"; document.getElementById("test_bounds").value = "N/A";
document.getElementById("test_confidence").value = "N/A"; document.getElementById("test_confidence").value = "N/A";
document.getElementById("test_max_games").value = "{{config.tests.max_games}}"; document.getElementById("test_max_games").value = "{{ config.tests.max_games }}";
} }
} }
@@ -122,8 +122,13 @@
for (let i in TestModes[engine]) { for (let i in TestModes[engine]) {
const btn = document.createElement('button') const btn = document.createElement('button')
btn.innerHTML = TestModes[engine][i]["id"]; btn.innerHTML = TestModes[engine][i]["id"];
btn.onclick = function() { set_test_mode(i); }; btn.onclick = function(e) {
btn.class = (i % 2) ? "left-floated" : "right-floated"; set_test_mode(i);
console.log(i);
e.preventDefault();}
;
btn.classList.add('btn');
btn.classList.add('btn-secondary', 'mr-1');
button_div.append(btn); button_div.append(btn);
} }
@@ -173,7 +178,7 @@
document.addEventListener( document.addEventListener(
'DOMContentLoaded', function () { 'DOMContentLoaded', function () {
set_test_type(); set_test_type();
set_engine("{{profile.engine}}"); set_engine("{{ profile.engine }}");
set_test_mode(0); set_test_mode(0);
}, false }, false
); );
@@ -184,73 +189,205 @@
<form method="POST" action="/newTest/"> <form method="POST" action="/newTest/">
{% csrf_token %} {% csrf_token %}
<div class="settings-column">
<h3> Engine </h3> <div class="row">
<label> Engine </label> <select id="enginename" name="enginename" onchange="set_engine(value);"> <div class="col-12 col-xl-6">
<div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
{# <h3>Engine</h3>#}
<div class="form">
<div class="row">
<div class="col-3 pb-2 d-flex align-items-center">
<span for="enginename">Engine</span>
</div>
<div class="col-9 mb-2">
<select class="form-control form-select" id="enginename" name="enginename"
onchange="set_engine(value);">
{% for engine in config.engines %} {% for engine in config.engines %}
<option value="{{engine}}">{{engine}}</option> <option value="{{ engine }}">{{ engine }}</option>
{% endfor %} {% endfor %}
</select><br> </select>
<label> Source </label> <input value="{{profile.repo}}" name="source"><br> </div>
<div class="col-3 d-flex align-items-center">
<h3> Dev Settings </h3> <label for="enginesource">Source</label>
<label> Dev Bench </label> <input name="devbench"><br> </div>
<label> Dev Branch </label> <input name="devbranch" autofocus><br> <div class="col-9">
<label> Dev Options </label> <input id="devoptions" name="devoptions"><br> <input class="form-control" id="enginesource" value="{{ profile.repo }}"
<label> Dev Network </label> <select id="devnetwork" name="devnetwork"></select><br> name="source">
</div>
<h3> Base Settings </h3> </div>
<label> Base Bench </label> <input name="basebench"><br> </div>
<label> Base Branch </label> <input id="basebranch" name="basebranch"><br> </div>
<label> Base Options </label> <input id="baseoptions" name="baseoptions"><br> <div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
<label> Base Network </label> <select id="basenetwork" name="basenetwork"></select><br> {# <h3>Dev Settings</h3>#}
<div class="form row">
<div class="col-3 pb-2 d-flex align-items-center">
<label for="devbench"> Dev Bench </label>
</div>
<div class="col-9 mb-2">
<input id="devbench" class="form-control"
name="devbench">
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="devbranch"> Dev Branch </label>
</div>
<div class="col-9 mb-2">
<input id="devbranch" class="form-control"
name="devbranch" autofocus>
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="devoptions"> Dev Options </label>
</div>
<div class="col-9 mb-2">
<input id="devoptions"
class="form-control"
name="devoptions">
</div>
<div class="col-3 d-flex align-items-center">
<label for="devnetwork"> Dev Network </label></div>
<div class="col-9">
<select id="devnetwork"
class="form-control form-select"
name="devnetwork"></select>
</div>
</div>
</div>
<div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
{# <h3>Base Settings</h3>#}
<div class="form row">
<div class="col-3 pb-2 d-flex align-items-center">
<label for="basebench"> Base Bench </label>
</div>
<div class="col-9 mb-2">
<input id="basebench" class="form-control" name="basebench">
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="basebranch"> Base Branch </label>
</div>
<div class="col-9 mb-2">
<input id="basebranch" class="form-control" name="basebranch">
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="baseoptions"> Base Options </label>
</div>
<div class="col-9 mb-2">
<input id="baseoptions"
class="form-control" name="baseoptions">
</div>
<div class="col-3 d-flex align-items-center">
<label for="basenetwork"> Base Network </label>
</div>
<div class="col-9">
<select id="basenetwork" class="form-control form-select" name="basenetwork"></select>
</div>
</div>
</div>
</div>
<div class="col-12 col-xl-6">
<div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
<div class="form row">
<div class="col-3 pb-2 d-flex align-items-center">
<label for="test_mode"> Test Mode </label>
</div>
<div class="col-9 mb-2">
<select id="test_mode" class="form-control form-select" onchange='set_test_type()'
name="test_mode">
<option selected value="SPRT"> SPRT</option>
<option value="GAMES"> Fixed Games</option>
</select>
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="test_bounds"> Bounds </label>
</div>
<div class="col-9 mb-2">
<input class="form-control" id="test_bounds"
name="bounds">
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="test_confidence"> Confidence </label>
</div>
<div class="col-9 mb-2">
<input class="form-control" id="test_confidence" name="confidence">
</div>
<div class="col-3 d-flex align-items-center">
<label for="test_max_games"> Max Games </label>
</div>
<div class="col-9">
<input class="form-control" id="test_max_games" name="max_games">
</div>
</div> </div>
<div class="settings-column">
<h3> Game Settings </h3> </div>
<label> Book </label> <select id="bookname" name="bookname"> <div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
<div class="form row">
<div class="col-3 pb-2 d-flex align-items-center">
<label for="priority"> Priority </label>
</div>
<div class="col-9 mb-2">
<input id="priority" class="form-control" value="0" name="priority">
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="throughput"> Throughput </label>
</div>
<div class="col-9 mb-2">
<input id="throughput" class="form-control" value="1000" name="throughput">
</div>
<div class="col-3 pb-2 d-flex align-items-center">
<label for="syzygy_adj"> Syzygy ADJ </label>
</div>
<div class="col-9 mb-2">
<select id="syzygy_adj" class="form-control form-select" name="syzygy_adj">
<option selected value="OPTIONAL"> Optional</option>
<option value="REQUIRED"> Required</option>
<option value="DISABLED"> Disabled</option>
</select>
</div>
<div class="col-3 d-flex align-items-center">
<label for="syzygy_wdl"> Syzygy WDL </label>
</div>
<div class="col-9">
<select id="syzygy_wdl" class="form-control form-select" name="syzygy_wdl">
<option value="OPTIONAL"> Optional</option>
<option value="REQUIRED"> Required</option>
<option selected value="DISABLED"> Disabled</option>
</select>
</div>
</div>
</div>
<div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
{# <h3>Game Settings</h3>#}
<div class="form row">
<div class="col-3 pb-2 d-flex align-items-center">
<label for="bookname">Book</label>
</div>
<div class="col-9 mb-2">
<select class="form-control form-select" id="bookname" name="bookname">
{% 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>
<label> Time </label> <input id="timecontrol" name="timecontrol"><br> </div>
<div class="col-3 d-flex align-items-center">
<h3> Test Settings </h3> <label for="timecontrol">Time</label>
<label> Test Mode </label> <select onchange='set_test_type()' id="test_mode" name="test_mode"> </div>
<option selected value="SPRT"> SPRT </option> <div class="col-9">
<option value="GAMES"> Fixed Games </option> <input class="form-control" id="timecontrol" name="timecontrol">
</select><br> </div>
<label> Bounds </label> <input id="test_bounds" name="bounds"><br> </div>
<label> Confidence </label> <input id="test_confidence" name="confidence"><br> </div>
<label> Max Games </label> <input id="test_max_games" name="max_games"><br> </div>
<h3> General Settings </h3>
<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>
</div> </div>
<br><input type="submit" name="submit" value="Create Engine Test"> <div class="mb-3" id="test-mode-buttons">
<!-- Generated based on the selected Engine -->
</div>
<input class="btn btn-primary" type="submit" name="submit" value="Create Engine Test">
</form> </form>
<div id="test-mode-buttons">
<!-- Generated based on the selected Engine -->
</div>
{% endblock %} {% endblock %}
+40 -15
View File
@@ -4,30 +4,55 @@
<form method="POST" action="/profile/"> <form method="POST" action="/profile/">
{% csrf_token %} {% csrf_token %}
<div class="form-group">
<!-- Profile information. Everything may be changed but the Username --> <div class="row">
<label>Username</label><input readonly value="{{profile.user.username}}"><br> <div class="col-12 col-xl-6">
<label>Email</label><input value="{{profile.user.email}}" name="email"><br> <label for="profile-username-input">Username</label>
<label>Source Repo</label><input value="{{profile.repo}}" name="repo"><br> <input class="form-control" id="profile-username-input" disabled readonly
<label>New Password</label><input type="password" name="password1"><br> value="{{ profile.user.username }}"><br>
<label>New Password</label><input type="password" name="password2"><br> </div>
<div class="col-12 col-xl-6">
<!-- User's have a default engine. Select the default, otherwise show an empty line --> <label for="profile-email-input">Email</label>
<label>Engine</label> <select id="engine" name="engine"> <input class="form-control" id="profile-email-input" name="email" placeholder="name@example.com"
value="{{ profile.user.email }}"><br>
</div>
<div class="col-12 col-xl-6">
<label for="profile-password-1-input">New Password</label>
<input class="form-control" id="profile-password-1-input" type="password" autocomplete="off" name="password1" placeholder="New password"><br>
</div>
<div class="col-12 col-xl-6">
<label for="profile-password-2-input">New Password</label>
<input class="form-control" id="profile-password-2-input" type="password" autocomplete="off" name="password2" placeholder="Repeat your password"><br>
</div>
<div class="col-12 col-xl-6">
<label for="profile-repo-input">Source Repository</label>
<input class="form-control" id="profile-repo-input" name="repo" value="{{ profile.repo }}"><br>
{# <div class="input-group">#}
{# <span class="input-group-text">https://github.com/</span>#}
{# </div>#}
</div>
<div class="col-12 col-xl-6">
<label for="engine">Engine</label>
<select id="engine" name="engine" class="form-control form-select mb-4"
aria-label="Default select example">
{% for engine in config.engines %} {% for engine in config.engines %}
{% if profile.engine == engine %} {% if profile.engine == engine %}
<option selected value="{{engine}}">{{engine}}</option> <option selected value="{{ engine }}">{{ engine }}</option>
{% else %} {% else %}
<option value="{{engine}}">{{engine}}</option> <option value="{{ engine }}">{{ engine }}</option>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if not profile.engine %} {% if not profile.engine %}
<option selected value=""></option> <option selected value=""></option>
{% endif %} {% endif %}
</select><br> </select>
</div>
<input type="submit" value="Update Profile"> <div class="col-12 mt-2">
<input class="btn btn-primary" type="submit" value="Update Profile">
</div>
</div>
</div>
</form> </form>
{% endblock %} {% endblock %}
+18 -5
View File
@@ -4,11 +4,24 @@
<form id="registerForm" method="POST" action="/register/"> <form id="registerForm" method="POST" action="/register/">
{% csrf_token %} {% csrf_token %}
<label>Username</label> <input name="username"><br> <form>
<label>Password</label> <input type="password" name="password1"><br> <div class="row">
<label>Password</label> <input type="password" name="password2"><br> <div class="col-6">
<label>Email </label> <input name="email"><br> <label for="username">Username</label> <input class="form-control" id="username" name="username"><br>
<input type="submit" name="submit" value="Create User"> </div>
<div class="col-6">
<label for="email">Email </label> <input class="form-control" id="email" name="email"><br>
</div>
<div class="col-6">
<label for="password1">Password</label> <input class="form-control" type="password" id="password1" name="password1" autocomplete="off"><br>
</div>
<div class="col-6">
<label for="password2">Password</label> <input class="form-control" type="password" id="password2" name="password2" autocomplete="off"><br>
</div>
</div>
</form>
<input class="btn btn-primary" type="submit" name="submit" value="Create User">
</form> </form>
{% endblock %} {% endblock %}
+83 -36
View File
@@ -4,7 +4,7 @@
function set_default_engine() { function set_default_engine() {
{% if profile.engine %} {% if profile.engine %}
document.getElementById("engine").value = "{{profile.engine}}"; document.getElementById("engine").value = "{{ profile.engine }}";
{% endif %} {% endif %}
} }
@@ -22,55 +22,102 @@
<form method="POST" action="/search/"> <form method="POST" action="/search/">
{% csrf_token %} {% csrf_token %}
{# <h2>Search for a test</h2>#}
<label> Keywords </label> <input name="keywords"><br> <div class="form-group">
<label> Author </label> <input name="author"><br> <div class="row">
<div class="col-12">
<label> Engine </label> <div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
<select id="engine" name="engine"> <div class="row">
<div class="col-12 col-xl-6 mb-2">
<label for="search-keywords-input">Keywords</label>
<input id="search-keywords-input" class="form-control" name="keywords">
</div>
<div class="col-12 col-xl-6 mb-2">
<label for="search-author-input">Author</label>
<input id="search-author-input" class="form-control" name="author">
</div>
<div class="col-12">
<label for="engine">Engine</label>
<select id="engine" class="form-control form-select" name="engine">
<option selected value="">ALL</option> <option selected value="">ALL</option>
{% 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>
</div>
</div>
<label> Show Greens </label> <div class="col-12">
<select name="showgreens"> <div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
<div class="row">
<div class="col-12 col-md-4 mb-2">
<label for="search-show-greens-select"> Show Greens </label>
<select id="search-show-greens-select" class="form-control form-select"
name="showgreens">
<option selected value="True">True</option> <option selected value="True">True</option>
<option value="False">False</option> <option value="False">False</option>
</select><br> </select>
</div>
<label> Show Yellows </label> <div class="col-12 col-md-4 mb-2">
<select name="showyellows"> <label for="search-show-yellows-select"> Show Yellows </label>
<select id="search-show-yellows-select" class="form-control form-select"
name="showyellows">
<option selected value="True">True</option> <option selected value="True">True</option>
<option value="False">False</option> <option value="False">False</option>
</select><br> </select>
</div>
<label> Show Reds </label> <div class="col-12 col-md-4 mb-2">
<select name="showreds"> <label for="search-show-reds-select"> Show Reds </label>
<select id="search-show-reds-select" class="form-control form-select"
name="showreds">
<option selected value="True">True</option> <option selected value="True">True</option>
<option value="False">False</option> <option value="False">False</option>
</select><br> </select>
</div>
<label> Show Stopped </label> <div class="col-12 col-md-6 mb-2">
<select name="showunfinished"> <label for="search-show-stopped-select"> Show Stopped </label>
<option value="True">True</option> <select id="search-show-stopped-select" class="form-control form-select"
<option selected value="False">False</option> name="showunfinished">
</select><br> <option selected value="True">True</option>
<option value="False">False</option>
<label> Show Deleted </label> </select>
<select name="showdeleted"> </div>
<option value="True">True</option> <div class="col-12 col-md-6 mb-2">
<option selected value="False">False</option> <label for="search-show-deleted-select"> Show Deleted </label>
</select><br> <select id="search-show-deleted-select" class="form-control form-select"
name="showdeleted">
<input type="submit" name="submit" value="Search Tests"> <option selected value="True">True</option>
<option value="False">False</option>
</select>
</div>
</div>
</div>
</div>
<div class="col-12">
<input class="btn btn-primary" type="submit" name="submit" value="Search Tests">
</div>
</div>
</div>
</form> </form>
{% endif %} {% endif %}
<table class="datatable"> <table class="table table-hover table-sm table-striped datatable" style="table-layout: fixed">
<thead class="bg-black rounded-top">
{% if tests != empty %}
<tr>
<th class="px-3" style="width:10%; color:green;" scope="col">Author</th>
<th class="px-3" style="width:10%; color:green;" scope="col">Engine</th>
<th class="px-3" style=" color:green;" scope="col">Name</th>
<th class="px-3 text-center" style="width: 5%; color:green;" scope="col"><i class="fa-brands fa-github"></i></th>
<th class="px-3 text-center" style="width:12%; color:green;" scope="col">TC <i class="fa-solid fa-clock"></i></th>
<th class="px-3" style=" color:green;" scope="col">Result</th>
</tr>
{% endif %}
</thead>
{% for test in tests %} {% for test in tests %}
{% include "OpenBench/Blocks/testsummary.html" %} {% include "OpenBench/Blocks/testsummary.html" %}
{% endfor %} {% endfor %}
+169 -91
View File
@@ -3,104 +3,180 @@
{% load mytags %} {% load mytags %}
{% block style %} {% block style %}
{% load static %} {% load static %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="configuration"> <div id="configuration">
<table class="datatable left-align"> <!-- Dev vs Base [Git Diff Link] -->
<tr><th>Author</th><td>{{test.author|capfirst}}</td></tr> <h4 class="mb-4"><a href="{{ test|gitDiffLink }}">
<tr><th>Creation</th><td class="timestamp">{{test.creation|date:'U'}}</td></tr> {{ test.dev.name|prettyName }} vs {{ test.base.name|prettyName }}
<tr><th>Engine</th><td>{{test.engine}}</td></tr> </a></h4>
<tr><th>Dev Branch</th><td>{{test.dev.name|prettyName}}</td></tr> <div class="row">
<tr><th>Dev Bench</th><td>{{test.dev.bench}}</td></tr>
<tr><th>Dev Options</th><td>{{test.devoptions}}</td></tr> <div class="col-12 col-xl-6">
<tr><th>Dev Sha</th><td>{{test.dev.sha}}</td></tr> <table class="datatable table table-sm left-align">
<tr>
<th>Author</th>
<td>{{ test.author|capfirst }}</td>
</tr>
<tr>
<th>Creation</th>
<td class="timestamp">{{ test.creation|date:'U' }}</td>
</tr>
<tr>
<th>Engine</th>
<td>{{ test.engine }}</td>
</tr>
<tr>
<th>Dev Branch</th>
<td>{{ test.dev.name|prettyName }}</td>
</tr>
<tr>
<th>Dev Bench</th>
<td>{{ test.dev.bench }}</td>
</tr>
<tr>
<th>Dev Options</th>
<td>{{ test.devoptions }}</td>
</tr>
<tr>
<th>Dev Sha</th>
<td>{{ test.dev.sha }}</td>
</tr>
{% if test.devnetwork %} {% if test.devnetwork %}
<tr> <tr>
<th>Dev Network</th> <th>Dev Network</th>
<td><a href="{{test.devnetwork|resolveNetworkURL}}">{{test.devnetname}}</td> <td><a href="{{ test.devnetwork|resolveNetworkURL }}">{{ test.devnetname }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
<tr><th>Base Branch</th><td>{{test.base.name|prettyName}}</td></tr> <tr>
<tr><th>Base Bench</th><td>{{test.base.bench}}</td></tr> <th>Base Branch</th>
<tr><th>Base Options</th><td>{{test.baseoptions}}</td></tr> <td>{{ test.base.name|prettyName }}</td>
<tr><th>Base Sha</th><td>{{test.base.sha}}</td></tr> </tr>
<tr>
<th>Base Bench</th>
<td>{{ test.base.bench }}</td>
</tr>
<tr>
<th>Base Options</th>
<td>{{ test.baseoptions }}</td>
</tr>
<tr>
<th>Base Sha</th>
<td>{{ test.base.sha }}</td>
</tr>
{% if test.basenetwork %} {% if test.basenetwork %}
<tr> <tr>
<th>Base Network</th> <th>Base Network</th>
<td><a href="{{test.basenetwork|resolveNetworkURL}}">{{test.basenetname}}</td> <td><a href="{{ test.basenetwork|resolveNetworkURL }}">{{ test.basenetname }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
<tr><th>Source Repo</th><td><a href="{{test.source}}">{{test.source}}</a></td></tr> <tr>
<tr><th>Opening Book</th><td><a href="{{config.framework}}/raw/master/Books/">{{test.bookname}}</a></td></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>
<tr><th>Syzygy WDL</th><td>{{test.syzygy_wdl}}</td></tr> <th>Syzygy ADJ</th>
<td>{{ test.syzygy_adj }}</td>
</tr>
<tr>
<th>Syzygy WDL</th>
<td>{{ test.syzygy_wdl }}</td>
</tr>
</table> </table>
</div> </div>
<div class="col-12 col-xl-6">
<div class="row">
<div class="col-3">
<!-- Approve Button: For Admins, or Cross-approvers -->
{% if not test.approved and profile.approver and profile.user.username != test.author %}
<a class="btn btn-success w-100" id="approvebutton" href="/test/{{ test.id }}/APPROVE" role="button">Approve</a>
{% elif not test.approved and request.user.is_superuser %}
<a class="btn btn-success w-100" id="approvebutton" href="/test/{{ test.id }}/APPROVE" role="button">Approve</a>
{% else %}
<a class="btn btn-secondary w-100 disabled"role="button">Approve</a>
{% endif %}
</div>
<div class="col-3">
<!-- Restart Button: For Approvers or Test Authors of finished tests -->
{% if test.finished and profile.approver %}
<a class="btn btn-primary w-100" id="stopbutton" href="/test/{{ test.id }}/RESTART" role="button">Restart</a>
{% elif test.finished and profile.user.username == test.author %}
<a class="btn btn-primary w-100" id="stopbutton" href="/test/{{ test.id }}/RESTART" role="button">Restart</a>
{% elif test.finished %}
<a class="btn btn-secondary w-100" role="button">Restart</a>
{% else %}
<a class="btn btn-secondary w-100 disabled " role="button">Restart</a>
{% endif %}
</div>
<div class="col-3">
<!-- Stop Button: For Approvers or Test Authors of active tests -->
{% if not test.finished and profile.approver %}
<a class="btn btn-danger w-100" id="restartbutton" href="/test/{{ test.id }}/STOP" role="button">Stop</a>
{% elif not test.finished %}
<a class="btn btn-primary w-100 disabled" role="button">Stop</a>
{% else %}
<a class="btn btn-secondary w-100 disabled" role="button">Stop</a>
{% endif %}
</div>
<div class="col-3">
<!-- Delete Button: For Approvers or Test Authors -->
{% if profile.approver or profile.user.username == test.author %}
<a class="btn btn-danger w-100" id="deletebutton" href="/test/{{ test.id }}/DELETE" role="button">Delete</a>
{% else %}
<a class="btn btn-secondary w-100 disabled" role="button">Delete</a>
{% endif %}
</div>
</div>
<!-- Elo, (SPRT/LRR if SPRT, otherwise CONF), Games -->
<pre class="mt-3">{{ test|longStatBlock|linebreaksbr }}</pre>
<!-- Forum to modify the Priority or Throughput -->
<form method="POST" action="/test/{{ test.id }}/MODIFY">
{% csrf_token %}
<div class="form row">
<div class="col-3">
<label>Priority</label>
</div>
<div class="col-9 mb-2">
<input class="form-control" value="{{ test.priority }}" name="priority" id="priority">
</div>
<div class="col-3">
<label>Throughput</label>
</div>
<div class="col-9 mb-2">
<input class="form-control" value="{{ test.throughput }}" name="throughput" id="throughput">
</div>
</div>
<!-- Edit Button: For Approvers or Test Authors -->
{% if profile.approver or profile.user.username == test.author %}
<input class="btn btn-primary" type="submit" name="submit" value="Modify">
{% else %}
<input class="btn btn-primary" disabled type="submit" name="submit" value="Modify">
{% endif %}
</form>
</div>
</div>
</div>
<div id="actions"> <div id="actions">
<!-- Dev vs Base [Git Diff Link] -->
<h4><a href="{{test|gitDiffLink}}">
{{test.dev.name|prettyName}} vs {{test.base.name|prettyName}}
</a></h4>
<!-- Approve Button: For Admins, or Cross-approvers -->
{% if not test.approved and profile.approver and profile.user.username != test.author %}
<a class="anchorbutton" id="approvebutton" href="/test/{{test.id}}/APPROVE">Approve</a>
{% elif not test.approved and request.user.is_superuser %}
<a class="anchorbutton" id="approvebutton" href="/test/{{test.id}}/APPROVE">Approve</a>
{% else %}
<a class="anchorbutton deadbutton">Approve</a>
{% endif %}
<!-- Restart Button: For Approvers or Test Authors of finished tests -->
{% if test.finished and profile.approver %}
<a class="anchorbutton" id="stopbutton" href="/test/{{test.id}}/RESTART">Restart</a>
{% elif test.finished and profile.user.username == test.author %}
<a class="anchorbutton" id="stopbutton" href="/test/{{test.id}}/RESTART">Restart</a>
{% elif test.finished %}
<a class="anchorbutton deadbutton">Restart</a>
{% endif %}
<!-- Stop Button: For Approvers or Test Authors of active tests -->
{% if not test.finished and profile.approver %}
<a class="anchorbutton" id="restartbutton" href="/test/{{test.id}}/STOP">Stop</a>
{% elif not test.finished and profile.user.username == test.author %}
<a class="anchorbutton" id="restartbutton" href="/test/{{test.id}}/STOP">Stop</a>
{% elif not test.finished %}
<a class="anchorbutton deadbutton">Stop</a>
{% endif %}
<!-- Delete Button: For Approvers or Test Authors -->
{% if profile.approver or profile.user.username == test.author %}
<a class="anchorbutton" id="deletebutton" href="/test/{{test.id}}/DELETE">Delete</a>
{% else %}
<a class="anchorbutton deadbutton">Delete</a>
{% endif %}
<!-- Elo, (SPRT/LRR if SPRT, otherwise CONF), Games -->
<pre>{{test|longStatBlock|linebreaksbr}}</pre>
<!-- Forum to modify the Priority or Throughput -->
<form method="POST" action="/test/{{test.id}}/MODIFY">
{% csrf_token %}
<label>Priority</label><input value="{{test.priority}}" name="priority"><br>
<label>Throughput</label><input value="{{test.throughput}}" name="throughput"><br>
<!-- Edit Button: For Approvers or Test Authors -->
{% if profile.approver or profile.user.username == test.author %}
<input type="submit" name="submit" value="Modify">
{% else %}
<input class="deadbutton" type="submit" name="submit" value="Modify">
{% endif %}
</form>
</div> </div>
@@ -108,10 +184,11 @@
<div id="results"> <div id="results">
<table class="datatable"> <table class="table table-sm table-striped table-hover datatable">
<thead>
<tr> <tr>
<th>#</th> <th>Machine ID #</th>
<th>User</th> <th>User</th>
<th>OS</th> <th>OS</th>
<th>Updated</th> <th>Updated</th>
@@ -122,22 +199,23 @@
<th style="width: 60px">Time</th> <th style="width: 60px">Time</th>
<th style="width: 60px">Crash</th> <th style="width: 60px">Crash</th>
</tr> </tr>
</thead>
<tbody>
{% for result in results %} {% for result in results %}
<tr> <tr>
<td>{{result.machine.id}}</td> <td>{{ result.machine.id }}</td>
<td>{{result.machine.user.username|capfirst|slice:"6"}}</td> <td>{{ result.machine.user.username|capfirst|slice:"6" }}</td>
<td>{{result.machine.osname|truncatewords:1|slice:":-2"}}</td> <td>{{ result.machine.osname|truncatewords:1|slice:":-2" }}</td>
<td class="timestamp">{{result.updated|date:'U'}}</td> <td class="timestamp">{{ result.updated|date:'U' }}</td>
<td class="numeric">{{result.games}}</td> <td class="numeric">{{ result.games }}</td>
<td class="numeric">{{result.wins}}</td> <td class="numeric">{{ result.wins }}</td>
<td class="numeric">{{result.losses}}</td> <td class="numeric">{{ result.losses }}</td>
<td class="numeric">{{result.draws}}</td> <td class="numeric">{{ result.draws }}</td>
<td class="numeric">{{result.timeloss}}</td> <td class="numeric">{{ result.timeloss }}</td>
<td class="numeric">{{result.crashes}}</td> <td class="numeric">{{ result.crashes }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>
</div> </div>
+28 -7
View File
@@ -5,20 +5,41 @@
<form method="post" enctype="multipart/form-data"> <form method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<label>Name</label><input name="name"><br> <div class="form">
<label>Weights</label><input name="netfile" type="file"><br>
<label>Engine</label> <select id="engine" name="engine"> <div class="row mb-2">
<div class="col-12">
<div class="container-fluid py-3 px-2 mb-4 border rounded bg-dark">
<div class="row">
<div class="col-6">
<label for="name" class="form-label">Name</label>
<input class="form-control" id="name" name="name"><br>
</div>
<div class="col-6">
<label for="engine" class="form-label">Name</label>
<select class="form-control" id="engine" name="engine">
{% for engine in config.engines %} {% for engine in config.engines %}
{% if engine == profile.engine %} {% if engine == profile.engine %}
<option selected value="{{engine}}">{{engine}}</option> <option selected value="{{ engine }}">{{ engine }}</option>
{% else %} {% else %}
<option value="{{engine}}">{{engine}}</option> <option value="{{ engine }}">{{ engine }}</option>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</select><br> </select>
</div>
<div class="col-12">
<label for="netfile" class="form-label">Netfile</label>
<input class="form-control" type="file" id="netfile" name="netfile">
</div>
</div>
</div>
</div>
<input type="submit" value="Upload"> </div>
</div>
<input class="btn btn-primary" type="submit" value="Upload">
<form> <form>
{% endblock %} {% endblock %}
+21 -17
View File
@@ -4,32 +4,36 @@
{% block content %} {% block content %}
<table> <table class="table table-hover table-sm table-hover table-striped">
<thead class="bg-black">
<tr> <tr>
<th>Username</th> <th style="color: green" class="px-2">Username</th>
<th>Games</th> <th style="color: green; text-align: center">Games</th>
<th>Tests</th> <th style="color: green; text-align: center">Tests</th>
<th>Engine</th> <th style="color: green">Engine</th>
<th>Default Repository</th> <th style="color: green">Default Repository</th>
</tr> </tr>
</thead>
<thead class="bg-black">
<tr style="font-weight: bold"> <tr style="font-weight: bold">
<th>{{profiles|length}}</th> <th style="color: green"></th>
<th>{{profiles|sumAttributes:"games"|insertCommas}}</th> <th style="color: green; text-align: right">{{ profiles|sumAttributes:"games"|insertCommas }}</th>
<th>{{profiles|sumAttributes:"tests"|insertCommas}}</th> <th style="color: green; text-align: right">{{ profiles|sumAttributes:"tests"|insertCommas }}</th>
<th></th><th></th> <th style="color: green"></th>
<th style="color: green"></th>
</tr> </tr>
</thead>
{% for profile in profiles %} {% for profile in profiles %}
{% if profile.enabled %} {% if profile.enabled %}
{% if profile.games or profile.tests %} {% if profile.games or profile.tests %}
<tr> <tr onclick="window.location='/user/{{ profile.user.username }}'">
<td><a href="/user/{{profile.user.username}}">{{profile.user.username|capfirst}}</a></td> <td><a class="text-decoration-none text-white px-2" href="/user/{{ profile.user.username }}">{{ profile.user.username|capfirst }}</a></td>
<td style="text-align: right">{{profile.games|insertCommas}}</td> <td style="text-align: right">{{ profile.games|insertCommas }}</td>
<td style="text-align: right">{{profile.tests|insertCommas}}</td> <td style="text-align: right">{{ profile.tests|insertCommas }}</td>
<td>{{profile.engine}}</td> <td>{{ profile.engine }}</td>
<td><a href="{{profile.repo}}">{{profile.repo}}</a></td> <td><a href="{{ profile.repo }}">{{ profile.repo }}</a></td>
</tr> </tr>
{% endif %} {% endif %}
{% endif %} {% endif %}