mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-16 05:37:28 +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:
@@ -70,6 +70,18 @@ export function usageColumns(
|
||||
id: 'secondary',
|
||||
header: secondaryColumnLabel,
|
||||
accessorFn: secondaryValue,
|
||||
// 'alphanumeric' (not the default auto-detected sortingFn): this
|
||||
// column's value is a plain string everywhere EXCEPT the Groups
|
||||
// toolbar, where UsageView.vue passes memberCountOf — a numeric count
|
||||
// rendered as a string. TanStack's getAutoSortingFn only inspects
|
||||
// rows 11+ (flatRows.slice(10)) to decide numeric vs basic, so a
|
||||
// groups table with 10 or fewer rows silently fell back to `basic`
|
||||
// (plain a > b string comparison), sorting "10" before "9".
|
||||
// 'alphanumeric' handles both cases correctly regardless of row
|
||||
// count: numeric substrings compare numerically, and it degrades
|
||||
// gracefully for the plain-text group-name case (secondaryValue on
|
||||
// the Users table).
|
||||
sortingFn: 'alphanumeric',
|
||||
cell: ({ row }) => h('span', { class: 'text-muted-foreground' }, secondaryValue(row.original)),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user