diff --git a/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx b/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx index 0585d96087c..e7c9d389ed0 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx @@ -11,8 +11,19 @@ import { OnChangeFn, } from "@tanstack/react-table"; import React from "react"; -import { Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell } from "@tremor/react"; -import { TableHeaderSortDropdown, SortState } from "../common_components/TableHeaderSortDropdown/TableHeaderSortDropdown"; +// eslint-disable-next-line litellm-ui/no-banned-ui-imports +import { + Table, + TableHead, + TableHeaderCell, + TableBody, + TableRow, + TableCell, +} from "@tremor/react"; +import { + TableHeaderSortDropdown, + SortState, +} from "../common_components/TableHeaderSortDropdown/TableHeaderSortDropdown"; // Extend the column meta type to include className declare module "@tanstack/react-table" { @@ -74,25 +85,6 @@ export function AllModelsDataTable({ }, }); - const getHeaderText = (header: any): string => { - if (typeof header === "string") { - return header; - } - if (typeof header === "function") { - const headerElement = header(); - if (headerElement && headerElement.props && headerElement.props.children) { - const children = headerElement.props.children; - if (typeof children === "string") { - return children; - } - if (children.props && children.props.children) { - return children.props.children; - } - } - } - return ""; - }; - return (
@@ -111,10 +103,11 @@ export function AllModelsDataTable({ {headerGroup.headers.map((header) => ( ({
)} @@ -168,8 +164,11 @@ export function AllModelsDataTable({ {isLoading ? ( - -
+ +

🚅 Loading models...

@@ -178,16 +177,19 @@ export function AllModelsDataTable({ tableInstance.getRowModel().rows.map((row) => ( onRowClick?.(row.original)} > {row.getVisibleCells().map((cell) => ( ({ )) ) : ( - -
+ +

No models found