diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html deleted file mode 100644 index 96cb2b9262..0000000000 --- a/litellm/proxy/_experimental/out/onboarding.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/src/app/globals.css b/ui/litellm-dashboard/src/app/globals.css index 8f82132a30..677ff05b86 100644 --- a/ui/litellm-dashboard/src/app/globals.css +++ b/ui/litellm-dashboard/src/app/globals.css @@ -42,8 +42,3 @@ body { .custom-border { border: 1px solid var(--neutral-border); } - -.max-w-md { - display: flex; - max-width: 100px !important; -} diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index 69a7f2027f..95ce38429d 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -159,7 +159,10 @@ const CreateKey: React.FC = ({ message.info("Making API Call"); setIsModalVisible(true); - + + if(keyOwner === "you"){ + formValues.user_id = userID + } // If it's a service account, add the service_account_id to the metadata if (keyOwner === "service_account") { // Parse existing metadata or create an empty object diff --git a/ui/litellm-dashboard/src/components/user_dashboard.tsx b/ui/litellm-dashboard/src/components/user_dashboard.tsx index 99c110e6c9..e43fe820a6 100644 --- a/ui/litellm-dashboard/src/components/user_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/user_dashboard.tsx @@ -206,7 +206,21 @@ const UserDashboard: React.FC = ({ setUserSpendData(response["user_info"]); console.log(`userSpendData: ${JSON.stringify(userSpendData)}`) - setKeys(response["keys"]); // Assuming this is the correct path to your data + + // set keys for admin and users + if (!response?.teams[0].keys) { + setKeys(response["keys"]); + } else { + setKeys( + response["keys"].concat( + response.teams + .filter((team: any) => userRole === "Admin" || team.user_id === userID) + .flatMap((team: any) => team.keys) + ) + ); + + } + const teamsArray = [...response["teams"]]; if (teamsArray.length > 0) { console.log(`response['teams']: ${JSON.stringify(teamsArray)}`);