diff --git a/apps/web/src/components/layout/sidebar.tsx b/apps/web/src/components/layout/sidebar.tsx index c29a4475..01802dde 100644 --- a/apps/web/src/components/layout/sidebar.tsx +++ b/apps/web/src/components/layout/sidebar.tsx @@ -28,14 +28,12 @@ import { usePathname } from 'next/navigation' import Link from 'next/link' import { cn } from '@/lib/utils' import { - LayoutDashboard, - ShieldCheck, - Zap, - BookOpen, - Settings, - ChevronLeft, - ChevronRight, - Bug, + LayoutDashboard, ShieldCheck, Bell, Monitor, Activity, + Bug, GitBranch, Shield, ClipboardCheck, + Wrench, Package, Ticket, DollarSign, Zap, FileText, + BookOpen, Terminal, AppWindow, Server, + Users, BellRing, CreditCard, HelpCircle, Settings, + ChevronLeft, ChevronRight, } from 'lucide-react' // Phase 8.0 #15: 改用 approval store SSE (移除 polling) import { useApprovalStore } from '@/stores/approval.store' @@ -59,17 +57,68 @@ type NavItemConfig = { badge?: boolean // 是否顯示動態徽章 } -// ============================================================================= -// Phase 7.0: 5 大核心樞紐 -// ============================================================================= +type NavSection = { + sectionKey: string + sectionLabel: string + items: NavItemConfig[] +} -const NAV_ITEMS: NavItemConfig[] = [ - { id: 'warroom', href: '/', labelKey: 'dashboard', Icon: LayoutDashboard }, - { id: 'authorizations', href: '/authorizations', labelKey: 'approvals', Icon: ShieldCheck, badge: true }, - { id: 'errors', href: '/errors', labelKey: 'errors', Icon: Bug }, - { id: 'action-logs', href: '/action-logs', labelKey: 'actions', Icon: Zap }, - { id: 'knowledge-base', href: '/knowledge-base', labelKey: 'knowledge', Icon: BookOpen }, - { id: 'settings', href: '/settings', labelKey: 'settings', Icon: Settings }, +// ============================================================ +// AI中心 v6 — 4分區 Sidebar(統帥批准 2026-04-01) +// ============================================================ + +const NAV_SECTIONS: NavSection[] = [ + { + sectionKey: 'ai-core', + sectionLabel: 'AI 核心', + items: [ + { id: 'ai-center', href: '/', labelKey: 'dashboard', Icon: LayoutDashboard }, + { id: 'authorizations', href: '/authorizations', labelKey: 'approvals', Icon: ShieldCheck, badge: true }, + { id: 'alerts', href: '/alerts', labelKey: 'alerts', Icon: Bell }, + ], + }, + { + sectionKey: 'monitoring', + sectionLabel: '監控與安全', + items: [ + { id: 'monitoring', href: '/monitoring', labelKey: 'monitoring', Icon: Monitor }, + { id: 'apm', href: '/apm', labelKey: 'apm', Icon: Activity }, + { id: 'errors', href: '/errors', labelKey: 'errors', Icon: Bug }, + { id: 'topology', href: '/topology', labelKey: 'topology', Icon: GitBranch }, + { id: 'security', href: '/security', labelKey: 'security', Icon: Shield }, + { id: 'compliance', href: '/compliance', labelKey: 'compliance', Icon: ClipboardCheck }, + ], + }, + { + sectionKey: 'ops', + sectionLabel: '運維管理', + items: [ + { id: 'auto-repair', href: '/auto-repair', labelKey: 'autoRepair', Icon: Wrench }, + { id: 'deployments', href: '/deployments', labelKey: 'deployments', Icon: Package }, + { id: 'tickets', href: '/tickets', labelKey: 'tickets', Icon: Ticket }, + { id: 'cost', href: '/cost', labelKey: 'cost', Icon: DollarSign }, + { id: 'action-logs', href: '/action-logs', labelKey: 'actions', Icon: Zap }, + { id: 'reports', href: '/reports', labelKey: 'reports', Icon: FileText }, + ], + }, + { + sectionKey: 'knowledge', + sectionLabel: '知識與工具', + items: [ + { id: 'knowledge-base', href: '/knowledge-base', labelKey: 'knowledge', Icon: BookOpen }, + { id: 'terminal', href: '/terminal', labelKey: 'terminal', Icon: Terminal }, + { id: 'apps', href: '/apps', labelKey: 'apps', Icon: AppWindow }, + { id: 'services', href: '/services', labelKey: 'services', Icon: Server }, + ], + }, +] + +const BOTTOM_NAV_ITEMS: NavItemConfig[] = [ + { id: 'users', href: '/users', labelKey: 'users', Icon: Users }, + { id: 'notifications', href: '/notifications', labelKey: 'notifications', Icon: BellRing }, + { id: 'billing', href: '/billing', labelKey: 'billing', Icon: CreditCard }, + { id: 'help', href: '/help', labelKey: 'help', Icon: HelpCircle }, + { id: 'settings', href: '/settings', labelKey: 'settings', Icon: Settings }, ] // ============================================================================= @@ -136,54 +185,98 @@ export function Sidebar({ )} - {/* 導航列表 - 5 大核心樞紐 */} - {/* 底部區域 - 極簡版本號 */}