Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Updates #8345

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion litellm/proxy/_experimental/out/onboarding.html

This file was deleted.

5 changes: 0 additions & 5 deletions ui/litellm-dashboard/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,3 @@ body {
.custom-border {
border: 1px solid var(--neutral-border);
}

.max-w-md {
display: flex;
max-width: 100px !important;
}
5 changes: 4 additions & 1 deletion ui/litellm-dashboard/src/components/create_key_button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ const CreateKey: React.FC<CreateKeyProps> = ({

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
Expand Down
16 changes: 15 additions & 1 deletion ui/litellm-dashboard/src/components/user_dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,21 @@ const UserDashboard: React.FC<UserDashboardProps> = ({

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)}`);
Expand Down