mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-19 05:47:48 +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:
@@ -32,6 +32,24 @@ export default defineConfig({
|
||||
// polyfill has nothing to do here anyway.
|
||||
modulePreload: { polyfill: false },
|
||||
},
|
||||
server: {
|
||||
// `npm run dev` serves this app at :5173 (or whatever Vite picks), but
|
||||
// every fetch('/admin/api/...') (lib/api.ts) is a same-origin, relative
|
||||
// path — without a proxy it hits Vite itself, which has no such route
|
||||
// and answers with a 404 or the index.html SPA fallback, so the dev
|
||||
// build can never actually load data. Proxying just the API path (not
|
||||
// '/admin' itself) leaves Vite serving this project's own index.html/
|
||||
// HMR client at '/admin/' as usual. The target is env-configurable
|
||||
// (ADMIN_API_PROXY_TARGET) rather than hardcoded, since which gateway
|
||||
// instance a developer is pointed at varies by machine; the fallback
|
||||
// matches this repo's own `run-local`/integration default port.
|
||||
proxy: {
|
||||
'/admin/api': {
|
||||
target: process.env.ADMIN_API_PROXY_TARGET ?? 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
// Deliberately narrow: lib/'s pure modules (search-expand.ts,
|
||||
// usage-search.ts) plus, since review round 2 (v0.21), stores/
|
||||
|
||||
Reference in New Issue
Block a user