Skip to content

Commit f87ab25

Browse files
krrishdholakiatahaali-devjaswanth8888
authored
UI Updates (#8345)
* fix(.globals.css): revert .md hard set caused regression in invitation link display (and possibly other places) * Fix keys not showing on refresh for internal users (#8312) * [Bug] UI: Newly created key does not display on the View Key Page (#8039) - Fixed issue where all keys appeared blank for admin users. - Implemented filtering of data via team settings to ensure all keys are displayed correctly. * Fix: - Updated the validator to allow model editing when `keyTeam.team_alias === "Default Team"`. - Ensured other teams still follow the original validation rules. * - added some classes in global.css - added text wrap in output of request,response and metadata in index.tsx - fixed styles of table in table.tsx * - added full payload when we open single log entry - added Combined Info Card in index.tsx * fix: keys not showing on refresh for internal user * fixed user id passed as null when keyuser is you (#8271) * fix(user_dashboard.tsx): ensure non admin can't view other keys --------- Co-authored-by: Taha Ali <[email protected]> Co-authored-by: Jaswanth Karani <[email protected]>
1 parent e3aab50 commit f87ab25

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

Diff for: litellm/proxy/_experimental/out/onboarding.html

-1
This file was deleted.

Diff for: ui/litellm-dashboard/src/app/globals.css

-5
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,3 @@ body {
4242
.custom-border {
4343
border: 1px solid var(--neutral-border);
4444
}
45-
46-
.max-w-md {
47-
display: flex;
48-
max-width: 100px !important;
49-
}

Diff for: ui/litellm-dashboard/src/components/create_key_button.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ const CreateKey: React.FC<CreateKeyProps> = ({
159159

160160
message.info("Making API Call");
161161
setIsModalVisible(true);
162-
162+
163+
if(keyOwner === "you"){
164+
formValues.user_id = userID
165+
}
163166
// If it's a service account, add the service_account_id to the metadata
164167
if (keyOwner === "service_account") {
165168
// Parse existing metadata or create an empty object

Diff for: ui/litellm-dashboard/src/components/user_dashboard.tsx

+15-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,21 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
206206

207207
setUserSpendData(response["user_info"]);
208208
console.log(`userSpendData: ${JSON.stringify(userSpendData)}`)
209-
setKeys(response["keys"]); // Assuming this is the correct path to your data
209+
210+
// set keys for admin and users
211+
if (!response?.teams[0].keys) {
212+
setKeys(response["keys"]);
213+
} else {
214+
setKeys(
215+
response["keys"].concat(
216+
response.teams
217+
.filter((team: any) => userRole === "Admin" || team.user_id === userID)
218+
.flatMap((team: any) => team.keys)
219+
)
220+
);
221+
222+
}
223+
210224
const teamsArray = [...response["teams"]];
211225
if (teamsArray.length > 0) {
212226
console.log(`response['teams']: ${JSON.stringify(teamsArray)}`);

0 commit comments

Comments
 (0)