mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
Merge 2a0ab66f2b into b1fcdb671b
This commit is contained in:
commit
0595bb0b92
6 changed files with 9 additions and 9 deletions
|
|
@ -120,7 +120,7 @@ const ModelsAndEndpointsView: React.FC<ModelDashboardProps> = ({ premiumUser, te
|
|||
|
||||
const getProviderFromModel = (model: string) => {
|
||||
if (modelCostMapData !== null && modelCostMapData !== undefined) {
|
||||
if (typeof modelCostMapData == "object" && model in modelCostMapData) {
|
||||
if (typeof modelCostMapData === "object" && model in modelCostMapData) {
|
||||
return modelCostMapData[model]["litellm_provider"];
|
||||
}
|
||||
}
|
||||
|
|
@ -251,7 +251,7 @@ const ModelsAndEndpointsView: React.FC<ModelDashboardProps> = ({ premiumUser, te
|
|||
|
||||
const isLoading = isLoadingModels || isLoadingModelCostMap || isLoadingCredentials || isLoadingUISettings;
|
||||
|
||||
if (userRole && userRole == "Admin Viewer") {
|
||||
if (userRole && userRole === "Admin Viewer") {
|
||||
const { Title, Paragraph } = Typography;
|
||||
return (
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ const AllModelsTab = ({
|
|||
|
||||
const getProviderFromModel = (model: string) => {
|
||||
if (modelCostMapData !== null && modelCostMapData !== undefined) {
|
||||
if (typeof modelCostMapData == "object" && model in modelCostMapData) {
|
||||
if (typeof modelCostMapData === "object" && model in modelCostMapData) {
|
||||
return modelCostMapData[model]["litellm_provider"];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export const fetchTeams = async (
|
|||
currentOrg: Organization | null,
|
||||
) => {
|
||||
let givenTeams;
|
||||
if (userRole != "Admin" && userRole != "Admin Viewer") {
|
||||
if (userRole !== "Admin" && userRole !== "Admin Viewer") {
|
||||
givenTeams = await teamListCall(accessToken, currentOrg?.organization_id || null, userID);
|
||||
} else {
|
||||
givenTeams = await teamListCall(accessToken, currentOrg?.organization_id || null);
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ const TeamsView: React.FC<TeamProps> = ({
|
|||
<div className="w-full mx-4 h-[75vh]">
|
||||
<Grid numItems={1} className="gap-2 p-8 w-full mt-2">
|
||||
<Col numColSpan={1} className="flex flex-col gap-2">
|
||||
{(userRole == "Admin" || userRole == "Org Admin") && (
|
||||
{(userRole === "Admin" || userRole === "Org Admin") && (
|
||||
<Button className="w-fit" onClick={() => setIsTeamModalVisible(true)}>
|
||||
+ Create New Team
|
||||
</Button>
|
||||
|
|
@ -281,7 +281,7 @@ const TeamsView: React.FC<TeamProps> = ({
|
|||
}}
|
||||
accessToken={accessToken}
|
||||
is_team_admin={is_team_admin(teams?.find((team) => team.team_id === selectedTeamId))}
|
||||
is_proxy_admin={userRole == "Admin"}
|
||||
is_proxy_admin={userRole === "Admin"}
|
||||
is_org_admin={(() => {
|
||||
const team = teams?.find((t) => t.team_id === selectedTeamId);
|
||||
if (!team?.organization_id || !organizations || !userID) return false;
|
||||
|
|
@ -345,7 +345,7 @@ const TeamsView: React.FC<TeamProps> = ({
|
|||
)}
|
||||
</TeamsHeaderTabs>
|
||||
)}
|
||||
{(userRole == "Admin" || userRole == "Org Admin") && (
|
||||
{(userRole === "Admin" || userRole === "Org Admin") && (
|
||||
<CreateTeamModal
|
||||
isTeamModalVisible={isTeamModalVisible}
|
||||
handleOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ const TeamsTable = ({
|
|||
</Text>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{userRole == "Admin" ? (
|
||||
{userRole === "Admin" ? (
|
||||
<>
|
||||
<Icon
|
||||
icon={PencilAltIcon}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ const CreateTeamModal = ({
|
|||
const handleCreate = async (formValues: Record<string, any>) => {
|
||||
try {
|
||||
console.log(`formValues: ${JSON.stringify(formValues)}`);
|
||||
if (accessToken != null) {
|
||||
if (accessToken !== null) {
|
||||
const newTeamAlias = formValues?.team_alias;
|
||||
const existingTeamAliases = teams?.map((t) => t.team_alias) ?? [];
|
||||
let organizationId = formValues?.organization_id || currentOrg?.organization_id;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue