From d8045ddb73a1691b2f9702eb559997269f3012db Mon Sep 17 00:00:00 2001 From: claude Date: Sat, 10 Oct 2026 00:43:55 +0200 Subject: [PATCH] Redesign Users (STC/LTC split), Errors, and Event pages; add status dots and progress to test lists --- Templates/OpenBench/Blocks/testsummary.html | 8 +- Templates/OpenBench/errors.html | 55 +++-- Templates/OpenBench/event.html | 239 +++++++++++++++++++- Templates/OpenBench/index.html | 43 +++- Templates/OpenBench/users.html | 129 +++++++++-- 5 files changed, 426 insertions(+), 48 deletions(-) diff --git a/Templates/OpenBench/Blocks/testsummary.html b/Templates/OpenBench/Blocks/testsummary.html index e8c637d..d1331b2 100644 --- a/Templates/OpenBench/Blocks/testsummary.html +++ b/Templates/OpenBench/Blocks/testsummary.html @@ -1,10 +1,16 @@ -{% load mytags %} +{% load mytags uitags %} {{test.author|capfirst|slice:":6"}} {{test.dev_engine}} + {{test|prettyDevName}} {% if test.error %}crash{% endif %} {% if test|test_is_fischer %}frc{% endif %} + {% with progress=test|progress_info %} + {% if progress %} +
+ {% endif %} + {% endwith %} diff diff --git a/Templates/OpenBench/errors.html b/Templates/OpenBench/errors.html index 578fe6b..fe851f5 100644 --- a/Templates/OpenBench/errors.html +++ b/Templates/OpenBench/errors.html @@ -1,32 +1,47 @@ {% extends "OpenBench/base.html" %} +{% load uitags %} + {% block page_head %}

Errors

Crashes and illegal moves reported by workers

{% endblock %} {% block content %} - +
+
- - - - - - - - - - {% for event in events %} - - - - - - - + + + + + + + - {% endfor %} -
Date#UserTestSummaryLogs
{{event.created|date:'U'}}{{event.machine_id}}{{event.author|capfirst}}{{event.test_name}}{{event.summary}}{% if event.log_file %}View{% endif %}
DateMachineUserTestTypeLog
+ {% for event in events %} + + {{ event.created|date:'U' }} + #{{ event.machine_id }} + {{ event.author|capfirst }} + + {{ event.test_name }} + {% if event.test_time_control %}{{ event.test_time_control }}{% endif %} + + {{ event.summary }} + + {% if event.log_file %} + View + {% else %} + — + {% endif %} + + + {% empty %} + No errors have been reported. + {% endfor %} + + + {% include "OpenBench/Blocks/pagebrowser.html" %} diff --git a/Templates/OpenBench/event.html b/Templates/OpenBench/event.html index 453b9c4..ed206f4 100644 --- a/Templates/OpenBench/event.html +++ b/Templates/OpenBench/event.html @@ -1,7 +1,234 @@ - +{% extends "OpenBench/base.html" %} - - -
{{content}}
- - +{% load static %} +{% load uitags %} + +{% block scripts %} + +{% endblock %} + +{% block page_head %} +
+ {{ back_label }} +

Event #{{ event.id }}

+

{{ event.summary|default:"No summary" }}

+
+{% if kind != 'empty' %} +
+ + +
+{% endif %} +{% endblock %} + +{% block content %} + +
+
+
Type
+
{{ event.summary|default:"Event" }}
+
+
+
When
+
{{ event.created|date:'U' }}
+
+
+
User
+
{% if event.author %}{{ event.author|capfirst }}{% else %}—{% endif %}
+
+
+
Machine
+
{% if event.machine_id %}#{{ event.machine_id }}{% else %}—{% endif %}
+
+
+
Test
+
{% if event.test_id %}#{{ event.test_id }}{% else %}—{% endif %}
+
+
+ + {% if kind == 'pgn' %} + +
+ +
+

Game

+ {{ game.ply_count }} plies +
+ +
+
+ {{ game.white }} + White +
+
{{ game.result }}
+
+ {{ game.black }} + Black +
+
+ + {% if game.termination or game.final_note %} +
+ +
+ {{ game.termination|default:event.summary }} + {% if game.final_note %}{{ game.final_note }}{% endif %} +
+
+ {% endif %} + +
+ {% if game.time_control %}
Time control
{{ game.time_control }}
{% endif %} + {% if game.date %}
Date
{{ game.date }}
{% endif %} + {% if game.duration %}
Duration
{{ game.duration }}
{% endif %} + {% if game.fen %}
Start FEN
{{ game.fen }}
{% endif %} +
+ + {% if game.headers %} +
+ All PGN headers ({{ game.headers|length }}) + + {% for key, value in game.headers %} + + {% endfor %} +
{{ key }}{{ value }}
+
+ {% endif %} + +
+ + {% if game.rows %} + +
+ +
+
+

Moves

+ {{ game.ply_count }} +
+ +
+ {% for row in game.rows %} +
+ {{ row.num }}. + + {% if row.w %} + + {% else %} + … + {% endif %} + + {% if row.b %} + + {% else %} + + {% endif %} +
+ {% endfor %} +
+
+ + + +
+ + {% else %} + +
+
+ +

This game has no moves recorded.

+
+
+ + {% endif %} + + {{ moves_json|json_script:"ev-moves" }} + + {% elif kind == 'log' %} + +
+ +
+

Log

+
+ {{ log.total }} lines + {% if log.errors %}{{ log.errors }} error{{ log.errors|pluralize }}{% endif %} + {% if log.warnings %}{{ log.warnings }} warning{{ log.warnings|pluralize }}{% endif %} + + + +
+
+ + {% if log.skipped %} +
Showing the last {{ log.lines|length }} of {{ log.total }} lines. Download has the full log.
+ {% endif %} + +
+ {% for line in log.lines %}
{{ line.n }}{{ line.text }}
{% endfor %} + +
+ +
+ + {% else %} + +
+
+ +

No log was attached to this event.

+
+
+ + {% endif %} + + {% if kind != 'empty' %}{{ content|json_script:"ev-raw" }}{% endif %} + +{% endblock %} diff --git a/Templates/OpenBench/index.html b/Templates/OpenBench/index.html index 0cc043c..30c5d0c 100644 --- a/Templates/OpenBench/index.html +++ b/Templates/OpenBench/index.html @@ -1,11 +1,50 @@ {% extends "OpenBench/base.html" %} -{% load mytags %} +{% load mytags uitags %} {% block page_head %}

Tests

Pending, active and finished workloads

{% endblock %} {% block content %} + + {% if status and paging.page == 1 %} + {% with fleet=status|fleet_stats %} +
+
+ +
+
{{ active|length }}
+
Running
+
+
+
+ +
+
{{ pending|length }}
+
Pending approval
+
+
+
+ +
+
{{ awaiting|length }}
+
Awaiting artifacts
+
+
+ {% if fleet %} +
+ +
+
{{ fleet.machines }}
+
Machines online
+
{{ fleet.threads }} threads · {{ fleet.mnps }} MNPS
+
+
+ {% endif %} +
+ {% endwith %} + {% endif %} + {% if paging.page == 1 %} @@ -93,7 +132,7 @@ {% include "OpenBench/Blocks/testsummary.html" %} {% empty %} - No finished tests yet. + No finished tests yet. {% endfor %} diff --git a/Templates/OpenBench/users.html b/Templates/OpenBench/users.html index f49c38c..7d1ac12 100644 --- a/Templates/OpenBench/users.html +++ b/Templates/OpenBench/users.html @@ -2,32 +2,123 @@ {% load mytags %} -{% block page_head %}

Users

Contributors and approvers

{% endblock %} +{% block page_head %} +
+

Users

+

Contributors and approvers, with games split by time control

+
+
+
+ All games + STC + LTC + Tests +
+
+{% endblock %} {% block content %} - +
+
+ +
+
{{ summary.users|insertCommas }}
+
Contributors
+
+
+
+ +
+
{{ summary.total|insertCommas }}
+
Total games
+
+
+
+ +
+
{{ summary.stc|insertCommas }}
+
STC games
+
{{ summary.stc_share }}% of classified games
+
+
+
+ +
+
{{ summary.ltc|insertCommas }}
+
LTC games
+
{{ summary.ltc_share }}% of classified games
+
+
+
- - - - - - - +
+
+

Games by time control

+
+ STC + LTC + {% if show_other %}Other{% endif %} +
+
+
+
+ + + +
+

+ STC is a Fischer time control with a base time under {{ stc_limit }} seconds, like 10+0.1. + LTC is {{ stc_limit }} seconds or more, like 60+0.6. + Fixed nodes, depth, movetime, and cyclic controls count as Other. + Games are credited to the user whose machines played them. +

+
+
- {% for profile in profiles %} - {% if profile.games or profile.tests or profile.approver %} +
+
UsernameGamesTestsEngineCreated
+ + + + + + + + {% if show_other %}{% endif %} + + + + + + + {% for row in rows %} - - - - - + + + + + + {% if show_other %}{% endif %} + + + + - {% endif %} - {% endfor %} + {% empty %} + + {% endfor %} -
#UsernameGamesSTCLTCOtherSplitTestsEngineCreated
{{profile.user.username|capfirst}}{{profile.games|insertCommas}}{{profile.tests|insertCommas}}{{profile.engine}}{{profile.user.date_joined|date:'U'}}{{ forloop.counter }} + {{ row.username|capfirst }} + {% if row.approver %}approver{% endif %} + {{ row.total|insertCommas }}{{ row.stc|insertCommas }}{{ row.ltc|insertCommas }}{{ row.other|insertCommas }} +
+ + + +
+
{{ row.tests|insertCommas }}{{ row.engine }}{{ row.joined|date:'U' }}
No users yet.
+ + {% endblock %}