The Manager console carried screens built to an early control-plane vision that no longer matches how the product runs (desktop client drives tasks; Manager is gateway + status judge). Removed the dead/misleading ones and aligned task overview to the real status model. Frontend only; no backend endpoints touched. Deleted (routes + pages + menu entries): - Resource binding (/sk-sources): mcp-server /api/resources unwired (301) + Azure Key Vault unreachable -> page was inert. - Audit (/audit): only simulated approvals, empty leases, mcp audit unwired. - Events / Templates / Agents pages: legacy control-plane (hardcoded mock templates), not in the main menu but route-reachable. - azure-cloud-binding-sheet + create-agent-deployment-sheet (New run). Task overview (/deployments) kept and fixed: - status now uses Manager-judged display_status (completed / needs_codegen / completed_without_deliverable=fail / running ...) instead of raw phase, so success vs failure is legible. - dropped New run, scope/budget/secret_ref pills, permission-manifest grants table, Simulate; kept the task list, per-task audit timeline and artifacts. Cleaned all menu/nav/dashboard references to the deleted routes (sidebar, top-nav, footer, cockpit, home-hero, agent-hub, task-card-view) and regenerated routeTree.gen.ts. tsc -b and rsbuild build both pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
134 lines
3.6 KiB
TypeScript
Vendored
134 lines
3.6 KiB
TypeScript
Vendored
import { type TFunction } from 'i18next'
|
|
import {
|
|
Box,
|
|
Boxes,
|
|
Building2,
|
|
CircuitBoard,
|
|
ClipboardList,
|
|
Cpu,
|
|
Layout,
|
|
Plug,
|
|
Receipt,
|
|
Settings,
|
|
Shield,
|
|
ShieldAlert,
|
|
Store,
|
|
Ticket,
|
|
Wrench,
|
|
} from 'lucide-react'
|
|
import { getAuthSectionNavItems } from '@/features/system-settings/auth/section-registry.tsx'
|
|
import { getContentSectionNavItems } from '@/features/system-settings/content/section-registry.tsx'
|
|
import { getGeneralSectionNavItems } from '@/features/system-settings/general/section-registry.tsx'
|
|
import { getIntegrationsSectionNavItems } from '@/features/system-settings/integrations/section-registry.tsx'
|
|
import { getMaintenanceSectionNavItems } from '@/features/system-settings/maintenance/section-registry.tsx'
|
|
import { getModelsSectionNavItems } from '@/features/system-settings/models/section-registry.tsx'
|
|
import { getRequestLimitsSectionNavItems } from '@/features/system-settings/request-limits/section-registry.tsx'
|
|
import { type NavGroup } from '../types'
|
|
|
|
/**
|
|
* System Settings workspace 侧边栏(管理员入口后才显示)。
|
|
*
|
|
* 包含两大块:
|
|
* 1. Tenant administration (ROLE.ADMIN+ 业务管理类入口)
|
|
* 2. System Administration (ROLE.SUPER_ADMIN 平台层级配置)
|
|
*
|
|
* Workspace 进入条件:URL 命中 `/system-settings/...`。
|
|
* 角色过滤由 `app-sidebar.tsx` 按 group.id 完成。
|
|
*/
|
|
export const WORKSPACE_SYSTEM_SETTINGS_ID = 'system-settings'
|
|
|
|
export function getSystemSettingsNavGroups(t: TFunction): NavGroup[] {
|
|
return [
|
|
// ============ Tenant administration (ROLE.ADMIN+) ============
|
|
{
|
|
id: 'admin',
|
|
title: t('Tenant administration'),
|
|
items: [
|
|
{
|
|
title: t('Channels'),
|
|
url: '/channels',
|
|
icon: CircuitBoard,
|
|
},
|
|
{
|
|
title: t('Models'),
|
|
url: '/models/metadata',
|
|
icon: Boxes,
|
|
},
|
|
{
|
|
title: t('Model deployments'),
|
|
url: '/models/deployments',
|
|
icon: Cpu,
|
|
},
|
|
{
|
|
title: t('Subscription plans'),
|
|
url: '/subscriptions',
|
|
icon: Receipt,
|
|
},
|
|
{
|
|
title: t('Redemption codes'),
|
|
url: '/redemption-codes',
|
|
icon: Ticket,
|
|
},
|
|
{
|
|
title: t('Tenants'),
|
|
url: '/users',
|
|
icon: Building2,
|
|
},
|
|
{
|
|
title: t('Vendors'),
|
|
url: '/models/vendors',
|
|
icon: Store,
|
|
},
|
|
{
|
|
title: t('All usage logs'),
|
|
url: '/usage-logs/common',
|
|
icon: ClipboardList,
|
|
},
|
|
],
|
|
},
|
|
|
|
// ============ System Administration (ROLE.SUPER_ADMIN) ============
|
|
{
|
|
id: 'system-administration',
|
|
title: t('System Administration'),
|
|
items: [
|
|
{
|
|
title: t('General'),
|
|
icon: Settings,
|
|
items: getGeneralSectionNavItems(t),
|
|
},
|
|
{
|
|
title: t('Authentication'),
|
|
icon: Shield,
|
|
items: getAuthSectionNavItems(t),
|
|
},
|
|
{
|
|
title: t('Request Limits'),
|
|
icon: ShieldAlert,
|
|
items: getRequestLimitsSectionNavItems(t),
|
|
},
|
|
{
|
|
title: t('Content'),
|
|
icon: Layout,
|
|
items: getContentSectionNavItems(t),
|
|
},
|
|
{
|
|
title: t('Integrations'),
|
|
icon: Plug,
|
|
items: getIntegrationsSectionNavItems(t),
|
|
},
|
|
{
|
|
title: t('Models catalog'),
|
|
icon: Box,
|
|
items: getModelsSectionNavItems(t),
|
|
},
|
|
{
|
|
title: t('Maintenance'),
|
|
icon: Wrench,
|
|
items: getMaintenanceSectionNavItems(t),
|
|
},
|
|
],
|
|
},
|
|
]
|
|
}
|