diff --git a/ui/src/components/LayoutShell.tsx b/ui/src/components/LayoutShell.tsx index 0da226ec..bd37cf30 100644 --- a/ui/src/components/LayoutShell.tsx +++ b/ui/src/components/LayoutShell.tsx @@ -203,6 +203,23 @@ function LayoutContent() { const isAdminPage = location.pathname.startsWith('/admin'); const breadcrumb = useMemo(() => { + if (isAdminPage) { + const LABELS: Record = { + admin: 'Admin', + rbac: 'Users & Roles', + audit: 'Audit Log', + oidc: 'OIDC', + database: 'Database', + clickhouse: 'ClickHouse', + appconfig: 'App Config', + }; + const parts = location.pathname.split('/').filter(Boolean); + return parts.map((part, i) => ({ + label: LABELS[part] ?? part, + ...(i < parts.length - 1 ? { href: '/' + parts.slice(0, i + 1).join('/') } : {}), + })); + } + // Scope trail as breadcrumb items const items: { label: string; href?: string }[] = [ { label: 'All Applications', href: `/${scope.tab}` }, ]; @@ -217,7 +234,7 @@ function LayoutContent() { delete items[items.length - 1].href; } return items; - }, [scope.tab, scope.appId, scope.routeId]); + }, [location.pathname, isAdminPage, scope.tab, scope.appId, scope.routeId]); const handleLogout = useCallback(() => { logout(); diff --git a/ui/src/pages/Admin/AdminLayout.tsx b/ui/src/pages/Admin/AdminLayout.tsx index 1ff65e10..a3939591 100644 --- a/ui/src/pages/Admin/AdminLayout.tsx +++ b/ui/src/pages/Admin/AdminLayout.tsx @@ -34,7 +34,7 @@ export default function AdminLayout() { Admin
{username} -