Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/litellm-dashboard/src/components/leftnav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
ShieldCheck,
Tags,
Terminal,
Trophy,
User,
Users,
Wallet,
Expand Down Expand Up @@ -215,7 +216,7 @@
{
key: "model-insights",
page: "model-insights",
icon: <BarChart3 {...ICON} />,
icon: <Trophy {...ICON} />,
roles: all_admin_roles,
label: (
<span className="flex items-center gap-2">
Expand Down Expand Up @@ -505,7 +506,7 @@
const isAdmin = isAdminRole(userRole);
return items
.map((item) => ({ ...item, children: item.children ? filterItemsByRole(item.children) : undefined }))
.filter((item) => {

Check warning on line 509 in ui/litellm-dashboard/src/components/leftnav.tsx

View workflow job for this annotation

GitHub Actions / frontend-lint

Arrow function has a complexity of 31. Maximum allowed is 20
// A parent whose children were all filtered out renders as a leaf link
// to its own page id, which is not a real route. Drop it instead.
if (item.children && item.children.length === 0) return false;
Expand All @@ -518,14 +519,14 @@
}
if (item.key === "projects" && !enableProjectsUI) return false;
if (
!isAdmin &&

Check warning on line 522 in ui/litellm-dashboard/src/components/leftnav.tsx

View workflow job for this annotation

GitHub Actions / frontend-lint

Boolean expression combines 4 conditions; extract it into a named variable
item.key === "agents" &&
disableAgentsForInternalUsers &&
!(allowAgentsForTeamAdmins && isTeamAdmin)
)
return false;
if (
!isAdmin &&

Check warning on line 529 in ui/litellm-dashboard/src/components/leftnav.tsx

View workflow job for this annotation

GitHub Actions / frontend-lint

Boolean expression combines 4 conditions; extract it into a named variable
item.key === "vector-stores" &&
disableVectorStoresForInternalUsers &&
!(allowVectorStoresForTeamAdmins && isTeamAdmin)
Expand Down Expand Up @@ -645,8 +646,8 @@
<div className="flex items-center justify-between gap-2 group-data-[collapsed=true]/sidebar:flex-col">
<div className="flex min-w-0 items-center gap-2">
<Link href={uiHref("")} className="flex min-w-0 items-center" aria-label="LiteLLM home">
<img src={logoSrc} alt="LiteLLM" className={cn(LOGO_CLASS_NAME, "dark:hidden")} />

Check warning on line 649 in ui/litellm-dashboard/src/components/leftnav.tsx

View workflow job for this annotation

GitHub Actions / frontend-lint

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
<img

Check warning on line 650 in ui/litellm-dashboard/src/components/leftnav.tsx

View workflow job for this annotation

GitHub Actions / frontend-lint

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
src={darkLogoSrc}
alt=""
aria-hidden
Expand Down
Loading