Show the server's public IP with click to copy, and VPS network graphs

Cards show the VPS's public IP (PUBLIC_IP, else the default route's source address) instead of the
page's hostname; clicking the address copies it. VPS resources gets stacked download/upload graphs
of the last 5 minutes, kept server side.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
neil 2026-10-26 10:32:31 -07:00
parent cb9a6d1970
commit 3ae03160e8
No known key found for this signature in database
4 changed files with 93 additions and 5 deletions

View file

@ -80,7 +80,15 @@ a { color: var(--accent); }
.meter-label span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--bar); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--ok); transition: width .5s, background .5s; }
.net { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.net-meter { grid-column: 1 / -1; }
.graph { display: block; width: 100%; height: 24px; background: var(--bar); border-radius: 4px; }
.graph .line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.graph .area { stroke: none; opacity: .25; }
.graph.rx .line { stroke: var(--ok); }
.graph.rx .area { fill: var(--ok); }
.graph.tx .line { stroke: #79c0ff; }
.graph.tx .area { fill: #79c0ff; }
.graph-gap { margin-top: 8px; }
.section-title { margin: 24px 0 12px; }
.empty { color: var(--muted); text-align: center; padding: 24px; }
@ -94,6 +102,18 @@ a { color: var(--accent); }
.server-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.server-name { font-weight: 600; font-size: 16px; }
.server-meta { color: var(--muted); font-size: 13px; }
.copy-addr {
font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; border-radius: 0;
text-decoration: underline; text-underline-offset: 2px; cursor: pointer; position: relative;
}
.copy-addr::after {
content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
padding: 3px 8px; font-size: 12px; font-weight: normal; white-space: nowrap; pointer-events: none;
opacity: 0; transition: opacity .15s;
}
.copy-addr:hover::after, .copy-addr:focus-visible::after, .copy-addr[data-tip="Copied!"]::after,
.copy-addr[data-tip="Copy failed"]::after { opacity: 1; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; margin-left: 6px; vertical-align: 2px; }
.badge.online { color: var(--ok); }
.badge.starting { color: var(--warn); }