feat(web): Calm modern redesign, overview, shell charts #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "thelion/ui-calm-modern"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
New design across the app; Overview home (/) with charts, queue at /queue; account page Problems summary; shell 24h charts from VictoriaMetrics; GET /api/overview, /api/requests/{id}/shell-metrics; migration 000021 abuse_scans.
The new home page reads GET /api/overview and polls it every minute while the tab is visible: a greeting line, four stat tiles with deltas from the API series, "Needs attention" from attention[] (Suspend posts to the item's endpoint after a two-click confirm; Review opens the account), a fold for lower-severity flags, shells health (segmented bar, per-shell cells with tooltips, problem rows, healthy fold), open flags per scan, sign-ups per day, a compact sign-up queue, IDS alerts per hour with the latest alerts, and activity. Degraded states are said plainly: per-section errors{} lines, shellsd or the IDS unavailable, an incomplete IDS read (a lower bound), and an empty perScan ("collecting history, fills in over ~5h"). The queue now lives at /queue. Old links keep working: /?q=… and the other queue filters redirect there, and the mail page, the palette's queue search and the request page's back link point at /queue. The queue also reads ?status=. The sidebar highlights Overview on / and Queue on /queue and the request pages, and the ⌘K palette's "Needs you" group is filled from attention[]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>GET /api/requests/{id}/shell-metrics?range=1h|6h|24h|7d returns memory (% of limits.memory, used bytes, limit), CPU (% of one core) and network in/out (bytes/s) for the account's shell, from the VictoriaMetrics that already scrapes the shells host's Incus exporter. Points sit on a fixed grid of 241-289 steps with null gaps; a shell with no samples gets empty arrays and a reason per chart. Results are cached per (shell, range) for 60s, and partial failures are reported in errors without being cached. All three come from Incus (scraped from outside the container): its memory matches shell-details' usage, its cgroup CPU accounting is exact where telegraf's lxcfs view runs several times high, and owners can't stop or edit it. VICTORIAMETRICS_URL turns it on (docker-compose: http://victoriametrics:8428). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>The sign-up similarity panel from main becomes a Card in the account page layout (left column for sign-ups without a shell, under Reputation otherwise): strength and status chips with words, reasons labelled strong/medium/weak, tinted rows for banned matches, the legend and the Recheck button kept. The page loads the report so the Problems summary can read it: every match with a banned account is also a ProblemRow (strong: bad, medium: warn) linking to the banned account and to the card; otherwise "Similar accounts" joins the Healthy line. The Shell card gets a ShellMetrics stub where the 24h memory, CPU and network charts from GET /api/requests/{id}/shell-metrics will go; it renders nothing until it is given data. AccountMail's buttons use the G stroke icons instead of glyphs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>The Shell card now shows memory, CPU and network for the account's shell from GET /api/requests/{id}/shell-metrics, as three small multiples (TimeChart) on one linked crosshair with a 1h / 6h / 24h / 7d switch (24h by default) that refetches. Memory is % of the limit with the used bytes in the tooltip, captioned "incl. cache" (Incus counts page cache, so near 100% is normal) and with no warn line; CPU is % of one core; network is in and out in B/s. Per-chart errors show as a quiet line, and a 404 or 503 (VICTORIAMETRICS_URL not set) means no charts at all. The page loads the metrics like its other panels and refreshes them with the shell. TimeChart gains `gaps` (null values break lines and areas instead of dropping to 0) and time ticks for sub-2h and multi-day spans. Memory in the Problems list and the Shell card's meter now warns at 92% and is only "bad" at 98% when the shell also uses at least 256 MB of swap (cache alone never swaps); the why-line says "incl. page cache". Idle shells sit at 42-51% and a busy one can read 99% with ~87 MB really used, so 65% / 85% flagged healthy shells. Disk thresholds are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.