Skip to content

Commit e64b8a8

Browse files
committed
ui linting fix
1 parent d0cda56 commit e64b8a8

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

ui/litellm-dashboard/src/components/all_keys_table.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,12 @@ export function AllKeysTable({
328328
org.organization_id?.toLowerCase().includes(searchText.toLowerCase()) ?? false
329329
);
330330

331-
return filteredOrgs.map(org => ({
332-
label: `${org.organization_id || 'Unknown'} (${org.organization_id})`,
333-
value: org.organization_id
334-
}));
331+
return filteredOrgs
332+
.filter(org => org.organization_id !== null && org.organization_id !== undefined)
333+
.map(org => ({
334+
label: `${org.organization_id || 'Unknown'} (${org.organization_id})`,
335+
value: org.organization_id as string
336+
}));
335337
}
336338
},
337339
];

ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const fetchAllKeyAliases = async (accessToken: string | null): Promise<st
2727

2828
// Extract aliases from this page
2929
const pageAliases = response.keys
30-
.map(key => key.key_alias)
30+
.map((key: any) => key.key_alias)
3131
.filter(Boolean) as string[];
3232

3333
allAliases = [...allAliases, ...pageAliases];
@@ -41,7 +41,7 @@ export const fetchAllKeyAliases = async (accessToken: string | null): Promise<st
4141
}
4242

4343
// Remove duplicates
44-
return [...new Set(allAliases)];
44+
return Array.from(new Set(allAliases));
4545
} catch (error) {
4646
console.error("Error fetching all key aliases:", error);
4747
return [];
@@ -66,8 +66,7 @@ export const fetchAllTeams = async (accessToken: string | null, organizationId?:
6666
const response = await teamListCall(
6767
accessToken,
6868
organizationId || null,
69-
currentPage,
70-
100 // larger page size to reduce number of requests
69+
null,
7170
);
7271

7372
// Add teams from this page
@@ -103,9 +102,7 @@ export const fetchAllOrganizations = async (accessToken: string | null): Promise
103102

104103
while (hasMorePages) {
105104
const response = await organizationListCall(
106-
accessToken,
107-
currentPage,
108-
100 // larger page size to reduce number of requests
105+
accessToken
109106
);
110107

111108
// Add organizations from this page

ui/litellm-dashboard/src/components/key_team_helpers/filter_logic.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useEffect, useState } from "react";
22
import { KeyResponse } from "../key_team_helpers/key_list";
3-
import { Team, Organization } from "../networking";
3+
import { Organization } from "../networking";
4+
import { Team } from "../key_team_helpers/key_list";
45

56
export interface FilterState {
67
'Team ID': string;

0 commit comments

Comments
 (0)