diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 7822bc61d8d..0cfc661ece5 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -5069,7 +5069,7 @@ async def global_spend_per_tea(): SUM(s.spend) AS total_spend FROM "LiteLLM_SpendLogs" s - JOIN + LEFT JOIN "LiteLLM_TeamTable" t ON s.team_id = t.team_id WHERE s."startTime" >= CURRENT_DATE - INTERVAL '30 days' @@ -5090,6 +5090,8 @@ async def global_spend_per_tea(): if row_date is None: continue team_alias = row["team_alias"] + if team_alias is None: + team_alias = "Unassigned" team_aliases.add(team_alias) if row_date in spend_by_date: # get the team_id for this entry @@ -5115,6 +5117,8 @@ async def global_spend_per_tea(): # only add first 10 elements to total_spend_per_team_ui if len(total_spend_per_team_ui) >= 10: break + if team_id is None: + team_id = "Unassigned" total_spend_per_team_ui.append( {"team_id": team_id, "total_spend": total_spend_per_team[team_id]} ) diff --git a/ui/litellm-dashboard/package-lock.json b/ui/litellm-dashboard/package-lock.json index 8d00e7a22bd..3bbf39e26f6 100644 --- a/ui/litellm-dashboard/package-lock.json +++ b/ui/litellm-dashboard/package-lock.json @@ -20,6 +20,7 @@ "next": "14.1.0", "openai": "^4.28.0", "react": "^18", + "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18", "react-markdown": "^9.0.1", "react-syntax-highlighter": "^15.5.0" @@ -6153,6 +6154,18 @@ "node": ">=0.10.0" } }, + "node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, "node_modules/react-day-picker": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.0.tgz", diff --git a/ui/litellm-dashboard/package.json b/ui/litellm-dashboard/package.json index 0e4a5d2dc2e..f140ba32958 100644 --- a/ui/litellm-dashboard/package.json +++ b/ui/litellm-dashboard/package.json @@ -21,6 +21,7 @@ "next": "14.1.0", "openai": "^4.28.0", "react": "^18", + "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18", "react-markdown": "^9.0.1", "react-syntax-highlighter": "^15.5.0" diff --git a/ui/litellm-dashboard/src/app/favicon.ico b/ui/litellm-dashboard/src/app/favicon.ico index 718d6fea483..88caa2b8315 100644 Binary files a/ui/litellm-dashboard/src/app/favicon.ico and b/ui/litellm-dashboard/src/app/favicon.ico differ diff --git a/ui/litellm-dashboard/src/app/layout.tsx b/ui/litellm-dashboard/src/app/layout.tsx index a04a0d66edc..2ddc028a1af 100644 --- a/ui/litellm-dashboard/src/app/layout.tsx +++ b/ui/litellm-dashboard/src/app/layout.tsx @@ -5,7 +5,7 @@ import "./globals.css"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "🚅 LiteLLM", + title: "LiteLLM Dashboard", description: "LiteLLM Proxy Admin UI", };