diff --git a/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts b/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts index d20c7f2ca46..a911bbb17c4 100644 --- a/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts +++ b/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts @@ -39,6 +39,7 @@ export const MIGRATED_E2E_PAGES: Record = { new_usage: "usage", agents: "agents", "router-settings": "router-settings", + users: "users", }; export const MIGRATED_E2E_SEGMENTS: string[] = [...new Set(Object.values(MIGRATED_E2E_PAGES))]; diff --git a/ui/litellm-dashboard/src/app/(dashboard)/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/page.tsx index a4574c876d7..2ef7839dadc 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/page.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/page.tsx @@ -13,7 +13,6 @@ import PassThroughSettings from "@/components/pass_through_settings"; import { SurveyPrompt, SurveyModal, ClaudeCodePrompt, ClaudeCodeModal } from "@/components/survey"; import Usage from "@/components/usage"; import UserDashboard from "@/components/user_dashboard"; -import ViewUserDashboard from "@/components/view_users"; import { useAuth } from "@/contexts/AuthContext"; import { buildLoginUrlWithReturn, @@ -323,16 +322,6 @@ function CreateKeyPageContent() { premiumUser={premiumUser} teams={teams} /> - ) : page == "users" ? ( - ) : page == "teams" ? ( + ); +} diff --git a/ui/litellm-dashboard/src/components/view_users.test.tsx b/ui/litellm-dashboard/src/components/view_users.test.tsx index c327d1efaa8..58c36911204 100644 --- a/ui/litellm-dashboard/src/components/view_users.test.tsx +++ b/ui/litellm-dashboard/src/components/view_users.test.tsx @@ -66,11 +66,9 @@ describe("ViewUserDashboard", () => { const defaultProps = { accessToken: "test-token", token: "test-token", - keys: null, userRole: "Admin", userID: "admin-user-id", teams: [], - setKeys: vi.fn(), }; beforeEach(() => { diff --git a/ui/litellm-dashboard/src/components/view_users.tsx b/ui/litellm-dashboard/src/components/view_users.tsx index b00ce8291df..8ed080753e2 100644 --- a/ui/litellm-dashboard/src/components/view_users.tsx +++ b/ui/litellm-dashboard/src/components/view_users.tsx @@ -34,11 +34,9 @@ const { Text, Title } = Typography; interface ViewUserDashboardProps { accessToken: string | null; token: string | null; - keys: any[] | null; userRole: string | null; userID: string | null; teams: any[] | null; - setKeys: React.Dispatch>; orgAdminOrgIds?: Array<{ organization_id: string; organization_alias: string }> | null; } diff --git a/ui/litellm-dashboard/src/utils/migratedPages.test.ts b/ui/litellm-dashboard/src/utils/migratedPages.test.ts index 5d59a0947d4..f2e0f4eb151 100644 --- a/ui/litellm-dashboard/src/utils/migratedPages.test.ts +++ b/ui/litellm-dashboard/src/utils/migratedPages.test.ts @@ -119,6 +119,13 @@ describe("migratedHref / legacyPageHref", () => { expect(MIGRATED_PAGES.agents).toBe("agents"); expect(MIGRATED_PAGES["router-settings"]).toBe("router-settings"); }); + + it("maps the users id to its route", async () => { + vi.doMock("@/components/networking", () => ({ serverRootPath: "/" })); + const { MIGRATED_PAGES } = await import("./migratedPages"); + + expect(MIGRATED_PAGES.users).toBe("users"); + }); }); describe("dev server (NODE_ENV=development)", () => { diff --git a/ui/litellm-dashboard/src/utils/migratedPages.ts b/ui/litellm-dashboard/src/utils/migratedPages.ts index d86188f5a4b..337018f6ec5 100644 --- a/ui/litellm-dashboard/src/utils/migratedPages.ts +++ b/ui/litellm-dashboard/src/utils/migratedPages.ts @@ -42,6 +42,7 @@ export const MIGRATED_PAGES: Record = { new_usage: "usage", agents: "agents", "router-settings": "router-settings", + users: "users", }; function uiBase(): string {