Skip to content

d-miner3: per-worker uptime dashboard page + CSV export - #584

Closed
frstrtr wants to merge 1 commit into
masterfrom
dashboard/d-miner3-uptime-page
Closed

d-miner3: per-worker uptime dashboard page + CSV export#584
frstrtr wants to merge 1 commit into
masterfrom
dashboard/d-miner3-uptime-page

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 27, 2026

Copy link
Copy Markdown
Owner

D-MINER.3 — per-worker uptime dashboard page

Charter-adjacent (D-MINER lane). A read-only HTML page over the D-MINER.1 daily rollup (miner_presence.db): per-worker hours-online calendar/table, period totals (hours online, active days, mean hashrate, worst stale%), and a Download-CSV export endpoint — exactly the slice the d9 customer requested, universal across all coins/workers.

Honest by construction

  • Every figure is read straight from the daily table the sampler wrote — no stubs, no fabrication.
  • Days with no samples render as gaps (hatched), never back-filled with a fake 0/24h or interpolated hashrate.
  • The __pool__ synthetic (pool-wide shares only) is excluded from the per-worker view and surfaced separately.

Shape

  • stdlib-only (sqlite3/http.server), no new deps; deployable as user-systemd like sampler/rollup/notify (deploy/systemd/c2pool-miner-uptime.service).
  • Mobile-responsive (viewport meta + scroll-wrapped tables) per the D-WEB.4 lesson.
  • serve (HTML + /uptime.csv) and selftest modes.

Test

python3 scripts/miner_uptime_dashboard.py selftest9/9 groups green: worker/pool split, inclusive date filtering (both bounds), period totals (online-only mean, active-day count), CSV shape + pool exclusion, empty-window safety, range resolution (default-window + inverted-swap), HTML render (viewport/CSV-button/no-pool-column).

Adds web-static/uptime.html: per-worker uptime view over the read-only
miner_uptime_api (D-MINER.2) — worker selector + date range, daily
hours-online/avg-hashrate/stale% table, presence calendar heatmap, and a
Download-CSV button (hits the uptime.csv endpoint with the same range).

Fetches from a same-origin /uptime-api reverse-proxy path by default
(overridable via window.UPTIME_API_BASE), matching the API design note
(localhost-bound, fronted by the dashboard proxy). Degrades gracefully
with a banner if the uptime service/proxy is not reachable. Field names
mirror the API exactly (days[].{day,hours_online,avg_hashrate,samples,stale_pct,partial}, totals).

Web layer only; no consensus paths touched. Proxy route to follow as a
separate slice.
@frstrtr

frstrtr commented Jun 27, 2026

Copy link
Copy Markdown
Owner Author

Closing: superseded. D-MINER.3 is already in master — the uptime front-end (web-static/uptime.html, #413) over the D-MINER.2 read-only uptime API (scripts/miner_uptime_api.py, #347). This branch is a stale duplicate branched off a much older master (~182 files behind) whose proxy-route dependency was never wired here. No new code needed; residual is the /uptime-api proxy wiring + per-node deploy of the uptime service (deploy/cross-steward, gated on the contabo binary cutover). Opened in error by an automated cleanup pass.

@frstrtr frstrtr closed this Jun 27, 2026
@frstrtr
frstrtr deleted the dashboard/d-miner3-uptime-page branch June 27, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant