Live page: the speed of every peer right now
A new Live page shows current download and upload per peer, updated every 2 seconds, with the last 2 minutes as a chart and a small chart per peer. The server reads the WireGuard counters every 2 seconds and keeps 2 minutes in memory; GET /api/v1/live serves them, with since= for only the newer steps. The dev simulator now adds traffic in proportion to the time between samples.
This commit is contained in:
@@ -381,3 +381,26 @@ dialog::backdrop { background: rgba(22, 23, 26, .55); }
|
||||
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
|
||||
.saves { font-size: 12px; color: var(--ink-3); }
|
||||
pre.log.tall { max-height: calc(100vh - 260px); min-height: 420px; }
|
||||
|
||||
/* live */
|
||||
.livenow { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 14px; }
|
||||
.livenow .k { font-size: 13px; color: var(--ink-2); }
|
||||
.livenow .v { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; font-variant-numeric: tabular-nums; }
|
||||
.livenow .v small { font-size: 16px; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
|
||||
.chart .larea { fill: var(--down); opacity: .15; }
|
||||
.chart .ldown, .chart .lup { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
|
||||
.chart .ldown { stroke: var(--down); }
|
||||
.chart .lup { stroke: var(--up); }
|
||||
.xaxis.lx span:first-child { transform: none; }
|
||||
.xaxis.lx span:last-child { transform: translateX(-100%); }
|
||||
.spark.wide { width: 96px; }
|
||||
.spark .fill { fill: var(--down); opacity: .15; stroke: none; }
|
||||
tr.idle td { color: var(--ink-3); }
|
||||
tr.idle .spark polyline { stroke: var(--ink-3); }
|
||||
tr.idle .spark .fill { fill: var(--ink-3); }
|
||||
td .mono, td.num .mono { font-variant-numeric: tabular-nums; }
|
||||
.liveoff { margin: 0; padding: 12px; font-size: 13px; color: var(--ink-3); }
|
||||
.livesub { display: flex; align-items: center; gap: 6px; }
|
||||
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
|
||||
@keyframes pulse { 50% { opacity: .35; } }
|
||||
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } }
|
||||
|
||||
Reference in New Issue
Block a user