From 8eccc787ba1b94488765dd2ce77c120f59f7ce5d Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Mon, 19 May 2025 20:27:46 -0700 Subject: [PATCH] Enable key reassignment on UI + Show 'updated at' column for key in all keys table (#10960) * feat(key_edit_view.tsx): initial commit enabling reassigning keys to teams * style(key_edit_view.tsx): cleaner implementation with teams in dropdown * fix(all_keys_table.tsx): set max width to keys column * feat(all_keys_table.tsx): show last updated at column for key --- litellm/proxy/_experimental/out/onboarding.html | 1 - .../src/components/all_keys_table.tsx | 15 ++++++++++++++- .../src/components/key_edit_view.tsx | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) delete mode 100644 litellm/proxy/_experimental/out/onboarding.html diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html deleted file mode 100644 index 51a7ab12d8d..00000000000 --- 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/components/all_keys_table.tsx b/ui/litellm-dashboard/src/components/all_keys_table.tsx index 6812bb15df8..22a348578c5 100644 --- a/ui/litellm-dashboard/src/components/all_keys_table.tsx +++ b/ui/litellm-dashboard/src/components/all_keys_table.tsx @@ -276,7 +276,11 @@ export function AllKeysTable({ cell: (info) => { const userId = info.getValue() as string; const user = userList.find(u => u.user_id === userId); - return user?.user_email ? user.user_email : "-"; + return user?.user_email ? ( + + {user?.user_email.slice(0, 20)}... + + ) : "-"; }, }, { @@ -310,6 +314,15 @@ export function AllKeysTable({ return value ? value : "Unknown"; }, }, + { + id: "updated_at", + accessorKey: "updated_at", + header: "Updated At", + cell: (info) => { + const value = info.getValue(); + return value ? new Date(value as string).toLocaleDateString() : "Never"; + }, + }, { id: "expires", accessorKey: "expires", diff --git a/ui/litellm-dashboard/src/components/key_edit_view.tsx b/ui/litellm-dashboard/src/components/key_edit_view.tsx index fad03700bf2..2c7e3d30d1e 100644 --- a/ui/litellm-dashboard/src/components/key_edit_view.tsx +++ b/ui/litellm-dashboard/src/components/key_edit_view.tsx @@ -169,6 +169,20 @@ export function KeyEditView({ + + + + {/* Hidden form field for token */}