diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index eed406b59..d989f6d0f 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -660,7 +660,7 @@ export const teamListCall = async ( } const data = await response.json(); - console.log("API Response:", data); + console.log("/team/list API Response:", data); return data; // Handle success - you might want to update some state or UI based on the created key } catch (error) { diff --git a/ui/litellm-dashboard/src/components/teams.tsx b/ui/litellm-dashboard/src/components/teams.tsx index 6f7180f7f..04ab55efe 100644 --- a/ui/litellm-dashboard/src/components/teams.tsx +++ b/ui/litellm-dashboard/src/components/teams.tsx @@ -74,12 +74,6 @@ const Team: React.FC = ({ userRole, }) => { - if (teams && teams.length > 0) { - console.log(`Received teams: ${JSON.stringify(teams, null, 2)}`); - } else { - console.log("No teams received or teams array is empty."); - } - useEffect(() => { console.log(`inside useeffect - ${teams}`) if (teams === null && accessToken) { @@ -331,15 +325,15 @@ const Team: React.FC = ({ return; } - console.log("fetching team info:"); - let _team_id_to_info: Record = {}; - for (let i = 0; i < teams?.length; i++) { - let _team_id = teams[i].team_id; - const teamInfo = await teamInfoCall(accessToken, _team_id); - console.log("teamInfo response:", teamInfo); - if (teamInfo !== null) { - _team_id_to_info = { ..._team_id_to_info, [_team_id]: teamInfo }; + const teamList = await teamListCall(accessToken) + for (let i = 0; i < teamList.length; i++) { + let team = teamList[i]; + let _team_id = team.team_id; + + // Use the team info directly from the teamList + if (team !== null) { + _team_id_to_info = { ..._team_id_to_info, [_team_id]: team }; } } setPerTeamInfo(_team_id_to_info); @@ -417,7 +411,6 @@ const Team: React.FC = ({ console.error("Error creating the team:", error); } }; - console.log(`received teams ${JSON.stringify(teams)}`); return (