From a5b8d922e38ba975133c577ea2226450ed80c138 Mon Sep 17 00:00:00 2001 From: syntaxbullet Date: Thu, 8 Jan 2026 23:20:00 +0100 Subject: [PATCH] feat(web): implement full activity page with charts and logs --- web/src/pages/Activity.tsx | 111 +++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 5 deletions(-) diff --git a/web/src/pages/Activity.tsx b/web/src/pages/Activity.tsx index 382cf19..aba0222 100644 --- a/web/src/pages/Activity.tsx +++ b/web/src/pages/Activity.tsx @@ -1,12 +1,113 @@ +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

-

Recent bot activity logs.

-
- Activity feed coming soon... +
+
+

+ 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 +

+ )} +
+
+ )) + )} +
+ )} + +
); }