diff --git a/ui/litellm-dashboard/.eslintrc.json b/ui/litellm-dashboard/.eslintrc.json index c7111b5ee79..b10717340cf 100644 --- a/ui/litellm-dashboard/.eslintrc.json +++ b/ui/litellm-dashboard/.eslintrc.json @@ -71,6 +71,7 @@ "src/components/prompts/prompt_editor_view/PromptEditorHeader.tsx", "src/components/prompts/prompt_editor_view/VersionHistorySidePanel.tsx", "src/app/(dashboard)/teams/components/TeamsTable/ModelsCell.tsx", + "src/app/(dashboard)/teams/components/TeamsTable/TeamsTable.tsx", "src/components/prompts/prompt_editor_view/conversation_panel/MessageBubble.tsx", "src/components/playground/chat_ui/SessionManagement.tsx", "src/components/playground/chat_ui/SearchResultsDisplay.tsx", diff --git a/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/TeamsTable.tsx b/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/TeamsTable.tsx index f881065d4ab..d459ea56289 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/TeamsTable.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/TeamsTable.tsx @@ -1,9 +1,26 @@ -import { Button, Icon, Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow, Text } from "@tremor/react"; -import { Tooltip } from "antd"; +// eslint-disable-next-line litellm-ui/no-banned-ui-imports +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeaderCell, + TableRow, +} from "@tremor/react"; +import { Button } from "@/components/ui/button"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { formatNumberWithCommas } from "@/utils/dataUtils"; -import { PencilAltIcon, TrashIcon } from "@heroicons/react/outline"; +import { Pencil, Trash2 } from "lucide-react"; import React from "react"; -import { type KeyResponse, Team } from "@/components/key_team_helpers/key_list"; +import { + type KeyResponse, + Team, +} from "@/components/key_team_helpers/key_list"; import { Member, Organization } from "@/components/networking"; import ModelsCell from "@/app/(dashboard)/teams/components/TeamsTable/ModelsCell"; import YourRoleCell from "@/app/(dashboard)/teams/components/TeamsTable/YourRoleCell/YourRoleCell"; @@ -61,8 +78,12 @@ const TeamsTable = ({ if (!currentOrg) return true; return team.organization_id === currentOrg.organization_id; }) - .sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()) - .map((team: any) => ( + .sort( + (a, b) => + new Date(b.created_at).getTime() - + new Date(a.created_at).getTime(), + ) + .map((team: Team) => (
- - - + + + + + + {team.team_id} + +
- {team.created_at ? new Date(team.created_at).toLocaleDateString() : "N/A"} + {team.created_at + ? new Date(team.created_at).toLocaleDateString() + : "N/A"} - {team["max_budget"] !== null && team["max_budget"] !== undefined ? team["max_budget"] : "No limit"} + {team["max_budget"] !== null && + team["max_budget"] !== undefined + ? team["max_budget"] + : "No limit"} {team.organization_id} - +
{perTeamInfo && team.team_id && perTeamInfo[team.team_id] && perTeamInfo[team.team_id].keys && perTeamInfo[team.team_id].keys.length}{" "} Keys - - +
+
{perTeamInfo && team.team_id && perTeamInfo[team.team_id] && perTeamInfo[team.team_id].team_info && - perTeamInfo[team.team_id].team_info.members_with_roles && - perTeamInfo[team.team_id].team_info.members_with_roles.length}{" "} + perTeamInfo[team.team_id].team_info + .members_with_roles && + perTeamInfo[team.team_id].team_info.members_with_roles + .length}{" "} Members - +
{userRole == "Admin" ? ( - <> - + + + ) : null}