mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-29 14:04:46 +03:00
feat(dashboard): choose the time range of the overview charts (#7139)
Every overview chart gets the same range selector: 2m, 5m, 30m, 1h, 6h and 12h. The 2m default is the live trend the page already drew, one point per status poll, so nothing changes until a longer range is picked. A longer range is read from the server's stored rollups through the new GET /panel/api/server/overviewHistory/:bucket, which returns all eight overview series in one response, and is refreshed once per point, at most once a minute. A metric the host cannot report stays empty in a ranged window instead of drawing zeros, a range change clears the chart rather than showing the old range under the new label, and avg/peak labels keep their number order in RTL locales.
This commit is contained in:
@@ -99,6 +99,7 @@ var monitorScopeAllow = map[string]struct{}{
|
||||
"/server/status": {},
|
||||
"/server/cpuHistory/:bucket": {},
|
||||
"/server/history/:metric/:bucket": {},
|
||||
"/server/overviewHistory/:bucket": {},
|
||||
"/server/xrayMetricsState": {},
|
||||
"/server/xrayMetricsHistory/:metric/:bucket": {},
|
||||
"/server/xrayObservatory": {},
|
||||
|
||||
Reference in New Issue
Block a user