The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
feat(ui): link the Organization cell on the Virtual Keys page too
ryan-crabbe-berri5ea2f9698295
diff --git a/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx b/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsxindex 57786d71c66..c303dba697b 100644--- a/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx+++ b/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx@@ -476,12 +476,14 @@ it("should display 'Default Proxy Admin' for user_id when value is 'default_userdescribe("entity links out of the key rows", () => {const keyRow = async () => (await screen.findByText("Test Key Alias")).closest("tr") as HTMLElement;- const enableCreatedByColumn = async (user: ReturnType<typeof userEvent.setup>) => {+ const enableColumn = async (user: ReturnType<typeof userEvent.setup>, title: string) => {await user.click(screen.getByRole("button", { name: "Columns" }));- await user.click(await screen.findByText("Created By"));+ await user.click(await screen.findByText(title));await user.keyboard("{Escape}");};+ const enableCreatedByColumn = (user: ReturnType<typeof userEvent.setup>) => enableColumn(user, "Created By");+it("points the User and Team cells at their detail pages", async () => {renderWithProviders(<VirtualKeysTable />);@@ -493,6 +495,19 @@ describe("entity links out of the key rows", () => {expect(within(row).getByRole("link", { name: "Test Team" })).toHaveAttribute("href", "/ui/teams?team=team-1");});+ it("points the Organization cell at the org's detail page", async () => {+ mockUseKeys.mockReturnValue(keysResult([{ ...mockKey, org_id: "org-1" }]));+ const user = userEvent.setup();+ renderWithProviders(<VirtualKeysTable />);+ await enableColumn(user, "Organization");++ const row = await keyRow();+ expect(within(row).getByRole("link", { name: "Test Organization" })).toHaveAttribute(+ "href",+ "/ui/organizations?org=org-1",+ );+ });+it("points the Created By cell at the creator's detail page", async () => {mockUseKeys.mockReturnValue(keysResult([diff --git a/ui/litellm-dashboard/src/components/VirtualKeysPage/keyTableColumns.tsx b/ui/litellm-dashboard/src/components/VirtualKeysPage/keyTableColumns.tsxindex c87bc90fb47..9dd4b1c2d59 100644--- a/ui/litellm-dashboard/src/components/VirtualKeysPage/keyTableColumns.tsx+++ b/ui/litellm-dashboard/src/components/VirtualKeysPage/keyTableColumns.tsx@@ -16,7 +16,7 @@ import {StatusBadge,type StatusTone,} from "@/components/shared/table_cells";-import { teamDetailHref, userDetailHref } from "@/utils/entityLinks";+import { orgDetailHref, teamDetailHref, userDetailHref } from "@/utils/entityLinks";import { DEFAULT_PROXY_ADMIN_USER_ID } from "@/utils/sentinels";import DefaultProxyAdminTag from "../common_components/DefaultProxyAdminTag";@@ -218,12 +218,12 @@ export const getKeyTableColumns = ({const orgId = info.getValue() as string | null;if (!orgId) return "-";const org = organizations.find((o) => o.organization_id === orgId);- const displayValue = org?.organization_alias || orgId;- const width = info.cell.column.getSize();return (- <span className="font-mono text-xs truncate block" style={{ maxWidth: width, overflow: "hidden" }}>- {displayValue}- </span>+ <IdentityCell+ title={org?.organization_alias || orgId}+ titleClassName={ENTITY_CELL_TITLE_CLASSES}+ href={orgDetailHref(orgId)}+ />);},},