mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Merge pull request #37021 from BerriAI/litellm_models_source_column
fix(ui): rename models table Status column to Source
This commit is contained in:
commit
487da4d1e4
3 changed files with 8 additions and 5 deletions
|
|
@ -192,7 +192,7 @@ describe("AllModelsTab", () => {
|
|||
expect(lastModelsInfoCall().sortOrder).toBe(firstDirection);
|
||||
});
|
||||
|
||||
it("maps the hidden Status column to the server field status", () => {
|
||||
it("maps the hidden Source column to the server field status", () => {
|
||||
expect(toServerSortField(STATUS_COLUMN_ID)).toBe("status");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const row = (modelId: string): HTMLElement => {
|
|||
};
|
||||
|
||||
describe("AllModelsTable", () => {
|
||||
it("renders the nine design columns and hides Status behind the Columns menu", async () => {
|
||||
it("renders the nine design columns and hides Source behind the Columns menu", async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<AllModelsTable {...baseProps} />);
|
||||
|
||||
|
|
@ -97,12 +97,15 @@ describe("AllModelsTable", () => {
|
|||
expect(screen.getByRole("columnheader", { name: new RegExp(header, "i") })).toBeInTheDocument();
|
||||
}
|
||||
|
||||
expect(screen.queryByRole("columnheader", { name: /^source$/i })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("columnheader", { name: /^status$/i })).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("DB Model")).not.toBeInTheDocument();
|
||||
|
||||
await user.click(screen.getByRole("button", { name: /columns/i }));
|
||||
await user.click(await screen.findByRole("menuitemcheckbox", { name: /status/i }));
|
||||
expect(screen.queryByRole("menuitemcheckbox", { name: /status/i })).not.toBeInTheDocument();
|
||||
await user.click(await screen.findByRole("menuitemcheckbox", { name: /^source$/i }));
|
||||
|
||||
expect(await screen.findByRole("columnheader", { name: /^source$/i })).toBeInTheDocument();
|
||||
expect(await screen.findByText("DB Model")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -453,8 +453,8 @@ export const getModelsTableColumns = ({
|
|||
{
|
||||
id: STATUS_COLUMN_ID,
|
||||
accessorFn: (row) => row.model_info.db_model,
|
||||
meta: { title: "Status", skeleton: "badge" },
|
||||
header: ({ column }) => <DataTableSortHeader column={column} title="Status" />,
|
||||
meta: { title: "Source", skeleton: "badge" },
|
||||
header: ({ column }) => <DataTableSortHeader column={column} title="Source" />,
|
||||
enableSorting: true,
|
||||
size: 140,
|
||||
minSize: 100,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue