mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge pull request #35268 from BerriAI/litellm_/budgets-table-truncation-4b98ec
fix(ui): stop clamping the budgets Budget ID column at 15 characters
This commit is contained in:
commit
abb0e36ca5
2 changed files with 10 additions and 1 deletions
|
|
@ -35,6 +35,15 @@ describe("BudgetTable", () => {
|
|||
expect(screen.getByText("10")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should render the budget id without a fixed character-count clamp", () => {
|
||||
const budgetId = "ecc1869c-6231-4380-a56d-1a0be457477d";
|
||||
renderWithProviders(<BudgetTable {...defaultProps} budgets={[makeBudget({ budget_id: budgetId })]} />);
|
||||
const idCell = screen.getByText(budgetId);
|
||||
expect(idCell.className).not.toMatch(/max-w-\[\d+(ch|rem|px)\]/);
|
||||
expect(idCell.className).toContain("max-w-full");
|
||||
expect(idCell.className).toContain("truncate");
|
||||
});
|
||||
|
||||
it("should show n/a for missing rate limits and Unlimited for a missing max budget", () => {
|
||||
renderWithProviders(
|
||||
<BudgetTable {...defaultProps} budgets={[makeBudget({ max_budget: null, tpm_limit: null, rpm_limit: null })]} />,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export const getBudgetTableColumns = ({
|
|||
header: "Budget ID",
|
||||
size: 220,
|
||||
enableSorting: false,
|
||||
cell: ({ row }) => <IdCell value={row.original.budget_id} variant="plain" />,
|
||||
cell: ({ row }) => <IdCell value={row.original.budget_id} variant="plain" className="max-w-full" />,
|
||||
},
|
||||
{
|
||||
id: "max_budget",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue