LocalAI/core/http/react-ui
LocalAI [bot] f0cb02afb8
feat(usage): attribute Sources rows to user accounts in admin view (#9935)
The merged feature (#9920) let admins see per-API-key and per-source
totals but did not surface which user owned each key, and lumped
every user's Web UI traffic into a single global Web UI row. This
makes the admin Sources tab properly per-user attributable:

- KeyTotal gains UserID + UserName, populated from the snapshot the
  usage middleware already records. The by_key roll-up now groups by
  (api_key_id, api_key_name, user_id, user_name).
- New SourceTotals.ByUserSource roll-up groups (source, user_id,
  user_name) for sources without a key identity (web, legacy). Only
  populated on the admin path (includeLegacy=true); the non-admin
  endpoint stays unchanged for backwards compatibility.
- SourcesTable accepts showUserColumn={isAdmin}; admin view renders
  a User column, makes the search match user name/id, and expands
  Web UI / legacy pseudo-rows from the global aggregate to one row
  per user using by_user_source.

Refs: #9862

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-05-21 23:23:06 +02:00
..
e2e fix(react-ui/chat): stop wiping selection on every /api/operations poll (#9904) (#9917) 2026-05-21 12:17:51 +02:00
public/locales feat(usage): attribute Sources rows to user accounts in admin view (#9935) 2026-05-21 23:23:06 +02:00
scripts feat(react-ui): add multilingual (i18n) support (#9642) 2026-05-02 22:42:08 +02:00
src feat(usage): attribute Sources rows to user accounts in admin view (#9935) 2026-05-21 23:23:06 +02:00
bun.lock chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
eslint.config.js feat(ui): move to React for frontend (#8772) 2026-03-05 21:47:12 +01:00
i18next-parser.config.js feat(react-ui): add multilingual (i18n) support (#9642) 2026-05-02 22:42:08 +02:00
index.html chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
package-lock.json chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates (#9728) 2026-05-12 09:54:38 +02:00
package.json chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
playwright.config.js feat(ui, gallery): Show model backends and add searchable model/backend selector (#9060) 2026-03-18 21:14:41 +01:00
vite.config.js fix(ui): fix /app redirect 2026-03-05 21:43:46 +00:00