mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
fix(webui): keep charts consistent with the current selection
Chart and ranking fetches carry a request id, and a superseded response is dropped. Changing a selection clears the old data at once, so old numbers never show under new labels or units. The auto-refresh tick skips while a fetch is still in flight. "Loading..." shows only until the first result for a selection arrives. Dashboard polls do not overlap. Users in several groups are counted and searched in every group. The Models tab labels its windows as the current UTC bucket. Hour labels are marked UTC. The Members column sorts numerically. Target access shows "All groups" for null and "No groups" for []. The UI shows the server's own error message. Cost axis ticks use the currency formatter. npm run dev proxies /admin/api. Nine unused shadcn components are removed. admin_assets_gen.go is regenerated from the new build. Claude-Session: https://claude.ai/code/session_01V5jYJNxpDFdJkyyExpADrv
This commit is contained in:
@@ -303,8 +303,14 @@ export function formatLimits(limits: LimitsConfig | undefined): string {
|
||||
export function formatBucketLabel(bucket: string, window: HistoryWindow): string {
|
||||
switch (window) {
|
||||
case 'hour': {
|
||||
// bucketFor (limits.go) always buckets in UTC (t.UTC() before
|
||||
// formatting) — labeling the bare hour digits with no timezone reads
|
||||
// as local time to an operator outside UTC (14:xx local shows as
|
||||
// "12:00" for a UTC+2 reader). Explicit "UTC" suffix, not a
|
||||
// local-time conversion: day/month buckets are calendar dates with
|
||||
// no such ambiguity, so only the hour case needs this.
|
||||
const hour = bucket.slice(8, 10)
|
||||
return `${hour}:00`
|
||||
return `${hour}:00 UTC`
|
||||
}
|
||||
case 'day': {
|
||||
const year = Number(bucket.slice(0, 4))
|
||||
|
||||
Reference in New Issue
Block a user