mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* fix(ui): use one label for sidebar and page title
The Models + Endpoints, Vector Stores, Cost Tracking and UI Theme pages
showed one name in the sidebar and another in the page header, each from
its own i18n key. Each header now reads the sidebar's shell.nav.items key,
and the page-specific title keys are dropped from en and zh-CN.
The models page is now "Model Management" in both places. The other three
keep their sidebar text ("Vector Stores", "Cost Tracking", "UI Theme").
The cost optimization description that pointed users at "Models +
Endpoints" now names "Model Management", and the e2e specs and fixtures
that clicked or asserted the old strings follow the new labels.
* test(ui): scope models heading lookup to the page header
The header breadcrumb is also an h1 and now reads "Model Management",
so the unscoped heading lookup in sidebar.spec matched two elements.
* fix(ui): keep page-owned title keys with matching values
Each page keeps its own title key instead of reading the sidebar's
shell.nav.items key. The four title keys are back in en and zh-CN with
values that match their sidebar labels: "Model Management", "Vector
Stores", "Cost Tracking" and "UI Theme", and the zh-CN equivalents.
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { Page } from "./pages";
|
|
|
|
/**
|
|
* Maps sidebar menu item labels to their corresponding page enum values.
|
|
* This mapping is for the admin role.
|
|
*/
|
|
export const menuLabelToPage: Record<string, Page> = {
|
|
"Virtual Keys": Page.ApiKeys,
|
|
Playground: Page.LlmPlayground,
|
|
Models: Page.Models,
|
|
"Model Management": Page.Models,
|
|
Usage: Page.NewUsage,
|
|
Teams: Page.Teams,
|
|
"Internal Users": Page.Users,
|
|
"Internal User": Page.Users, // Legacy label support
|
|
Organizations: Page.Organizations,
|
|
"AI Hub": Page.ModelHubTable,
|
|
"Model Hub": Page.ModelHubTable,
|
|
Logs: Page.Logs,
|
|
Guardrails: Page.Guardrails,
|
|
// Settings submenu items
|
|
"Router Settings": Page.RouterSettings,
|
|
"Logging & Alerts": Page.LoggingAndAlerts,
|
|
"Admin Settings": Page.AdminPanel,
|
|
"Cost Tracking": Page.CostTracking,
|
|
"UI Theme": Page.UiTheme,
|
|
// Experimental submenu items
|
|
"Response Cache": Page.Caching,
|
|
Caching: Page.Caching, // Legacy label support
|
|
Prompts: Page.Prompts,
|
|
Budgets: Page.Budgets,
|
|
"API Playground": Page.TransformRequest,
|
|
"Tag Management": Page.TagManagement,
|
|
// Tools submenu items
|
|
"MCP Servers": Page.McpServers,
|
|
"Vector Stores": Page.VectorStores,
|
|
};
|