From 8d5499bced3aedd20ef28c64bb99a22ddc547e70 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 24 Sep 2026 02:13:11 +0000 Subject: [PATCH] style(usage): prettier-format touched dashboard files Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../components/EntityUsage/EntityUsage.tsx | 3 +-- .../components/KeyActivityPanel.test.tsx | 18 +++++++++++++++--- .../UsagePage/components/KeyActivityPanel.tsx | 4 ++-- .../src/components/networking.tsx | 7 +------ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/EntityUsage.tsx b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/EntityUsage.tsx index 8277cd2df1f..53baba34059 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/EntityUsage.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/EntityUsage.tsx @@ -168,8 +168,7 @@ const EntityUsage: React.FC = ({ const spendData = loadedPages?.base === spendDataBase ? loadedPages.merged : spendDataBase; const apiKeyTruncation = getApiKeyTruncation(spendData.metadata?.api_key_limit, spendData.metadata?.total_api_keys); - const keyPageWindow = - accessToken && startTime && endTime ? { accessToken, startTime, endTime } : null; + const keyPageWindow = accessToken && startTime && endTime ? { accessToken, startTime, endTime } : null; const loadMoreKeys = aggregatedFetchFn && keyPageWindow && spendData.metadata?.next_cursor ? () => diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.test.tsx index 47a4bd19411..48dbe3937cf 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.test.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.test.tsx @@ -151,7 +151,11 @@ describe("KeyActivityPanel", () => { it("calls loadMoreKeys when the button is clicked", async () => { const loadMoreKeys = vi.fn<() => Promise>().mockResolvedValue(undefined); render( - , + , ); fireEvent.click(screen.getByRole("button", { name: "Load more keys" })); @@ -163,7 +167,11 @@ describe("KeyActivityPanel", () => { it("shows a pending status while loadMoreKeys is in flight", async () => { const loadMoreKeys = vi.fn<() => Promise>().mockReturnValue(new Promise(() => {})); render( - , + , ); fireEvent.click(screen.getByRole("button", { name: "Load more keys" })); @@ -175,7 +183,11 @@ describe("KeyActivityPanel", () => { it("reports a failed key page load", async () => { const loadMoreKeys = vi.fn<() => Promise>().mockRejectedValue(new Error("boom")); render( - , + , ); fireEvent.click(screen.getByRole("button", { name: "Load more keys" })); diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.tsx index f05a0c7c8a2..0a435b99ce6 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/KeyActivityPanel.tsx @@ -115,8 +115,8 @@ const KeyActivityPanel: React.FC = ({ )} {apiKeyTruncation !== undefined && ( - Only the {totalKeys.toLocaleString()} highest-spend keys of{" "} - {apiKeyTruncation.total.toLocaleString()} are loaded + Only the {totalKeys.toLocaleString()} highest-spend keys of {apiKeyTruncation.total.toLocaleString()} are + loaded )} {loadMoreKeys !== undefined && ( diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index f2c4c0c3258..804a3c5de7a 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -2525,12 +2525,7 @@ export const userDailyActivityAggregatedCall = async ( accessToken: string, startTime: Date, endTime: Date, - ...options: [ - userId?: string | null, - includeCurrentUtcDay?: boolean, - apiKey?: string | null, - cursor?: string | null, - ] + ...options: [userId?: string | null, includeCurrentUtcDay?: boolean, apiKey?: string | null, cursor?: string | null] ) => { /** * Get aggregated daily user activity (no pagination)