Add per-worker stats page with cumulative work and luck

Expose ckpool's per-worker cumulative shares via patch 0004, add a
WorkerDetailPage with hashrate, status, best share with per-worker luck
(bestever/shares*100), and total work with pool share percentage.
Worker names are now clickable in MinersTable and UserDetailPage.
Also centers numeric columns below their headers.
This commit is contained in:
satoshi
2026-05-10 18:02:08 +03:00
parent 35ee3208b6
commit e622f1a81a
9 changed files with 458 additions and 27 deletions
+24 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { snap } from "../stores/snapshot.svelte";
import { selection, clearSelection } from "../stores/selection.svelte";
import { selection, clearSelection, selectWorker } from "../stores/selection.svelte";
import {
formatHashrate,
formatDifficulty,
@@ -223,7 +223,12 @@
<tr class:offline={!r.online} class:idle={r.idle}>
<td>
<div class="wname mono">
{r.worker}
<button
type="button"
class="worker-btn"
onclick={() => selectWorker(r.worker)}
title="View per-worker stats"
>{r.worker}</button>
{#if r.tls}
<span class="badge tls" title="Connected via TLS">
<svg viewBox="0 0 16 16" aria-hidden="true">
@@ -350,6 +355,23 @@
gap: 0.4em;
flex-wrap: wrap;
}
.worker-btn {
font: inherit;
color: inherit;
background: transparent;
border: none;
padding: 0;
cursor: pointer;
text-align: left;
border-bottom: 1px dashed transparent;
transition: color 0.15s, border-bottom-color 0.15s;
}
.worker-btn:hover,
.worker-btn:focus-visible {
color: var(--accent);
border-bottom-color: var(--accent);
outline: none;
}
.src-ip {
color: var(--fg-dim);
font-size: 0.75em;