From 236d69cfb836e0094de1f0283d81424bb143d411 Mon Sep 17 00:00:00 2001 From: claude Date: Sun, 11 Oct 2026 11:55:32 +0200 Subject: [PATCH] Workload page: result hero, hide unavailable actions, confirm destructive ones Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01TyAt5S5MAwLBY2idan1SwU --- OpenBench/static/workload-refresh.css | 42 +++++++++++++++++++++++++ Templates/OpenBench/workload.html | 45 +++++++++++++++++++-------- 2 files changed, 74 insertions(+), 13 deletions(-) create mode 100644 OpenBench/static/workload-refresh.css diff --git a/OpenBench/static/workload-refresh.css b/OpenBench/static/workload-refresh.css new file mode 100644 index 0000000..2d97c41 --- /dev/null +++ b/OpenBench/static/workload-refresh.css @@ -0,0 +1,42 @@ +/* Workload page additions for the design refresh. Loaded after workload.css. */ + +.result-hero { + grid-column: 1 / -1; + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 24px; + padding: 18px 20px; + background: var(--color2); + border: 1px solid var(--line); + border-radius: var(--radius); +} + +.result-hero .statblock { + padding: 12px 18px; + border-radius: var(--radius); + font-family: var(--font-mono); + font-size: 15px; + line-height: 1.5; + white-space: nowrap; +} + +.result-hero .result-hero-gauge { + flex: 1 1 260px; + min-width: 220px; +} + +.result-hero .llr { + margin-top: 0; + height: 8px; +} + +.result-hero .llr-scale { + font-size: 12px; +} + +.result-hero-note { + margin: 8px 0 0; + color: var(--muted); + font-size: 13px; +} diff --git a/Templates/OpenBench/workload.html b/Templates/OpenBench/workload.html index e00dd48..ba0d587 100644 --- a/Templates/OpenBench/workload.html +++ b/Templates/OpenBench/workload.html @@ -5,6 +5,7 @@ {% block scripts %} + {% endblock %} @@ -15,6 +16,24 @@
+ {% if type == "TEST" %} + {% with progress=workload|progress_info %} +
+
{{ workload|shortStatBlock|linebreaksbr }}
+ {% if progress.gauge %} +
+
+ + +
+
{{ progress.lower }}LLR {{ progress.llr }}{{ progress.upper }}
+
+ {% endif %} +
+ {% endwith %} + {% endif %} + +

Configuration

@@ -83,25 +102,25 @@ {% elif not workload.approved and request.user.is_superuser %} Approve {% else %} - Approve + {% endif %} {% if workload.finished and not workload.passed and not workload.failed and profile.approver %} - Restart + Restart {% elif workload.finished and not workload.passed and not workload.failed and profile.user.username == workload.author %} - Restart + Restart {% elif workload.finished %} - Restart + {% endif %} {% if not workload.finished and profile.approver %} - Stop + Stop {% elif not workload.finished and profile.user.username == workload.author %} - Stop + Stop {% elif not workload.finished %} - Stop + {% endif %} @@ -109,13 +128,13 @@ {% if workload.deleted %} Restore {% else %} - Delete + Delete {% endif %} {% else %} {% if workload.deleted %} - Restore + {% else %} - Delete + {% endif %} {% endif %} @@ -174,18 +193,18 @@
- +
- +
{% if type == "TEST" or type == "DATAGEN" %}
- +
{% endif %}