3x-ui/web
MHSanaei 8cd97654f2
feat(stats): system history modal + per-node CPU/Mem trends across all locales
Backend
- web/service/metric_history.go: generic in-memory ring buffer with two
  singletons — system-wide (cpu/mem/netUp/netDown/online/load1/5/15)
  and per-node (cpu/mem) keyed by node id
- ServerService.AppendStatusSample writes all 8 metrics every 2s on the
  same tick; AppendCpuSample/AggregateCpuHistory kept for back-compat
- NodeService.UpdateHeartbeat appends cpu/mem only on online ticks so
  offline gaps render as missing data, not phantom dips
- New routes: GET /panel/api/server/history/:metric/:bucket and
  GET /panel/api/nodes/history/:id/:metric/:bucket, both whitelisted

Frontend
- Sparkline component generalized: arbitrary value range (auto-scale
  when valueMax=null), pluggable yFormatter/tooltipFormatter for B/s,
  client counts, load averages
- SystemHistoryModal replaces CpuHistoryModal with tabs for every
  metric; opened from a tag on the 3X-UI card next to Documentation
- NodeHistoryPanel: expandable row on the Nodes table showing per-node
  CPU and Mem trends, refreshed every 15s

Localization
- Backfill systemHistoryTitle / trendLast2Min / pages.inbounds.{node,
  deployTo, localPanel} and the entire pages.nodes block (51 keys
  including statusValues + toasts) into all 11 non-en/fa locales:
  ar-EG, es-ES, id-ID, ja-JP, pt-BR, ru-RU, tr-TR, uk-UA, vi-VN,
  zh-CN, zh-TW

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 16:24:57 +02:00
..
controller feat(stats): system history modal + per-node CPU/Mem trends across all locales 2026-05-09 16:24:57 +02:00
entity feat: add configurable auto-restart on client auto-disable 2026-05-04 23:19:25 +02:00
global Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
job feat(nodes): multi-node panel orchestration (CRUD, deployment, traffic sync, sub per-node) 2026-05-09 15:25:29 +02:00
locale i18n: collapse two translation databases into a single web/translation/<lang>.json set 2026-05-08 18:05:56 +02:00
middleware feat(nodes): multi-node panel orchestration (CRUD, deployment, traffic sync, sub per-node) 2026-05-09 15:25:29 +02:00
network docs: add comments for all functions 2025-09-20 09:35:50 +02:00
runtime feat(nodes): multi-node panel orchestration (CRUD, deployment, traffic sync, sub per-node) 2026-05-09 15:25:29 +02:00
service feat(stats): system history modal + per-node CPU/Mem trends across all locales 2026-05-09 16:24:57 +02:00
session feat(nodes): multi-node panel orchestration (CRUD, deployment, traffic sync, sub per-node) 2026-05-09 15:25:29 +02:00
translation feat(stats): system history modal + per-node CPU/Mem trends across all locales 2026-05-09 16:24:57 +02:00
websocket ws/inbounds: realtime fixes + perf for 10k+ client inbounds (#4123) 2026-05-05 17:27:49 +02:00
web.go feat(nodes): multi-node panel orchestration (CRUD, deployment, traffic sync, sub per-node) 2026-05-09 15:25:29 +02:00