import { ActivityChart } from "@/components/ActivityChart"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { useActivityStats } from "@/hooks/use-activity-stats"; import { useDashboardStats } from "@/hooks/use-dashboard-stats"; import { Activity as ActivityIcon, RefreshCw, Terminal } from "lucide-react"; export function Activity() { const { data: activityData, loading: activityLoading, refresh: refreshActivity } = useActivityStats(); const { stats, loading: statsLoading } = useDashboardStats(); return (

Activity Monitoring

Real-time system logs and performance metrics.

{/* Activity Chart Section */}
Command & Transaction Volume Hourly traffic analysis (Last 24 Hours)
{/* Detailed Activity Logs */}
System Logs Recent operational events and alerts
{statsLoading && !stats ? (

Connecting to event stream...

) : (
{!stats?.recentEvents || stats.recentEvents.length === 0 ? (

No recent activity recorded

) : ( stats.recentEvents.map((event, i) => (
{event.icon}

{event.message}

{new Date(event.timestamp).toLocaleString()}
{event.type === 'error' && (

Error: Check system console for stack trace

)}
)) )}
)}
); }