From 222ce8de73927ad21cfbda24c659ab61f5e83d31 Mon Sep 17 00:00:00 2001 From: jyswee Date: Thu, 23 Jul 2026 22:15:25 +0000 Subject: [PATCH] Seed: developer-tools template (15 files) --- src/pages/Status.tsx | 168 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 src/pages/Status.tsx diff --git a/src/pages/Status.tsx b/src/pages/Status.tsx new file mode 100644 index 0000000..44391a3 --- /dev/null +++ b/src/pages/Status.tsx @@ -0,0 +1,168 @@ +import { Badge } from "@/components/ui/badge"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { CheckCircle2, AlertTriangle, Clock } from "lucide-react"; +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; + +const services = [ + { name: "API", status: "operational", uptime: "99.99" }, + { name: "Dashboard", status: "operational", uptime: "99.98" }, + { name: "CDN", status: "operational", uptime: "99.99" }, + { name: "Database", status: "operational", uptime: "99.97" }, + { name: "Auth", status: "degraded", uptime: "99.91" }, + { name: "Webhooks", status: "operational", uptime: "99.95" }, +]; + +const incidents = [ + { + date: "Mar 28, 2024", + title: "Elevated API Latency in US-East", + status: "resolved", + duration: "23 minutes", + desc: "API response times were elevated due to a database connection pool issue. The pool was resized and latency returned to normal.", + }, + { + date: "Mar 15, 2024", + title: "Dashboard Login Timeout", + status: "resolved", + duration: "8 minutes", + desc: "Some users experienced timeouts during login. The auth service was restarted and the issue was resolved.", + }, + { + date: "Feb 22, 2024", + title: "CDN Cache Invalidation Delay", + status: "resolved", + duration: "45 minutes", + desc: "Cache invalidation requests were delayed by up to 10 minutes due to a queue backlog. The queue was cleared and processing returned to normal.", + }, +]; + +function StatusDot({ status }: { status: string }) { + const colors: Record = { + operational: "bg-emerald-500", + degraded: "bg-amber-500", + down: "bg-red-500", + }; + return ; +} + +export default function StatusPage() { + const allOperational = services.every((s) => s.status === "operational"); + + return ( +
+
+ +
+ {/* Overall Status */} +
+
+ {allOperational ? ( + + ) : ( + + )} + + {allOperational ? "All Systems Operational" : "Partial Degradation"} + +
+

+ Last checked: {new Date().toLocaleString()} +

+
+ + {/* Service Status Rows */} + + + Service Status + + + {services.map((service, i) => ( +
+
+ + {service.name} +
+
+ + {service.status} + + {service.uptime}% +
+
+ ))} +
+
+ + {/* 90-Day Uptime Bar */} + + +
+ 90-Day Uptime + 99.97% +
+
+ +
+ {Array.from({ length: 90 }).map((_, i) => ( +
+ ))} +
+
+ 90 days ago + Today +
+ + + + {/* Incident History */} +
+

Incident History

+
+ {incidents.map((incident) => ( + + +
+ + {incident.status} + + {incident.date} +
+ + {incident.duration} +
+
+

{incident.title}

+

{incident.desc}

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