From 8dbcecd25acca96594ef39f54edcdfaa8d39b94c Mon Sep 17 00:00:00 2001 From: Taha Ali <123803932+tahaali-dev@users.noreply.github.com> Date: Sun, 9 Feb 2025 12:37:59 +0530 Subject: [PATCH] Added search via email in the internal user tab (#6192) and fixed spacing & browser scaling issues (#6195) (#8388) * [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 * merge * add : search added in user tab and spacing fix --- .../src/components/view_users.tsx | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/ui/litellm-dashboard/src/components/view_users.tsx b/ui/litellm-dashboard/src/components/view_users.tsx index cb4af7c42d80..bdf425049aa0 100644 --- a/ui/litellm-dashboard/src/components/view_users.tsx +++ b/ui/litellm-dashboard/src/components/view_users.tsx @@ -79,6 +79,7 @@ const ViewUserDashboard: React.FC = ({ teams, setKeys, }) => { + const [searchTerm,setSearchTerm] = useState(); const [userListResponse, setUserListResponse] = useState(null); const [userData, setUserData] = useState(null); const [endUsers, setEndUsers] = useState(null); @@ -233,45 +234,54 @@ const ViewUserDashboard: React.FC = ({ return ( -
-
- Showing Page {currentPage } of {totalPages} -
-
- - +
); } return ( -
- - +
+

Internal Users

+
+ setSearchTerm(e.target.value)} + /> + - -
+ /> +
+
+ + - +
User ID @@ -284,7 +294,9 @@ const ViewUserDashboard: React.FC = ({ - {userData.map((user: any) => ( + {userData + ?.filter((user) => user?.user_email?.toLowerCase().includes(searchTerm?.toLowerCase() || '')) + ?.map((user: any) => ( {user.user_id || "-"} {user.user_email || "-"}