import { AlertTriangle, BarChart2, Bell, DollarSign, GitCommit, Rocket, Shield, Target, Users, Zap, } from 'lucide-react'; import { useLocation } from 'wouter'; import { useOpsBadgeCounts } from '../../hooks/use-ops-badge-counts'; type BadgeKey = 'alerts' | 'slaBreaches' | 'governancePending' | 'costOverBudget'; interface OpsItem { path: string; label: string; description: string; icon: typeof Bell; color: string; badge?: number; badgeKey?: BadgeKey; badgeLabel?: string; badgeColor?: string; } const OPS_ITEMS: OpsItem[] = [ { path: '/alerts', label: 'Alert Inbox', description: 'Unified alert inbox with priority ranking, snooze, acknowledge & escalate', icon: Bell, color: '#ef4444', badgeKey: 'alerts', badgeLabel: 'active', }, { path: '/team', label: 'Team & Users', description: 'User directory, role-based access, team grouping, SSO configuration', icon: Users, color: '#8b7ac8', }, { path: '/costs', label: 'Cost Analytics', description: 'Resource consumption, API volumes, budget allocation, overage alerts', icon: DollarSign, color: '#22c55e', badgeKey: 'costOverBudget', badgeLabel: 'over budget', badgeColor: 'var(--color-high)', }, { path: '/changelog', label: 'Release Feed', description: 'Auto-generated change log for all apps — deployments, features, fixes', icon: GitCommit, color: 'var(--gi-accent-blue)', }, { path: '/operations/deployments', label: 'Deployments', description: 'Active versions per app, full deployment history, guarded rollback controls', icon: Rocket, color: '#8b7ac8', }, { path: '/sla', label: 'SLA Dashboard', description: 'Cross-domain SLA compliance tracking with breach alerting', icon: Target, color: '#f97316', badgeKey: 'slaBreaches', badgeLabel: 'breaching', badgeColor: 'var(--color-critical)', }, { path: '/governance', label: 'Governance', description: 'Policy creation, approval chains, enforcement tracking, audit trail', icon: Shield, color: '#a855f7', badgeKey: 'governancePending', badgeLabel: 'needs approval', badgeColor: 'var(--color-medium)', }, { path: '/health', label: 'Health Score', description: 'Composite ecosystem health score with dimension breakdown', icon: BarChart2, color: '#8b7ac8', }, { path: '/digest', label: 'Daily Digest', description: 'AI-personalized briefing with role-aware prioritization and quick actions', icon: Zap, color: '#f59e0b', }, ]; export function OpsCenterGrid() { const [, navigate] = useLocation(); const counts = useOpsBadgeCounts(); return (

Ops Center

8 workspaces
{OPS_ITEMS.map((item) => { const Icon = item.icon; const liveBadge = item.badgeKey ? counts[item.badgeKey] : null; const badgeValue = typeof liveBadge === 'number' ? liveBadge : item.badge; const showBadge = typeof badgeValue === 'number' && badgeValue > 0; return ( ); })}
); }