diff --git a/src/Web/autopilot-monitor-web/app/dashboard/components/StatsCards.tsx b/src/Web/autopilot-monitor-web/app/dashboard/components/StatsCards.tsx index 7086631e..d0ff44b5 100644 --- a/src/Web/autopilot-monitor-web/app/dashboard/components/StatsCards.tsx +++ b/src/Web/autopilot-monitor-web/app/dashboard/components/StatsCards.tsx @@ -9,13 +9,14 @@ export function StatsCard({ title: string; value: string; description: string; - color: "blue" | "green" | "purple" | "red"; + color: "blue" | "green" | "purple" | "red" | "indigo"; }) { const colorClasses = { blue: "bg-blue-500", green: "bg-green-500", purple: "bg-purple-500", red: "bg-red-500", + indigo: "bg-indigo-500", }; return ( diff --git a/src/Web/autopilot-monitor-web/app/dashboard/page.tsx b/src/Web/autopilot-monitor-web/app/dashboard/page.tsx index ea33813b..3ca9f77f 100644 --- a/src/Web/autopilot-monitor-web/app/dashboard/page.tsx +++ b/src/Web/autopilot-monitor-web/app/dashboard/page.tsx @@ -470,10 +470,11 @@ export default function Home() { const avgDuration = effectiveSessions.length > 0 ? Math.round(effectiveSessions.reduce((sum, s) => sum + s.durationSeconds, 0) / effectiveSessions.length / 60) : 0; - const failedToday = effectiveSessions.filter(s => - s.status === "Failed" && + const sessionsToday = effectiveSessions.filter(s => new Date(s.startedAt).toDateString() === new Date().toDateString() - ).length; + ); + const totalToday = sessionsToday.length; + const failedToday = sessionsToday.filter(s => s.status === "Failed").length; // Filter sessions based on status filter, column filters, and search query const filteredSessions = effectiveSessions.filter(session => { @@ -652,7 +653,7 @@ export default function Home() { )} {/* Stats cards */} -