From 889004e3441105afe2164d4e800afb72e9ea980e Mon Sep 17 00:00:00 2001
From: tanjiro <56165694+NANDINI-star@users.noreply.github.com>
Date: Thu, 12 Jun 2025 13:04:55 +0900
Subject: [PATCH] trim created-by and user id values if they (#11488)
---
.../src/components/all_keys_table.tsx | 24 +++++++++++++------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/ui/litellm-dashboard/src/components/all_keys_table.tsx b/ui/litellm-dashboard/src/components/all_keys_table.tsx
index 57bc6ec8dc..ff48800879 100644
--- a/ui/litellm-dashboard/src/components/all_keys_table.tsx
+++ b/ui/litellm-dashboard/src/components/all_keys_table.tsx
@@ -295,11 +295,14 @@ export function AllKeysTable({
header: "User ID",
cell: (info) => {
const userId = info.getValue() as string;
- return userId ? (
-
- {userId.slice(0, 7)}...
-
- ) : "-";
+ if (userId.length > 15) {
+ return (
+
+ {userId.slice(0, 7)}...
+
+ );
+ }
+ return userId ? userId : "-";
},
},
{
@@ -316,8 +319,15 @@ export function AllKeysTable({
accessorKey: "created_by",
header: "Created By",
cell: (info) => {
- const value = info.getValue();
- return value ? value : "Unknown";
+ const value = info.getValue() as string;
+ if (value.length > 15) {
+ return (
+
+ {value.slice(0, 7)}...
+
+ );
+ }
+ return value;
},
},
{