diff --git a/OpenBench/static/form.css b/OpenBench/static/form.css
index 3e61b3e..e2b8a9b 100644
--- a/OpenBench/static/form.css
+++ b/OpenBench/static/form.css
@@ -1,106 +1,172 @@
+/* ==========================================================================
+ OpenBench - forms (modern dark theme)
+ ========================================================================== */
+
+/* A .form is a grid of cards: .col (half width), .col-full (full width) */
+
+#content .form {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 20px;
+ align-items: start;
+ margin-bottom: 20px;
+}
+
+#content .form > .col,
+#content .form > .col-full {
+ min-width: 0;
+ padding: 4px 20px 20px;
+ background-color: var(--color2);
+ border: 1px solid var(--line);
+ border-radius: var(--radius);
+ white-space: normal;
+}
+
+#content .form > .col-full {
+ grid-column: 1 / -1;
+}
+
+#content .form > .col:only-child {
+ grid-column: 1 / -1;
+ max-width: 640px;
+}
+
#content .form .col-half {
- display: inline-block;
- width: 25%;
- white-space: normal;
- box-sizing: border-box;
- vertical-align: top;
-}
-
-#content .form .col {
- display: inline-block;
- width: 50%;
- white-space: normal;
- margin-left: 0;
- box-sizing: border-box;
- vertical-align: top;
-}
-
-#content .form .col-full {
display: block;
- width: 100%;
+ width: auto;
white-space: normal;
- margin-left: 0;
- box-sizing: border-box;
- vertical-align: top;
-}
-
-/* Styles for screen widths less than 600px */
-
-@media (max-width: 1024px) {
- #content .form .col {
- display: block;
- width: 100%;
- }
}
#content .form h3 {
- font-size: 14px;
- color: var(--color-font3);
+ margin: 20px 0 14px;
+ padding: 0 0 8px;
+ border-bottom: 1px solid var(--line);
+ color: var(--muted);
+ font-size: 12px;
+ font-weight: 600;
+ letter-spacing: 0.1em;
text-align: left;
- padding-left: 1.5rem;
+ text-transform: uppercase;
}
+/* Rows: label on the left, control fills the rest */
+
#content .form .row {
display: flex;
align-items: center;
- margin-bottom: 0.25rem;
+ gap: 12px;
+ margin-bottom: 8px;
}
#content .row label {
- font-size: 13px;
- width: 25%;
- min-width: 128px;
- margin-right: 1rem;
- text-align: right;
- color: var(--color-font2)
-}
-
-
-#content .row input, #content .row select, #content .row textarea {
- flex-grow: 1;
+ flex: 0 0 150px;
+ width: auto;
min-width: 0;
- border: 1px solid var(--color3);
- border-radius: 4px;
- padding: 9px 6px 6px;
- background-color: var(--color2);
+ margin: 0;
color: var(--color-font2);
- font-family: "Courier Prime", serif;
+ font-size: 13px;
+ font-weight: 500;
+ text-align: left;
}
-#content .row input[type="file"]{
- padding: 2px 2px;
+#content .row label select {
+ width: 100%;
}
-#content .row input:focus, #content .row select:focus, #content .row textarea:focus {
+#content .row input,
+#content .row select,
+#content .row textarea {
+ flex: 1 1 auto;
+ min-width: 0;
+ padding: 8px 10px;
+ background-color: #0C1016;
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius);
+ color: var(--color-font1);
+ font-family: var(--font-sans);
+ font-size: 13.5px;
+ transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
+}
+
+#content .row textarea {
+ font-family: var(--font-mono);
+ font-size: 12.5px;
+ line-height: 1.5;
+ resize: vertical;
+}
+
+#content .row input::placeholder,
+#content .row textarea::placeholder {
+ color: #566074;
+}
+
+#content .row input:hover,
+#content .row select:hover,
+#content .row textarea:hover {
+ border-color: #3A4862;
+}
+
+#content .row input:focus,
+#content .row select:focus,
+#content .row textarea:focus {
outline: none;
- border-color: var(--color3);
- box-shadow: 0 0 0 2px rgba(77, 144, 254, 0.75);
- background-color: var(--color2);
- color: var(--color-font2);
+ border-color: var(--accent);
+ box-shadow: 0 0 0 3px rgba(76, 141, 255, 0.22);
+ background-color: #0E131B;
}
-#content .row select > option{
- font-family: "Helvetica", serif;
+#content .row input[type="file"] {
+ padding: 4px;
}
-#content .row input[type="file"]::file-selector-button {
- background-color: var(--color3);
- border: 1px solid var(--color2);
- border-radius: 4px;
- padding: 6px 6px 3px;
- color: var(--color-font2);
+#content .row input[type="checkbox"],
+#content .row input[type="radio"] {
+ flex: 0 0 auto;
+ width: 16px;
+ height: 16px;
+ padding: 0;
+ accent-color: var(--accent);
cursor: pointer;
- transition: background-color 0.3s, border-color 0.3s;
- font-family: "Courier Prime", serif;
}
-#content .row input[type="file"]::file-selector-button:hover {
- background-color: rgba(77, 144, 254, 0.8);
- border-color: var(--color2);
+#content .row select > option {
+ font-family: var(--font-sans);
+ background-color: #0C1016;
+ color: var(--color-font1);
}
#content .row input[readonly] {
+ background-color: var(--color2);
color: var(--color-font1);
+ font-family: var(--font-mono);
+ font-size: 13px;
+}
+
+#content .row input[type="file"]::file-selector-button {
+ margin-right: 10px;
+ padding: 6px 12px;
+ background-color: var(--color3);
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius);
+ color: var(--color-font1);
+ font-family: var(--font-sans);
+ font-size: 13px;
+ font-weight: 500;
+ cursor: pointer;
+ transition: background-color 0.15s, border-color 0.15s;
+}
+
+#content .row input[type="file"]::file-selector-button:hover {
+ background-color: var(--accent);
+ border-color: var(--accent);
+ color: #FFFFFF;
+}
+
+/* Buttons that sit directly in a form card */
+
+#content .form .col > .anchorbutton,
+#content .form .col-full > .anchorbutton {
+ margin-top: 14px;
}
#content .form .flex {
@@ -108,17 +174,162 @@
flex-wrap: wrap;
max-width: 100%;
justify-content: flex-start;
+ gap: 6px;
}
-#content .form .flex button{
+#content .form .flex button {
max-width: 100%;
}
+/* Sticky submit bar (create workload) */
+
+#content .form-actions {
+ position: sticky;
+ bottom: 0;
+ z-index: 5;
+ padding: 16px 0 4px;
+ background: linear-gradient(to top, var(--color1) 65%, rgba(11, 14, 20, 0));
+}
+
+#content .form-actions .anchorbutton {
+ min-width: 260px;
+ padding: 12px 22px;
+ font-size: 14px;
+}
+
+/* Presets generated by create_workload.js */
+
+#content #test-mode-buttons {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
+ gap: 8px;
+}
+
+#content #test-mode-buttons .col-half {
+ width: auto;
+ padding: 0;
+}
+
+#content #test-mode-buttons .anchorbutton {
+ width: 100%;
+ margin: 0;
+}
+
+/* Search filters */
+
+#content .chips {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+}
+
+#content .chip {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ padding: 7px 12px;
+ background-color: #0C1016;
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius);
+ color: var(--color-font2);
+ font-size: 13px;
+ font-weight: 500;
+ cursor: pointer;
+ user-select: none;
+ transition: border-color 0.15s ease, background-color 0.15s ease;
+}
+
+#content .chip:hover {
+ border-color: #3A4862;
+ background-color: var(--surface-hover);
+}
+
+#content .chip input {
+ margin: 0;
+ accent-color: var(--accent);
+ cursor: pointer;
+}
+
+#content .chip::before {
+ content: "";
+ width: 8px;
+ height: 8px;
+ background-color: var(--muted);
+}
+
+#content .chip-green::before { background-color: #34D399; }
+#content .chip-blue::before { background-color: #4C8DFF; }
+#content .chip-yellow::before { background-color: #F5B941; }
+#content .chip-red::before { background-color: #F87171; }
+
+/* Sign in / sign up */
+
+#content .auth-wrap {
+ max-width: 440px;
+ margin: 24px auto 0;
+}
+
+#content .auth-wrap .form > .col:only-child {
+ max-width: none;
+}
+
+#content .auth-wrap .row {
+ flex-direction: column;
+ align-items: stretch;
+ gap: 6px;
+ margin-bottom: 14px;
+}
+
+#content .auth-wrap .row label {
+ flex-basis: auto;
+}
+
+/* Profile engine list */
+
#content #engines-container span {
- margin: 0px 4px 0px 4px;
+ display: inline-flex;
+ align-items: center;
+ margin: 0 4px;
cursor: pointer;
}
#content #engines-container span input {
cursor: pointer;
}
+
+#content #engines-container .fa-trash-can {
+ color: #C25555;
+}
+
+#content #engines-container span:hover .fa-trash-can {
+ color: var(--bad);
+}
+
+@media (max-width: 1024px) {
+ #content .form {
+ grid-template-columns: minmax(0, 1fr);
+ }
+}
+
+@media (max-width: 640px) {
+
+ #content .form .row {
+ flex-direction: column;
+ align-items: stretch;
+ gap: 6px;
+ }
+
+ #content .row label {
+ flex-basis: auto;
+ }
+
+ #content .form > .col,
+ #content .form > .col-full {
+ padding: 4px 14px 16px;
+ }
+
+ #content .form-actions .anchorbutton {
+ width: 100%;
+ min-width: 0;
+ }
+}
diff --git a/OpenBench/static/llr_history.js b/OpenBench/static/llr_history.js
new file mode 100644
index 0000000..5ed27a1
--- /dev/null
+++ b/OpenBench/static/llr_history.js
@@ -0,0 +1,433 @@
+/* ==========================================================================
+ OpenBench - LLR history graph
+
+ The server (mytags.llr_history_graph) supplies the data as a
+
, and the graph is drawn here
+ so that it fills the width of its panel.
+
+ Hovering snaps the marker to the nearest point of the graph, and to the
+ peaks / valleys of the line when the pointer is near one.
+ ========================================================================== */
+
+(function () {
+ 'use strict';
+
+ var SVG_NS = 'http://www.w3.org/2000/svg';
+ var MINUS = '\u2212';
+ var HEIGHT = 124;
+ var MARGIN = { l: 40, r: 8, t: 8, b: 20 };
+ var MAGNET = 12; // px: how far a peak / valley pulls the marker
+ var SWING = 3; // px: smallest rise / fall that counts as a peak / valley
+ var uid = 0;
+
+ /* ---------- helpers ---------- */
+
+ function svg(name, attrs, parent) {
+ var node = document.createElementNS(SVG_NS, name);
+ for (var key in attrs)
+ if (Object.prototype.hasOwnProperty.call(attrs, key))
+ node.setAttribute(key, attrs[key]);
+ if (parent)
+ parent.appendChild(node);
+ return node;
+ }
+
+ function div(className, parent) {
+ var node = document.createElement('div');
+ node.className = className;
+ if (parent)
+ parent.appendChild(node);
+ return node;
+ }
+
+ function fmt(value) {
+ return value.toFixed(2).replace('-', MINUS);
+ }
+
+ function commas(value) {
+ return String(Math.round(value)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+ }
+
+ function compact(value) {
+ if (value >= 1e6) return parseFloat((value / 1e6).toFixed(1)) + 'M';
+ if (value >= 1e3) return parseFloat((value / 1e3).toFixed(1)) + 'k';
+ return String(Math.round(value));
+ }
+
+ function clamp(value, min, max) {
+ return Math.max(min, Math.min(max, value));
+ }
+
+ // Index of the first point with games >= target
+ function lowerBound(points, target) {
+
+ var lo = 0, hi = points.length;
+ while (lo < hi) {
+ var mid = (lo + hi) >> 1;
+ if (points[mid].games < target) lo = mid + 1;
+ else hi = mid;
+ }
+ return lo;
+ }
+
+ // Keep the first / min / max / last point of every pixel column
+ function decimate(points, sx) {
+
+ var out = [], i = 0, n = points.length;
+
+ while (i < n) {
+
+ var key = Math.round(sx(points[i].games));
+ var j = i, lo = i, hi = i;
+
+ while (j + 1 < n && Math.round(sx(points[j + 1].games)) === key) {
+ j++;
+ if (points[j].llr < points[lo].llr) lo = j;
+ if (points[j].llr > points[hi].llr) hi = j;
+ }
+
+ [i, lo, hi, j].filter(function (value, index, all) {
+ return all.indexOf(value) === index;
+ }).sort(function (a, b) { return a - b; }).forEach(function (k) {
+ out.push(points[k]);
+ });
+
+ i = j + 1;
+ }
+
+ return out;
+ }
+
+ /* Peaks and valleys: every turning point of the line where it rises or
+ falls by at least `threshold` before turning around. Flat stretches and
+ tiny wiggles (smaller than a few pixels) are ignored, so what snaps is
+ exactly what is visible on the graph. */
+ function findPivots(points, threshold) {
+
+ var pivots = [];
+ var trend = 0, hi = 0, lo = 0;
+
+ for (var i = 1; i < points.length; i++) {
+
+ var value = points[i].llr;
+
+ if (value >= points[hi].llr) hi = i;
+ if (value <= points[lo].llr) lo = i;
+
+ if (trend >= 0 && points[hi].llr - value >= threshold) {
+ pivots.push(hi);
+ trend = -1; hi = i; lo = i;
+ }
+ else if (trend <= 0 && value - points[lo].llr >= threshold) {
+ pivots.push(lo);
+ trend = 1; hi = i; lo = i;
+ }
+ }
+
+ return pivots;
+ }
+
+ /* ======================================================================
+ Graph
+ ====================================================================== */
+
+ function Graph(root, data) {
+
+ this.root = root;
+ this.lower = Number(data.lower);
+ this.upper = Number(data.upper);
+ this.games = Number(data.games);
+ this.active = -1;
+ this.rendered = 0;
+
+ this.points = data.history.map(function (p) {
+ return { games: Number(p[0]), llr: Number(p[1]), estimated: !!p[2] };
+ }).sort(function (a, b) { return a.games - b.games; });
+
+ root.textContent = '';
+
+ this.plot = div('llrg-plot', root);
+ this.plot.tabIndex = 0;
+ this.plot.setAttribute('role', 'img');
+ this.plot.setAttribute('aria-label', 'LLR history. Use the arrow keys to inspect the points.');
+
+ this.svgEl = svg('svg', { 'class': 'llrg-svg', 'aria-hidden': 'true' }, this.plot);
+ this.tip = div('llrg-tip', this.plot);
+
+ this.render();
+ this.bind();
+ }
+
+ Graph.prototype.render = function () {
+
+ var W = Math.floor(this.plot.clientWidth);
+ if (W < 120)
+ return;
+
+ this.rendered = W;
+
+ var H = HEIGHT, m = MARGIN;
+ var iw = W - m.l - m.r;
+ var ih = H - m.t - m.b;
+ var points = this.points;
+ var xMax = Math.max(points[points.length - 1].games, this.games, 1);
+
+ /* Vertical range: what was observed, and zero, with a minimum height */
+
+ var lo = 0, hi = 0;
+ points.forEach(function (p) {
+ if (p.llr < lo) lo = p.llr;
+ if (p.llr > hi) hi = p.llr;
+ });
+
+ var yMin, yMax;
+ if (hi - lo < 0.75) {
+ var center = (lo + hi) / 2;
+ yMin = center - 0.375;
+ yMax = center + 0.375;
+ } else {
+ var pad = Math.max((hi - lo) * 0.15, 0.15);
+ yMin = lo - pad;
+ yMax = hi + pad;
+ }
+
+ function sx(games) { return m.l + iw * (games / xMax); }
+ function sy(value) { return m.t + ih * (1 - (value - yMin) / (yMax - yMin)); }
+
+ this.g = { W: W, H: H, m: m, iw: iw, ih: ih, xMax: xMax, sx: sx, sy: sy };
+
+ /* Peaks and valleys, plus both ends, are what the marker snaps to */
+
+ var pivots = findPivots(points, SWING * (yMax - yMin) / ih);
+ pivots.push(0, points.length - 1);
+ this.pivots = pivots.filter(function (value, index, all) {
+ return all.indexOf(value) === index;
+ }).sort(function (a, b) { return a - b; });
+
+ /* Drawing */
+
+ var el = this.svgEl;
+ var id = 'llrg' + (++uid);
+ var zeroY = sy(0);
+
+ el.textContent = '';
+ el.setAttribute('viewBox', '0 0 ' + W + ' ' + H);
+ el.setAttribute('width', W);
+ el.setAttribute('height', H);
+
+ var defs = svg('defs', {}, el);
+ var above = svg('clipPath', { id: id + '-a' }, defs);
+ svg('rect', { x: m.l, y: m.t, width: iw, height: Math.max(zeroY - m.t, 0) }, above);
+ var below = svg('clipPath', { id: id + '-b' }, defs);
+ svg('rect', { x: m.l, y: zeroY, width: iw, height: Math.max(m.t + ih - zeroY, 0) }, below);
+
+ svg('rect', { 'class': 'llrg-bg', x: m.l, y: m.t, width: iw, height: ih }, el);
+
+ // Horizontal grid + labels: top, middle, bottom
+ [yMax, (yMin + yMax) / 2, yMin].forEach(function (value) {
+ var y = sy(value);
+ svg('line', { 'class': 'llrg-grid', x1: m.l, x2: m.l + iw, y1: y, y2: y }, el);
+ var label = svg('text', { 'class': 'llrg-tick', x: m.l - 6, y: y, dy: '0.32em', 'text-anchor': 'end' }, el);
+ label.textContent = fmt(value);
+ });
+
+ // Vertical grid
+ [0.25, 0.5, 0.75].forEach(function (fraction) {
+ var x = m.l + iw * fraction;
+ svg('line', { 'class': 'llrg-grid', x1: x, x2: x, y1: m.t, y2: m.t + ih }, el);
+ });
+
+ // Games axis
+ [[0, 'start', m.l], [xMax / 2, 'middle', m.l + iw / 2], [xMax, 'end', m.l + iw]].forEach(function (tick) {
+ var label = svg('text', { 'class': 'llrg-tick', x: tick[2], y: H - 5, 'text-anchor': tick[1] }, el);
+ label.textContent = tick[0] === 0 ? '0' : compact(tick[0]);
+ });
+
+ // Bounds and zero, when they are in range
+ var lower = this.lower, upper = this.upper;
+ [[lower, 'llrg-bound'], [0, 'llrg-zero'], [upper, 'llrg-bound']].forEach(function (guide) {
+ if (guide[0] >= yMin && guide[0] <= yMax) {
+ var y = sy(guide[0]);
+ svg('line', { 'class': guide[1], x1: m.l, x2: m.l + iw, y1: y, y2: y }, el);
+ }
+ });
+
+ // The line: green above zero, red below
+ var drawn = points.length > iw * 1.5 ? decimate(points, sx) : points;
+ var d = drawn.map(function (p, i) {
+ return (i ? 'L' : 'M') + sx(p.games).toFixed(1) + ' ' + sy(p.llr).toFixed(1);
+ }).join('');
+
+ svg('path', { 'class': 'llrg-line llrg-line-pos', d: d, 'clip-path': 'url(#' + id + '-a)' }, el);
+ svg('path', { 'class': 'llrg-line llrg-line-neg', d: d, 'clip-path': 'url(#' + id + '-b)' }, el);
+
+ // Marker
+ this.hoverLine = svg('line', { 'class': 'llrg-hover-line', y1: m.t, y2: m.t + ih }, el);
+ this.hoverDot = svg('circle', { 'class': 'llrg-hover-dot', r: 3.5 }, el);
+
+ if (this.active >= 0)
+ this.setActive(this.active);
+ };
+
+ /* ---------- snapping ---------- */
+
+ Graph.prototype.pick = function (x) {
+
+ var g = this.g, points = this.points;
+ var target = clamp((x - g.m.l) / g.iw, 0, 1) * g.xMax;
+
+ // Nearest point
+ var after = Math.min(lowerBound(points, target), points.length - 1);
+ var before = Math.max(after - 1, 0);
+ var best = Math.abs(g.sx(points[before].games) - x) <= Math.abs(g.sx(points[after].games) - x) ? before : after;
+
+ // Nearest peak / valley, if the pointer is close enough to one
+ var magnet = -1, magnetDistance = MAGNET + 1;
+ for (var i = 0; i < this.pivots.length; i++) {
+ var distance = Math.abs(g.sx(points[this.pivots[i]].games) - x);
+ if (distance < magnetDistance) {
+ magnet = this.pivots[i];
+ magnetDistance = distance;
+ }
+ }
+
+ return magnet >= 0 ? magnet : best;
+ };
+
+ Graph.prototype.setActive = function (index) {
+
+ if (index < 0 || !this.g) {
+ this.active = -1;
+ this.hoverLine.classList.remove('active');
+ this.hoverDot.classList.remove('active', 'llrg-pos', 'llrg-neg');
+ this.tip.classList.remove('active');
+ return;
+ }
+
+ var g = this.g, p = this.points[index];
+ var x = g.sx(p.games), y = g.sy(p.llr);
+
+ this.active = index;
+
+ this.hoverLine.setAttribute('x1', x);
+ this.hoverLine.setAttribute('x2', x);
+ this.hoverDot.setAttribute('cx', x);
+ this.hoverDot.setAttribute('cy', y);
+ this.hoverDot.setAttribute('class', 'llrg-hover-dot active ' + (p.llr >= 0 ? 'llrg-pos' : 'llrg-neg'));
+ this.hoverLine.classList.add('active');
+
+ this.tip.textContent = commas(p.games) + ' games | LLR ' + (p.estimated ? '\u2248' : '') + fmt(p.llr);
+ this.tip.classList.add('active');
+
+ var left = clamp(x + 8, 0, g.W - this.tip.offsetWidth);
+ var top = clamp(y - this.tip.offsetHeight - 8, 0, g.H - this.tip.offsetHeight);
+
+ this.tip.style.left = left + 'px';
+ this.tip.style.top = top + 'px';
+ };
+
+ /* ---------- events ---------- */
+
+ Graph.prototype.bind = function () {
+
+ var self = this, plot = this.plot;
+
+ function move(event) {
+ if (!self.g)
+ return;
+ var box = self.svgEl.getBoundingClientRect();
+ var x = (event.clientX - box.left) * (self.g.W / (box.width || self.g.W));
+ self.setActive(self.pick(x));
+ }
+
+ plot.addEventListener('pointerenter', move);
+ plot.addEventListener('pointermove', move);
+ plot.addEventListener('pointerdown', move);
+ plot.addEventListener('pointerleave', function (event) {
+ if (event.pointerType === 'mouse')
+ self.setActive(-1);
+ });
+
+ plot.addEventListener('keydown', function (event) {
+
+ var last = self.points.length - 1;
+ var step = event.shiftKey ? 10 : 1;
+ var index = self.active;
+
+ if (event.key === 'ArrowLeft') index = index < 0 ? last : index - step;
+ else if (event.key === 'ArrowRight') index = index < 0 ? last : index + step;
+ else if (event.key === 'Home') index = 0;
+ else if (event.key === 'End') index = last;
+ else if (event.key === 'Escape') { self.setActive(-1); return; }
+ else return;
+
+ event.preventDefault();
+ self.setActive(clamp(index, 0, last));
+ });
+
+ plot.addEventListener('blur', function () { self.setActive(-1); });
+
+ function redraw() {
+ if (Math.floor(plot.clientWidth) !== self.rendered)
+ self.render();
+ }
+
+ if ('ResizeObserver' in window) {
+ var queued = false;
+ new ResizeObserver(function () {
+ if (queued) return;
+ queued = true;
+ window.requestAnimationFrame(function () { queued = false; redraw(); });
+ }).observe(plot);
+ } else {
+ window.addEventListener('resize', redraw);
+ }
+ };
+
+ /* ======================================================================
+ Loading
+ ====================================================================== */
+
+ function showError(container, text) {
+ container.removeAttribute('aria-busy');
+ container.innerHTML = '
' + text + '
';
+ }
+
+ function load(container) {
+
+ var url = container.getAttribute('data-history-url');
+ if (!url)
+ return;
+
+ container.setAttribute('aria-busy', 'true');
+
+ fetch(url, { credentials: 'same-origin' }).then(function (response) {
+
+ if (!response.ok)
+ throw new Error('Unable to load history graph');
+
+ return response.text();
+
+ }).then(function (markup) {
+
+ container.innerHTML = markup;
+ container.removeAttribute('aria-busy');
+
+ var node = container.querySelector('.llr-chart');
+ if (!node)
+ return showError(container, 'No history to show yet.');
+
+ new Graph(node, JSON.parse(node.getAttribute('data-chart')));
+
+ }).catch(function () {
+ showError(container, 'Unable to load history graph.');
+ });
+ }
+
+ document.addEventListener('DOMContentLoaded', function () {
+ var container = document.getElementById('llr-history-container');
+ if (container)
+ load(container);
+ });
+
+})();
diff --git a/OpenBench/static/paging.css b/OpenBench/static/paging.css
index 3283978..505cd81 100644
--- a/OpenBench/static/paging.css
+++ b/OpenBench/static/paging.css
@@ -1,10 +1,14 @@
+/* ==========================================================================
+ OpenBench - pagination (modern dark theme)
+ ========================================================================== */
+
.pagination {
display: inline-flex;
justify-content: center;
align-items: center;
}
-#pagebrowse {
+#pagebrowser {
display: flex;
justify-content: center;
}
@@ -15,42 +19,56 @@
.page, .ellipsis {
display: inline-block;
- padding: 6px 1rem;
- margin: 0;
- border-left: 1px solid var(--color1);
- border-right: 1px solid var(--color1);
- background-color: var(--color2); /* Dark background color */
+ box-sizing: border-box;
+ padding: 0 0.85rem;
+ margin: 0 0 0 -1px;
+ border: 1px solid var(--line-strong);
+ background-color: var(--color2);
color: var(--color-font2);
+ font-size: 13px;
+ font-variant-numeric: tabular-nums;
text-decoration: none;
cursor: pointer;
- transition: background-color 0.2s; /* Add a smooth transition effect to background color */
- height: 24px; /* This is just an example, adjust according to your needs */
- line-height: 24px; /* Should be same as height */
- min-width: 1.6rem;
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
+ height: 30px;
+ line-height: 28px;
+ min-width: 2rem;
text-align: center;
vertical-align: middle;
}
.page:hover {
- background-color: var(--color3); /* Darker background color on hover */
+ background-color: var(--surface-hover);
+ border-color: #3A4862;
+ color: var(--color-font1);
+ position: relative;
}
.previous {
- border-top-left-radius: 7px;
- border-bottom-left-radius: 7px;
+ border-top-left-radius: 2px;
+ border-bottom-left-radius: 2px;
}
.current {
- background-color: var(--color3);
+ background-color: var(--accent);
+ border-color: var(--accent);
+ color: #FFFFFF;
+ font-weight: 600;
+ position: relative;
+}
+
+.current:hover {
+ background-color: var(--accent);
+ border-color: var(--accent);
+ color: #FFFFFF;
}
.next {
- border-top-right-radius: 7px;
- border-bottom-right-radius: 7px;
+ border-top-right-radius: 2px;
+ border-bottom-right-radius: 2px;
}
.ellipsis, .fa-solid {
- /*margin: 0 4px;*/
pointer-events: none; /* Disable click events on ellipsis */
vertical-align: middle; /* Ensure icons are vertically centered */
}
diff --git a/OpenBench/static/style.css b/OpenBench/static/style.css
index 5b329f4..e93ad07 100644
--- a/OpenBench/static/style.css
+++ b/OpenBench/static/style.css
@@ -1,92 +1,564 @@
-a:link, a:visited, a:hover, a:active {
- text-decoration: none;
- color: #88C0D0;
+/* ==========================================================================
+ OpenBench - modern dark theme
+ Layout: sticky topbar + sticky sidebar + centred content column.
+ Sharp corners (2px max), one accent colour, tabular numerics.
+ Variable names --color1..3 / --color-font1..3 are kept for compatibility.
+ ========================================================================== */
+
+:root {
+ color-scheme: dark;
+
+ /* Surfaces */
+ --color1: #0B0E14; /* page background */
+ --color2: #0F131A; /* panels / alternate rows */
+ --color3: #161B26; /* raised surfaces */
+ --surface-head: #121723; /* table + card headers */
+ --surface-hover: #171E2B; /* hover */
+
+ /* Lines */
+ --line: #1C2230;
+ --line-strong: #2A3447;
+
+ /* Text */
+ --color-font1: #F1F4FA;
+ --color-font2: #C5CCD9;
+ --color-font3: #8FB4FF;
+ --muted: #7F8BA1;
+
+ /* Accent */
+ --accent: #4C8DFF;
+ --accent-hover: #7AAEFF;
+ --accent-soft: rgba(76, 141, 255, 0.14);
+ --link: #7EB0FF;
+ --link-hover: #B4D3FF;
+
+ /* Status */
+ --ok: #34D399;
+ --warn: #F5B941;
+ --bad: #F87171;
+ --orange: #FB923C;
+
+ /* Type */
+ --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
+
+ /* Metrics */
+ --radius: 2px;
+ --topbar-h: 56px;
+ --sidebar-w: 244px;
+}
+
+*, *::before, *::after {
+ box-sizing: border-box;
+}
+
+* {
+ scrollbar-color: var(--line-strong) transparent;
+ scrollbar-width: thin;
+}
+
+::selection {
+ background: rgba(76, 141, 255, 0.35);
+ color: #FFFFFF;
+}
+
+html {
+ -webkit-text-size-adjust: 100%;
+ scroll-padding-top: calc(var(--topbar-h) + 12px);
}
body {
- --color1: #2E3440;
- --color2: #3B4252;
- --color3: #434C5E;
-
- --color-font1: #ECEFF4;
- --color-font2: #D8DEE9;
- --color-font3: #88C0D0;
-
+ margin: 0;
+ padding: 0;
background-color: var(--color1);
-
- font-size: 16px;
- font-family: "Courier Prime", serif;
- display:flex;
+ color: var(--color-font2);
+ font-family: var(--font-sans);
+ font-size: 14.5px;
+ line-height: 1.5;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ text-rendering: optimizeLegibility;
}
-body, html, main{
- padding: 0;
- margin: 0;
- min-width: 100%;
- max-width: 100%;
+a:link, a:visited, a:active {
+ text-decoration: none;
+ color: var(--link);
+}
+
+a:hover {
+ text-decoration: none;
+ color: var(--link-hover);
+}
+
+a:focus-visible,
+button:focus-visible,
+input:focus-visible,
+select:focus-visible,
+textarea:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 2px;
+}
+
+.skip-link {
+ position: absolute;
+ left: -9999px;
+ top: 8px;
+}
+
+.skip-link:focus {
+ left: 12px;
+ z-index: 100;
+ padding: 8px 14px;
+ background: var(--accent);
+ color: #FFFFFF !important;
+ border-radius: var(--radius);
+}
+
+/* ---------- Utilities ---------- */
+
+.muted { color: var(--muted); }
+.mono { font-family: var(--font-mono); }
+.textcenter { text-align: center; }
+.left-align { text-align: left; }
+
+/* ==========================================================================
+ Topbar
+ ========================================================================== */
+
+#topbar {
+ position: sticky;
+ top: 0;
+ z-index: 40;
+ display: flex;
+ align-items: center;
+ gap: 16px;
+ height: var(--topbar-h);
+ padding: 0 20px;
+ background: rgba(11, 14, 20, 0.88);
+ -webkit-backdrop-filter: saturate(160%) blur(10px);
+ backdrop-filter: saturate(160%) blur(10px);
+ border-bottom: 1px solid var(--line);
+}
+
+#topbar .brand {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ color: var(--color-font1);
+ min-width: 0;
+}
+
+#topbar .brand:hover {
+ color: var(--color-font1);
+}
+
+#topbar .brand-logo {
+ display: block;
+ width: 26px;
+ height: 26px;
+}
+
+#topbar .brand-name {
+ font-size: 16px;
+ font-weight: 700;
+ letter-spacing: -0.01em;
white-space: nowrap;
}
-#sidebar {
- padding: 60px 16px 16px 16px;
- flex-basis: calc(min(300px, max(200px, 10%)));
+#topbar .brand-sub {
+ padding-left: 10px;
+ border-left: 1px solid var(--line-strong);
+ color: var(--muted);
+ font-size: 12.5px;
+ font-weight: 500;
+ white-space: nowrap;
+}
+
+#topbar .topbar-spacer {
+ flex: 1;
+}
+
+#topbar .topbar-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+#topbar .topbar-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ height: 34px;
+ padding: 0 12px;
+ border: 1px solid transparent;
+ border-radius: var(--radius);
+ color: var(--color-font2);
+ font-size: 13px;
+ font-weight: 500;
+ white-space: nowrap;
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
+}
+
+#topbar .topbar-btn:hover {
+ background-color: var(--surface-hover);
+ color: var(--color-font1);
+}
+
+#topbar .topbar-btn-primary {
+ background-color: var(--accent);
+ color: #FFFFFF;
+ font-weight: 600;
+}
+
+#topbar .topbar-btn-primary:hover {
+ background-color: var(--accent-hover);
+ color: #FFFFFF;
}
#sidebar-toggle {
display: none;
+ align-items: center;
+ justify-content: center;
+ width: 36px;
+ height: 36px;
+ padding: 0;
+ margin-left: -8px;
+ background: transparent;
+ border: 1px solid transparent;
+ border-radius: var(--radius);
+ color: var(--color-font1);
+ font-size: 18px;
+ cursor: pointer;
}
-#content-parent{
- flex-grow: 1;
- justify-content: left;
- height: 100%;
-
- box-sizing: border-box;
- padding-left: 2rem;
- padding-right: 2rem;
+#sidebar-toggle:hover {
+ background-color: var(--surface-hover);
}
-#content {
- max-width: calc(min(100%,1000px));
- width: 100%;
- white-space: nowrap;
- display: inline-block;
+/* ==========================================================================
+ Layout: sidebar + content
+ ========================================================================== */
+
+#layout {
+ display: flex;
+ align-items: flex-start;
+}
+
+#sidebar {
+ position: sticky;
+ top: var(--topbar-h);
+ flex: 0 0 var(--sidebar-w);
+ width: var(--sidebar-w);
+ height: calc(100vh - var(--topbar-h));
+ overflow-y: auto;
+ padding: 20px 12px 32px;
+ border-right: 1px solid var(--line);
+}
+
+#sidebar .nav-section + .nav-section {
+ margin-top: 22px;
+}
+
+#sidebar .nav-title {
+ padding: 0 12px 8px;
+ color: var(--muted);
+ font-size: 11px;
+ font-weight: 600;
+ letter-spacing: 0.12em;
+ text-transform: uppercase;
}
#sidebar ul {
- list-style-type: none;
- padding: 0px 16px 0px 8px;
- line-height: 1.75;
-}
-
-#sidebar li {
- padding: 4px 16px 2px;
- font-size: 1.0rem;
- border-radius: 4px;
- transition: background-color 0.2s ease-in-out;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
#sidebar li a {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 7px 12px;
+ border-left: 2px solid transparent;
+ border-radius: var(--radius);
color: var(--color-font2);
- display: block;
+ font-size: 14px;
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
+}
+
+#sidebar li a i {
+ color: var(--muted);
+ transition: color 0.15s ease;
+}
+
+#sidebar li a:hover {
+ background-color: var(--surface-hover);
+ color: var(--color-font1);
+}
+
+#sidebar li a.active {
+ background-color: var(--accent-soft);
+ border-left-color: var(--accent);
+ color: var(--color-font1);
+ font-weight: 500;
+}
+
+#sidebar li a.active i {
+ color: var(--accent-hover);
+}
+
+#sidebar-backdrop {
+ display: none;
+}
+
+#content-parent {
+ flex: 1 1 auto;
+ min-width: 0;
+ padding: 28px 40px 96px;
+}
+
+#content {
+ width: 100%;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+/* ---------- Page header ---------- */
+
+.page-head:empty {
+ display: none;
+}
+
+.page-head {
+ display: flex;
+ align-items: flex-end;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ gap: 12px 16px;
+ margin-bottom: 22px;
+}
+
+.page-title {
+ margin: 0;
+ color: var(--color-font1);
+ font-size: 24px;
+ font-weight: 650;
+ letter-spacing: -0.02em;
+ line-height: 1.2;
+}
+
+.page-sub {
+ margin: 4px 0 0;
+ color: var(--muted);
+ font-size: 13.5px;
+}
+
+.page-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+/* ---------- Cards ---------- */
+
+.card {
+ margin-bottom: 20px;
+ background-color: var(--color2);
+ border: 1px solid var(--line);
+ border-radius: var(--radius);
+}
+
+.card-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+ padding: 12px 16px;
+ background-color: var(--surface-head);
+ border-bottom: 1px solid var(--line);
+}
+
+.card-title {
+ margin: 0;
+ color: var(--muted);
+ font-size: 12px;
+ font-weight: 600;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+}
+
+.count {
+ padding: 1px 8px;
+ background-color: var(--accent-soft);
+ border-radius: var(--radius);
+ color: var(--color-font3);
+ font-family: var(--font-mono);
+ font-size: 11.5px;
+ font-weight: 500;
+}
+
+/* ---------- Badges + flags ---------- */
+
+.badge {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ padding: 3px 10px;
+ background-color: var(--color3);
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius);
+ color: var(--color-font2);
+ font-size: 11.5px;
+ font-weight: 600;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ white-space: nowrap;
+}
+
+.badge-ok { background: rgba(52, 211, 153, 0.13); border-color: rgba(52, 211, 153, 0.4); color: #7BEBBC; }
+.badge-bad { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.4); color: #FFA3A3; }
+.badge-warn { background: rgba(245, 185, 65, 0.13); border-color: rgba(245, 185, 65, 0.4); color: #FFD479; }
+.badge-info { background: var(--accent-soft); border-color: rgba(76, 141, 255, 0.4); color: #8DB9FF; }
+.badge-muted { color: var(--muted); }
+
+.flag {
+ display: inline-block;
+ margin-left: 8px;
+ padding: 0 6px;
+ border-radius: var(--radius);
+ font-size: 10px;
+ font-weight: 700;
+ letter-spacing: 0.06em;
+ line-height: 16px;
+ text-transform: uppercase;
+ vertical-align: middle;
+ cursor: help;
+}
+
+.flag-error { background: rgba(248, 113, 113, 0.16); color: #FF9A9A; }
+.flag-frc { background: rgba(52, 211, 153, 0.15); color: #7BEBBC; }
+.flag-time { background: rgba(245, 185, 65, 0.16); color: #FFD479; }
+.flag-smp { background: rgba(251, 146, 60, 0.16); color: #FDBA74; }
+
+/* ---------- Messages ---------- */
+
+#content .banner {
+ display: flex;
+ align-items: flex-start;
+ gap: 12px;
+ margin-bottom: 18px;
+ padding: 12px 14px;
+ background-color: var(--color2);
+ border: 1px solid var(--line);
+ border-left: 3px solid currentColor;
+ border-radius: var(--radius);
+}
+
+#content .banner pre {
+ flex: 1;
+ margin: 0;
+ min-width: 0;
+ font-family: var(--font-mono);
+ font-size: 12.5px;
+ line-height: 1.55;
+ white-space: pre-wrap;
+ word-break: break-word;
+}
+
+#content .banner .banner-icon {
+ margin-top: 2px;
+}
+
+#content .banner-close {
+ padding: 2px 6px;
+ background: transparent;
+ border: 0;
+ border-radius: var(--radius);
+ color: var(--muted);
+ font-size: 14px;
+ cursor: pointer;
+}
+
+#content .banner-close:hover {
+ background-color: var(--surface-hover);
+ color: var(--color-font1);
+}
+
+#content .error-message { color: var(--bad); }
+#content .warning-message { color: var(--warn); }
+#content .status-message { color: var(--ok); }
+
+#toast {
+ position: fixed;
+ left: 50%;
+ bottom: 28px;
+ z-index: 80;
+ padding: 10px 16px;
+ background-color: var(--color3);
+ border: 1px solid var(--line-strong);
+ border-left: 3px solid var(--ok);
+ border-radius: var(--radius);
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
+ color: var(--color-font1);
+ font-size: 13px;
+ font-weight: 500;
+ opacity: 0;
+ pointer-events: none;
+ transform: translate(-50%, 8px);
+ transition: opacity 0.18s ease, transform 0.18s ease;
+}
+
+#toast.show {
+ opacity: 1;
+ transform: translate(-50%, 0);
+}
+
+/* ==========================================================================
+ Tables
+ ========================================================================== */
+
+#content table {
+ border-collapse: collapse;
+ line-height: 1.4;
+ font-size: 14px;
+}
+
+#content > table {
+ width: 100%;
+ background-color: var(--color2);
+ border: 1px solid var(--line);
+}
+
+.card > table {
width: 100%;
}
-#sidebar li:hover {
- background-color: #4C566A;
+#content .card {
+ overflow-x: auto;
}
-#sidebar .header {
- color: var(--color-font3);
- font-size: 1.1rem;
- pointer-events: none;
+#content th, #content td {
+ padding: 10px 14px;
+ text-align: left;
+ white-space: nowrap;
}
-#sidebar hr {
- border: 1px var(--color2) solid;
+#content td {
+ color: var(--color-font2);
+ border-bottom: 1px solid var(--line);
+ font-variant-numeric: tabular-nums;
}
-/* Table Striping, with overriding for the Table Header */
+.card table tr:last-child > td {
+ border-bottom: 0;
+}
+
+#content .numeric {
+ text-align: right;
+ font-variant-numeric: tabular-nums;
+}
+
+/* Table striping, with overriding for the table header */
#content .stripes tr:nth-child(odd):not(.table-header) {
background-color: var(--color1);
@@ -97,21 +569,13 @@ body, html, main{
}
#content .stripes th {
- background-color: #242933;
+ background-color: var(--surface-head);
}
-/* Tables that have hoverable table rows */
+/* Tables that have hoverable rows */
-#content .hoverable tr:nth-child(odd):hover:not(.table-header) {
- background-color: #434C5E;
-}
-
-#content .hoverable tr:nth-child(even):hover:not(.table-header) {
- background-color: #434C5E;
-}
-
-#content .hoverable tr:hover{
- background-color: var(--color1);
+#content .hoverable tr:hover:not(.table-header):not(.table-spacer):not(.table-spacer-small) {
+ background-color: var(--surface-hover);
}
/* Tables that are too long can wrap words */
@@ -122,204 +586,397 @@ body, html, main{
word-wrap: break-word;
}
-/* Things which enable a Cursor Pointer event */
-
#content .cursor {
cursor: pointer;
}
-/* Table Headers in General */
+/* Table headers */
#content .table-header th:first-child {
- border-top-left-radius: 12px;
-}
-
-#content .table-header th:last-child {
- border-top-right-radius: 12px;
+ border-left: 2px solid var(--accent);
}
#content .table-header th {
- color: var(--color-font3);
- font-weight: 400;
- background-color: #242933;
+ background-color: var(--surface-head);
+ border-bottom: 1px solid var(--line-strong);
+ color: var(--muted);
+ font-size: 11.5px;
+ font-weight: 600;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
}
#content .table-small-header th {
- color: var(--color-font3);
- font-size: small;
- background-color: #242933;
+ background-color: var(--surface-head);
+ color: var(--muted);
+ font-size: 11px;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
}
-/* Table Spacer for chaining Tables as a hack */
+/* Spacers (kept for templates that still chain tables) */
#content .table-spacer th, #content .table-spacer tr {
background-color: var(--color1);
- height: 1rem;
+ height: 1.25rem;
}
-#content .table-spacer-small th, #content .table-spacer-small tr {
- background-color: #242933;
- height: 0.4rem;
- padding: 0px;
+#content .table-spacer-small, #content .table-spacer-small td {
+ height: 6px;
+ padding: 0;
+ background-color: var(--surface-head);
+ border-bottom: 0;
}
-/* Generic Table CSS for all Tables */
-
-#content table {
- line-height: 96%;
- border-collapse: collapse;
+#content .empty-row td {
+ padding: 28px 14px;
+ color: var(--muted);
+ text-align: center;
+ white-space: normal;
}
-#content td {
- color: var(--color-font2);
- border-bottom: 1px #4C566A solid;
+/* ---------- Test list columns ---------- */
+
+#content .col-author a,
+#content .col-test a {
+ font-weight: 600;
}
-#content th, #content td {
- padding: 10px 12px 6px 12px;
+#content .col-engine {
+ color: var(--muted);
}
+#content .col-tc {
+ font-family: var(--font-mono);
+ font-size: 12.5px;
+}
+
+#content .col-date {
+ color: var(--muted);
+}
+
+/* ---------- Key / value tables (configuration, machines) ---------- */
+
+#content .test-config {
+ width: 100%;
+ font-size: 14px;
+}
+
+#content .test-config td.td-label {
+ width: 190px;
+ color: var(--muted);
+ font-size: 13px;
+ font-weight: 500;
+ vertical-align: top;
+ white-space: nowrap;
+}
+
+#content .test-config td:last-child {
+ color: var(--color-font1);
+}
+
+#content .test-config tr:hover td {
+ background-color: var(--surface-hover);
+}
+
+#content .branch_name {
+ font-style: normal;
+ font-family: var(--font-mono);
+ font-size: 0.92em;
+}
+
+td pre {
+ margin: 0;
+ padding: 0;
+ font-family: var(--font-mono);
+ font-size: 12.5px;
+}
+
+#content .active-highlight {
+ box-shadow: inset 3px 0 0 var(--accent);
+}
+
+#content .site-title {
+ color: var(--color-font1);
+}
+
+#content .default-network {
+ color: var(--color-font3);
+}
+
+#content .was-default-network {
+ color: var(--warn);
+}
+
+#content .non-default-network {
+ color: var(--muted);
+}
+
+#content .redlink {
+ color: var(--bad);
+}
+
+#content .icon-action {
+ color: var(--muted);
+ transition: color 0.15s ease;
+}
+
+#content a:hover .icon-action {
+ color: var(--color-font1);
+}
+
+#content .icon-danger {
+ color: #C25555;
+}
+
+#content a:hover .icon-danger {
+ color: var(--bad);
+}
+
+/* ==========================================================================
+ Buttons
+ ========================================================================== */
+
#content .anchor-container {
display: flex;
justify-content: space-between;
+ gap: 8px;
}
#content .anchor-container > .anchorbutton {
flex: 1;
- margin-right: 4px;
-}
-
-#content .anchor-container > .anchorbutton:last-child {
- margin-right: 0px;
}
#content .anchorbutton {
- border-radius: 4px;
- padding: 8px 0px 6px;
- border-color: transparent;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ margin: 0;
+ padding: 9px 14px;
+ border: 1px solid transparent;
+ border-radius: var(--radius);
+ -webkit-appearance: none;
+ appearance: none;
color: var(--color-font1);
- display: inline-block;
- text-align: center;
- transition: background-color 0.3s ease;
- font-family: "Courier Prime", serif;
+ font-family: var(--font-sans);
font-size: 13px;
+ font-weight: 600;
+ letter-spacing: 0.01em;
+ line-height: 1.2;
+ text-align: center;
cursor: pointer;
+ transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
-/* Buttons */
-#content .btn-blue {
- background-color: #6C63FF; /* modern indigo-blue */
- color: #ffffff;
-}
-#content .btn-blue:hover {
- background-color: #837BFF;
+#content .anchorbutton:active {
+ transform: translateY(1px);
}
-#content .btn-start {
- background-color: #34495E; /* unchanged navy-gray */
- color: #ffffff;
-}
-#content .btn-start:hover {
- background-color: #4A6278;
-}
+#content .btn-blue { background-color: var(--accent); color: #FFFFFF; }
+#content .btn-blue:hover { background-color: var(--accent-hover); }
-#content .btn-preset {
- background-color: #00B894; /* teal green */
- color: #ffffff;
-}
-#content .btn-preset:hover {
- background-color: #17DDB2;
-}
+#content .btn-start { background-color: var(--color3); border-color: var(--line-strong); color: var(--color-font1); }
+#content .btn-start:hover { background-color: #1E2635; border-color: #3A4862; }
-#content .btn-yellow {
- background-color: #F5B041; /* golden amber */
- color: #1F1400; /* dark brown for contrast */
-}
-#content .btn-yellow:hover {
- background-color: #FFC966;
-}
+#content .btn-preset { background-color: #14B88A; color: #031410; }
+#content .btn-preset:hover { background-color: #2DD4A3; }
-#content .btn-red {
- background-color: #E74C3C; /* soft red */
- color: #ffffff;
-}
-#content .btn-red:hover {
- background-color: #FF6B5E;
-}
+#content .btn-yellow { background-color: #F2B53C; color: #1A1200; }
+#content .btn-yellow:hover { background-color: #FFCB62; }
+
+#content .btn-red { background-color: #E5484D; color: #FFFFFF; }
+#content .btn-red:hover { background-color: #F2666B; }
#content .btn-disabled {
- background-color: #444;
- color: #999;
+ background-color: var(--color2);
+ border-color: var(--line);
+ color: #566074;
cursor: not-allowed;
}
+#content .btn-disabled:active {
+ transform: none;
+}
+
#content .copy-button {
- color: var(--color-font2);
- transition: color 0.2s ease-in-out;
+ color: var(--muted);
+ transition: color 0.15s ease;
}
#content .copy-button:hover {
- color: var(--color-font3);
+ color: var(--accent-hover);
cursor: pointer;
}
-/* Short StatBlock to show SPRT and Test Results */
+/* ==========================================================================
+ Stat blocks
+ ========================================================================== */
#content .statblock {
- font-size: 13px;
- color: black;
- line-height: 92%;
- background-color: #D8DEE9;
- font-family: "Courier New";
- border-radius: 4px;
- padding: 7px 10px 4px;
+ background-color: #1A2130;
+ box-shadow: inset 2px 0 0 #4A586F;
+ color: var(--color-font2);
+ font-family: var(--font-mono);
+ font-size: 12.5px;
+ font-weight: 500;
+ line-height: 1.3;
}
-#content .statblock-green {
- background-color: #24C486; /* balanced mint green */
- color: #101F1A; /* dark readable text */
-}
-
-#content .statblock-blue {
- background-color: #3FA9F5; /* modern soft blue */
- color: #0E1A26;
-}
-
-#content .statblock-yellow {
- background-color: #FFCB4A; /* golden yellow */
- color: #2B2300;
-}
-
-#content .statblock-red {
- background-color: #FF6B6B; /* soft crimson red */
- color: #2C0D0D;
-}
-
-
-#content .redlink {
- color: #BF616A;
-}
+#content .statblock-green { background-color: rgba(52, 211, 153, 0.13); box-shadow: inset 2px 0 0 #34D399; color: #7BEBBC; }
+#content .statblock-blue { background-color: rgba(76, 141, 255, 0.14); box-shadow: inset 2px 0 0 #4C8DFF; color: #8DB9FF; }
+#content .statblock-yellow { background-color: rgba(245, 185, 65, 0.13); box-shadow: inset 2px 0 0 #F5B941; color: #FFD479; }
+#content .statblock-red { background-color: rgba(248, 113, 113, 0.14); box-shadow: inset 2px 0 0 #F87171; color: #FFA3A3; }
/* Long StatBlock which we can copy */
#content .long-statblock {
- background-color: var(--color3);
+ margin: 0;
+ padding: 12px 14px;
+ overflow-x: auto;
+ background-color: var(--color1);
+ border: 1px solid var(--line);
+ border-left: 2px solid var(--accent);
+ border-radius: var(--radius);
color: var(--color-font2);
- border-radius: 4px;
- padding: 0.50rem 0.75rem;
+ font-family: var(--font-mono);
+ font-size: 12.5px;
+ line-height: 1.55;
}
+/* ==========================================================================
+ Workload view
+ ========================================================================== */
+
+#content .workload-container {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) 372px;
+ gap: 20px;
+ align-items: start;
+}
+
+#content .workload-container > .card {
+ margin-bottom: 0;
+}
+
+#content #config {
+ grid-column: 1;
+ grid-row: 1;
+}
+
+#content #actions {
+ grid-column: 2;
+ grid-row: 1 / span 2;
+ padding-bottom: 4px;
+}
+
+#content #parameters,
+#content #results {
+ grid-column: 1;
+}
+
+#content #parameters + #results {
+ grid-row: auto;
+}
+
+#content #results {
+ width: auto;
+}
+
+#content #actions > :not(.card-head) {
+ margin-left: 16px;
+ margin-right: 16px;
+}
+
+#content #actions > :not(.card-head):not(.diff-link):first-of-type {
+ margin-top: 16px;
+}
+
+#content #actions > .diff-link {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ margin-top: 16px;
+ padding: 10px 12px;
+ background-color: var(--color3);
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius);
+ color: var(--link);
+ font-weight: 600;
+ font-size: 13.5px;
+}
+
+#content #actions > .diff-link:hover {
+ border-color: var(--accent);
+}
+
+#content #actions > .anchor-container {
+ margin-top: 10px;
+}
+
+#content #actions > .anchor-container:first-of-type {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 8px;
+}
+
+#content #actions > .long-statblock {
+ margin-top: 16px;
+}
+
+#content #actions .section-label {
+ margin-top: 22px;
+ margin-bottom: 10px;
+ padding-top: 16px;
+ border-top: 1px solid var(--line);
+ color: var(--muted);
+ font-size: 11.5px;
+ font-weight: 600;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+}
+
+#content #actions .modify-form {
+ margin-bottom: 0;
+}
+
+#content #actions .modify-form .form {
+ display: block;
+ margin: 0;
+}
+
+#content #actions .modify-form .form > .col-full {
+ padding: 0;
+ background: transparent;
+ border: 0;
+}
+
+#content #actions .modify-form .row label {
+ flex-basis: 110px;
+}
+
+#content #actions .modify-form .anchorbutton {
+ width: 100%;
+ margin-top: 6px;
+}
+
+/* ---------- LLR history widget ---------- */
+
#content .llr-history-panel {
- margin: 0.5rem 0 0.75rem;
+ margin-top: 22px;
+ margin-bottom: 16px;
+ padding-top: 16px;
+ border-top: 1px solid var(--line);
}
#content .llr-history-loader {
- width: 372px;
+ width: 340px;
}
#content .llr-history-widget {
position: relative;
- width: 372px;
+ width: 340px;
z-index: 0;
}
@@ -334,7 +991,8 @@ body, html, main{
display: flex;
flex-direction: column;
justify-content: space-between;
- color: #A7B1C2;
+ color: var(--muted);
+ font-family: var(--font-mono);
font-size: 10px;
text-align: right;
padding: 0.35rem 0 1.6rem;
@@ -352,55 +1010,58 @@ body, html, main{
}
#content .llr-history-placeholder {
- width: 320px;
+ width: 288px;
height: 112px;
display: flex;
align-items: center;
justify-content: center;
- border-radius: 6px;
- border: 1px solid #4C566A;
- background: linear-gradient(135deg, #242933 0%, #2C3440 100%);
- color: #A7B1C2;
+ border-radius: var(--radius);
+ border: 1px solid var(--line-strong);
+ background: var(--color1);
+ color: var(--muted);
font-size: 0.72rem;
letter-spacing: 0.02em;
}
#content .llr-history-placeholder-error {
- color: #E07A7A;
+ color: var(--bad);
}
#content .llr-history-label {
- color: var(--color-font3);
- font-size: 0.85rem;
- margin-bottom: 0.2rem;
+ margin-bottom: 0.6rem;
+ color: var(--muted);
+ font-size: 11.5px;
+ font-weight: 600;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
}
#content .llr-history-graph {
display: block;
- width: 320px;
+ width: 288px;
height: 112px;
}
#content .llr-history-graph .llr-bg {
- fill: #242933;
- stroke: #4C566A;
+ fill: var(--color1);
+ stroke: var(--line-strong);
stroke-width: 1;
}
#content .llr-history-graph .llr-grid-line {
- stroke: rgba(236, 239, 244, 0.14);
+ stroke: rgba(197, 204, 217, 0.09);
stroke-width: 1;
}
#content .llr-history-graph .llr-boundary {
- stroke: #BF616A;
+ stroke: var(--bad);
stroke-width: 1;
stroke-dasharray: 4 3;
- opacity: 0.85;
+ opacity: 0.8;
}
#content .llr-history-graph .llr-zero {
- stroke: #81A1C1;
+ stroke: #6E7FA6;
stroke-width: 1;
opacity: 0.7;
}
@@ -413,35 +1074,31 @@ body, html, main{
stroke-linejoin: round;
}
-#content .llr-history-graph .llr-path-positive {
- stroke: #7BCB8B;
-}
-
-#content .llr-history-graph .llr-path-negative {
- stroke: #E07A7A;
-}
+#content .llr-history-graph .llr-path-positive { stroke: var(--ok); }
+#content .llr-history-graph .llr-path-negative { stroke: var(--bad); }
#content .llr-history-xaxis {
display: flex;
justify-content: space-between;
- color: #A7B1C2;
+ color: var(--muted);
+ font-family: var(--font-mono);
font-size: 10px;
padding: 0 0.2rem;
}
#content .llr-history-graph .llr-point {
- fill: #ECEFF4;
+ fill: var(--color-font1);
}
#content .llr-history-graph .llr-hover-line {
- stroke: #ECEFF4;
+ stroke: var(--color-font1);
stroke-width: 1;
stroke-dasharray: 2 2;
opacity: 0;
}
#content .llr-history-graph .llr-hover-point {
- fill: #ECEFF4;
+ fill: var(--color-font1);
stroke-width: 1.5;
opacity: 0;
}
@@ -451,13 +1108,8 @@ body, html, main{
opacity: 0.85;
}
-#content .llr-history-graph .llr-hover-point-positive {
- stroke: #7BCB8B;
-}
-
-#content .llr-history-graph .llr-hover-point-negative {
- stroke: #E07A7A;
-}
+#content .llr-history-graph .llr-hover-point-positive { stroke: var(--ok); }
+#content .llr-history-graph .llr-hover-point-negative { stroke: var(--bad); }
#content .llr-history-graph .llr-hitbox {
fill: transparent;
@@ -468,11 +1120,12 @@ body, html, main{
position: absolute;
left: 0;
top: 0;
- padding: 0.18rem 0.4rem 0.12rem;
- border-radius: 4px;
- background-color: rgba(36, 41, 51, 0.96);
- border: 1px solid #4C566A;
+ padding: 0.2rem 0.5rem 0.18rem;
+ border-radius: var(--radius);
+ background-color: rgba(11, 14, 20, 0.96);
+ border: 1px solid var(--line-strong);
color: var(--color-font1);
+ font-family: var(--font-mono);
font-size: 0.72rem;
pointer-events: none;
opacity: 0;
@@ -487,159 +1140,108 @@ body, html, main{
transform: translateY(0);
}
-/* Test Views */
+/* ==========================================================================
+ Responsive
+ ========================================================================== */
-#content #config {
- float: left;
+@media (max-width: 1100px) {
+
+ #content .workload-container {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ #content #config,
+ #content #actions,
+ #content #parameters,
+ #content #results {
+ grid-column: 1;
+ grid-row: auto;
+ }
+
+ #content #actions {
+ order: -1;
+ }
}
-#content #actions {
- float: left;
-}
+@media (max-width: 900px) {
-#content #results {
- display: inline-block;
- width: inherit;
-}
+ #sidebar-toggle {
+ display: inline-flex;
+ }
-#content .test-config {
- font-size: 1.0rem;
-}
+ #topbar {
+ padding: 0 14px;
+ }
-#content .test-config .td-label {
- color: var(--color-font1);
-}
+ #topbar .brand-sub,
+ #topbar .topbar-btn span {
+ display: none;
+ }
-/* ??? */
+ #topbar .topbar-btn {
+ padding: 0 11px;
+ }
-td pre {
- margin: 0px;
- padding: 0px;
-}
-
-#content .error-message {
- color: #BF616A;
-}
-
-#content .warning-message {
- color: #EBCB8B;
-}
-
-#content .status-message {
- color: #A3BE8C;
-}
-
-#content .site-title {
- color: var(--color-font3);
-}
-
-#content .default-network {
- color: var(--color-font3);
- transform: scale(1.10);
-}
-
-#content .was-default-network {
- color: #EBCB8B;
- transform: scale(0.90);
-}
-
-#content .non-default-network {
- color: var(--color-font1);
- transform: scale(0.70);
-}
-
-#content .numeric {
- text-align: right;
-}
-
-#content .branch_name {
- font-style: italic;
-}
-
-#content .active-highlight {
- border-left: 4px solid var(--color-font3);
-}
-
-/* Styles for screen widths less than 768px */
-@media (max-width: 767px) {
#sidebar {
- flex-basis: 100%;
position: fixed;
- top: 0;
+ top: var(--topbar-h);
bottom: 0;
- width: 100%;
- background-color: var(--color1);
- overflow-y: auto;
- transition: transform cubic-bezier(0.82, 0.08, 0.1, 0.93) 0.3s;
+ left: 0;
+ z-index: 50;
+ height: auto;
+ background-color: var(--color2);
transform: translateX(-100%);
- z-index: 30;
+ transition: transform 0.25s cubic-bezier(0.22, 0.8, 0.3, 1);
}
body.sidebar-open #sidebar {
transform: none;
+ box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
}
- #sidebar-toggle {
- display: flex;
- padding: 10px;
- color: var(--color-font1);
- background-color: transparent;
- border: none;
- position: relative;
- z-index: 21;
- font-size: 2.2rem;
+ #sidebar-backdrop {
+ position: fixed;
+ inset: var(--topbar-h) 0 0 0;
+ z-index: 45;
+ background: rgba(5, 7, 11, 0.6);
+ opacity: 0;
+ pointer-events: none;
+ transition: opacity 0.2s ease;
}
- #content-parent {
- height: auto;
- flex-grow: 0;
- flex-basis: 100%;
- padding: 0 8px;
- }
-
- #content {
- overflow-x: hidden;
- margin-top: 70px;
- }
-
- #content-header {
- display: flex;
- align-items: center;
- background-color: var(--color1);
- position: absolute;
- top: 0;
- left: 0;
- z-index: 20;
- }
-
- #content-header h2 {
- font-size: clamp(1.0rem, 4.8vw, 1.4rem);
- margin: 8px 0;
- }
-
- #content-header .site-title {
- white-space: break-spaces;
- }
-
- body {
- flex-direction: column;
+ body.sidebar-open #sidebar-backdrop {
+ display: block;
+ opacity: 1;
+ pointer-events: auto;
}
body.sidebar-open {
- position: fixed;
- overflow-y: hidden;
+ overflow: hidden;
}
- table {
+ #content-parent {
+ padding: 20px 14px 80px;
+ }
+
+ .page-title {
+ font-size: 21px;
+ }
+}
+
+@media (max-width: 767px) {
+
+ /* Plain tables scroll sideways instead of breaking the page */
+ #content table {
display: block;
overflow-x: auto;
}
- #content .wrappable:not(.workload-container .test-config) td {
- word-break: normal;
+ #content .card > table.test-config,
+ #content .card > table.stripes:not(.test-list) {
+ display: table;
}
- .workload-container {
+ #content .workload-container {
display: flex;
flex-direction: column;
}
@@ -650,16 +1252,66 @@ td pre {
z-index: 0;
}
- #content #actions {
- order: -1;
- margin: 0 0 1rem 0;
+ /* Test lists turn into stacked cards */
+ #content table.test-list,
+ #content table.test-list tbody,
+ #content table.test-list tr,
+ #content table.test-list td {
+ display: block;
+ width: 100%;
}
- #content #config {
- float: none;
+ #content table.test-list thead {
+ display: none;
+ }
+
+ #content table.test-list tr {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 4px 14px;
+ padding: 12px 14px;
+ border-bottom: 1px solid var(--line);
+ }
+
+ #content table.test-list tr:last-child {
+ border-bottom: 0;
+ }
+
+ #content table.test-list tr.table-spacer-small {
+ display: block;
+ height: 6px;
+ padding: 0;
+ }
+
+ #content table.test-list td {
+ width: auto;
+ padding: 0;
+ border: 0;
+ white-space: normal;
+ }
+
+ #content table.test-list td.col-date { order: 0; flex-basis: 100%; font-size: 12px; }
+ #content table.test-list td.col-test { order: 1; flex-basis: 100%; font-size: 15px; }
+ #content table.test-list td.col-author { order: 2; }
+ #content table.test-list td.col-engine { order: 3; }
+ #content table.test-list td.col-tc { order: 4; }
+ #content table.test-list td.col-diff { order: 5; margin-left: auto; }
+ #content table.test-list td.col-result { order: 6; flex-basis: 100%; margin-top: 6px; padding: 8px 10px; }
+
+ #content table.test-list td.empty-row,
+ #content table.test-list .empty-row td {
+ flex-basis: 100%;
+ text-align: center;
}
#content .long-statblock {
overflow-x: auto;
}
}
+
+@media (prefers-reduced-motion: reduce) {
+ * {
+ transition: none !important;
+ }
+}
diff --git a/OpenBench/static/ui.js b/OpenBench/static/ui.js
new file mode 100644
index 0000000..99494d1
--- /dev/null
+++ b/OpenBench/static/ui.js
@@ -0,0 +1,136 @@
+/* ==========================================================================
+ OpenBench - small UI helpers (progressive enhancement only).
+ Nothing here changes what the site does: it highlights the current page in
+ the navigation, closes the mobile menu, shows a toast after copying text and
+ lets message banners be dismissed.
+ ========================================================================== */
+
+(function () {
+ 'use strict';
+
+ function ready(fn) {
+ if (document.readyState !== 'loading')
+ fn();
+ else
+ document.addEventListener('DOMContentLoaded', fn);
+ }
+
+ function normalise(path) {
+ path = path.replace(/\/+$/, '');
+ return path === '' ? '/' : path;
+ }
+
+ /* ---------- Navigation: mark the link for the current page ---------- */
+
+ function highlightNavigation() {
+
+ var here = normalise(window.location.pathname);
+
+ // The front page is served from both / and /index
+ if (here === '/')
+ here = '/index';
+
+ var best = null;
+ var bestLength = -1;
+
+ document.querySelectorAll('#sidebar a[href^="/"]').forEach(function (link) {
+
+ var target = normalise(new URL(link.getAttribute('href'), window.location.origin).pathname);
+ var matches = here === target || here.indexOf(target + '/') === 0;
+
+ if (matches && target.length > bestLength) {
+ best = link;
+ bestLength = target.length;
+ }
+ });
+
+ if (best) {
+ best.classList.add('active');
+ best.setAttribute('aria-current', 'page');
+ }
+ }
+
+ /* ---------- Mobile navigation ---------- */
+
+ function setSidebar(open) {
+ document.body.classList.toggle('sidebar-open', open);
+ var toggle = document.getElementById('sidebar-toggle');
+ if (toggle)
+ toggle.setAttribute('aria-expanded', String(open));
+ }
+
+ function initSidebar() {
+
+ var backdrop = document.getElementById('sidebar-backdrop');
+ if (backdrop)
+ backdrop.addEventListener('click', function () { setSidebar(false); });
+
+ document.addEventListener('keydown', function (event) {
+ if (event.key === 'Escape')
+ setSidebar(false);
+ });
+
+ document.querySelectorAll('#sidebar a').forEach(function (link) {
+ link.addEventListener('click', function () { setSidebar(false); });
+ });
+ }
+
+ /* ---------- Toast ---------- */
+
+ var toastTimer = null;
+
+ function toast(message) {
+
+ var element = document.getElementById('toast');
+ if (!element)
+ return;
+
+ element.textContent = message;
+ element.classList.add('show');
+
+ window.clearTimeout(toastTimer);
+ toastTimer = window.setTimeout(function () {
+ element.classList.remove('show');
+ }, 1800);
+ }
+
+ // Give copy_text() (see copy_text.js) some visible feedback
+ function wrapCopyText() {
+
+ if (typeof window.copy_text !== 'function' || window.copy_text.wrapped)
+ return;
+
+ var original = window.copy_text;
+
+ window.copy_text = function () {
+ var result = original.apply(this, arguments);
+ toast('Copied to clipboard');
+ return result;
+ };
+
+ window.copy_text.wrapped = true;
+ }
+
+ /* ---------- Dismissible banners ---------- */
+
+ function initBanners() {
+ document.addEventListener('click', function (event) {
+
+ var button = event.target.closest('.banner-close');
+ if (!button)
+ return;
+
+ var banner = button.closest('.banner');
+ if (banner)
+ banner.remove();
+ });
+ }
+
+ ready(function () {
+ highlightNavigation();
+ initSidebar();
+ initBanners();
+ wrapCopyText();
+ });
+
+})();
diff --git a/OpenBench/static/workload.css b/OpenBench/static/workload.css
new file mode 100644
index 0000000..2a2e564
--- /dev/null
+++ b/OpenBench/static/workload.css
@@ -0,0 +1,124 @@
+/* ==========================================================================
+ OpenBench - workload page: LLR history graph
+ (the panel itself, its label and the placeholder are styled in style.css)
+ ========================================================================== */
+
+#content .llr-history-loader {
+ width: 100%;
+}
+
+#content .llr-history-placeholder {
+ width: 100%;
+ height: 124px;
+}
+
+#content .llrg-plot {
+ position: relative;
+ cursor: crosshair;
+ touch-action: pan-y;
+ user-select: none;
+ -webkit-user-select: none;
+}
+
+#content .llrg-plot:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 4px;
+}
+
+#content .llrg-svg {
+ display: block;
+ width: 100%;
+ height: auto;
+ overflow: visible;
+}
+
+.llrg-bg {
+ fill: var(--color1);
+ stroke: var(--line-strong);
+ stroke-width: 1;
+}
+
+.llrg-grid {
+ stroke: rgba(197, 204, 217, 0.09);
+ stroke-width: 1;
+ shape-rendering: crispEdges;
+}
+
+.llrg-zero {
+ stroke: #6E7FA6;
+ stroke-width: 1;
+ opacity: 0.7;
+}
+
+.llrg-bound {
+ stroke: var(--bad);
+ stroke-width: 1;
+ stroke-dasharray: 4 3;
+ opacity: 0.8;
+}
+
+.llrg-tick {
+ fill: var(--muted);
+ font: 500 10px var(--font-mono);
+}
+
+.llrg-line {
+ fill: none;
+ stroke-width: 2;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+}
+
+.llrg-line-pos { stroke: var(--ok); }
+.llrg-line-neg { stroke: var(--bad); }
+
+.llrg-hover-line {
+ stroke: var(--color-font1);
+ stroke-width: 1;
+ stroke-dasharray: 2 2;
+ opacity: 0;
+}
+
+.llrg-hover-dot {
+ fill: var(--color-font1);
+ stroke-width: 1.5;
+ opacity: 0;
+}
+
+.llrg-hover-line.active,
+.llrg-hover-dot.active {
+ opacity: 0.85;
+}
+
+.llrg-hover-dot.llrg-pos { stroke: var(--ok); }
+.llrg-hover-dot.llrg-neg { stroke: var(--bad); }
+
+#content .llrg-tip {
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 1;
+ padding: 0.2rem 0.5rem 0.18rem;
+ background-color: rgba(11, 14, 20, 0.96);
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius);
+ color: var(--color-font1);
+ font-family: var(--font-mono);
+ font-size: 0.72rem;
+ white-space: nowrap;
+ pointer-events: none;
+ opacity: 0;
+ transform: translateY(2px);
+ transition: opacity 0.12s ease, transform 0.12s ease;
+}
+
+#content .llrg-tip.active {
+ opacity: 1;
+ transform: translateY(0);
+}
+
+@media (prefers-reduced-motion: reduce) {
+ #content .llrg-tip {
+ transition: none;
+ }
+}
diff --git a/OpenBench/templatetags/mytags.py b/OpenBench/templatetags/mytags.py
index bd66498..dd90430 100644
--- a/OpenBench/templatetags/mytags.py
+++ b/OpenBench/templatetags/mytags.py
@@ -204,7 +204,7 @@ def machine_name(machine_id):
return machine.info['machine_name']
except: return 'None'
-def llr_history_graph(test, width=320, height=112):
+def _llr_history_graph_static(test, width=320, height=112):
if test.test_mode != 'SPRT':
return ''
@@ -407,6 +407,36 @@ def llr_history_graph(test, width=320, height=112):
return mark_safe(svg)
+def llr_history_graph(test):
+ """Data for the LLR history chart, which is drawn in the browser by llr_history.js"""
+
+ import html as _html
+ import json as _json
+ from django.utils.safestring import mark_safe as _mark_safe
+
+ if test.test_mode != 'SPRT':
+ return ''
+
+ history = [list(point) for point in OpenBench.utils.get_llr_history(test)]
+
+ # The line starts at the origin, and ends on the current state of the test
+ if not history or history[0][0] > 0:
+ history.insert(0, [0, 0.0, False])
+ if history[-1][0] != test.games or history[-1][1] != test.currentllr:
+ history.append([test.games, test.currentllr, False])
+
+ data = {
+ 'history' : [[int(p[0]), round(float(p[1]), 4), bool(p[2]) if len(p) > 2 else False] for p in history],
+ 'lower' : float(test.lowerllr),
+ 'upper' : float(test.upperllr),
+ 'current' : float(test.currentllr),
+ 'games' : int(test.games),
+ 'finished' : bool(test.finished),
+ }
+
+ payload = _html.escape(_json.dumps(data, separators=(',', ':')), quote=True)
+ return _mark_safe('
' % payload)
+
register = django.template.Library()
register.filter('oneDigitPrecision', oneDigitPrecision)
register.filter('twoDigitPrecision', twoDigitPrecision)
diff --git a/Templates/OpenBench/Blocks/pagebrowser.html b/Templates/OpenBench/Blocks/pagebrowser.html
index fba0a39..da27f82 100644
--- a/Templates/OpenBench/Blocks/pagebrowser.html
+++ b/Templates/OpenBench/Blocks/pagebrowser.html
@@ -1,7 +1,7 @@
-
+
+
diff --git a/Templates/OpenBench/Blocks/testhead.html b/Templates/OpenBench/Blocks/testhead.html
new file mode 100644
index 0000000..021b2f4
--- /dev/null
+++ b/Templates/OpenBench/Blocks/testhead.html
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Templates/OpenBench/Blocks/testsummary.html b/Templates/OpenBench/Blocks/testsummary.html
index fa80064..e8c637d 100644
--- a/Templates/OpenBench/Blocks/testsummary.html
+++ b/Templates/OpenBench/Blocks/testsummary.html
@@ -1,15 +1,15 @@
{% load mytags %}
-
{{test.author|capfirst|slice:":6"}} |
-
{{test.dev_engine}} |
-
+ | {{test.author|capfirst|slice:":6"}} |
+
{{test.dev_engine}} |
+
{{test|prettyDevName}}
- {% if test.error %} * {% endif %}
- {% if test|test_is_fischer %} * {% endif %}
+ {% if test.error %}crash{% endif %}
+ {% if test|test_is_fischer %}frc{% endif %}
|
-
diff |
-
+ | diff |
+
{{test.dev_time_control}}
- {% if test|test_is_time_odds %} * {% endif %}
- {% if test|test_is_smp_odds %} * {% endif %}
+ {% if test|test_is_time_odds %}time odds{% endif %}
+ {% if test|test_is_smp_odds %}thread odds{% endif %}
|
-
{{test|shortStatBlock|linebreaksbr}} |
+
{{test|shortStatBlock|linebreaksbr}} |
diff --git a/Templates/OpenBench/base.html b/Templates/OpenBench/base.html
index 972efd1..7a005d3 100644
--- a/Templates/OpenBench/base.html
+++ b/Templates/OpenBench/base.html
@@ -5,7 +5,10 @@
{% load static %}
+
+
+
@@ -15,14 +18,17 @@
-
-
+
+
+
RektBench
{% block scripts %}
{% endblock %}
+
+
-