Skip to content

Commit a648208

Browse files
committed
✨ feat[status]: add system status page with component status overview
1 parent 43cd647 commit a648208

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

front-end/src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Profile from "./pages/Profie";
1313
import Member from "./pages/Member";
1414
import Retrospective from "./pages/Retrospective";
1515
import MemberDetail from "./pages/Member/[discordId]";
16+
import Status from "./pages/Status";
1617

1718
import("preline");
1819

@@ -37,6 +38,10 @@ const router = createBrowserRouter([
3738
path: "/auth/callback",
3839
element: <Callback />,
3940
},
41+
{
42+
path:"/status",
43+
element: <Status />
44+
}
4045
]);
4146

4247
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(

front-end/src/pages/Status/index.tsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
function Status() {
2+
const statuses = [
3+
{ name: 'API Server', status: 'Running', lastChecked: '2025-01-24 12:30 PM' },
4+
{ name: 'Database', status: 'Running', lastChecked: '2025-01-24 12:30 PM' },
5+
{ name: 'Frontend', status: 'Running', lastChecked: '2025-01-24 12:30 PM' },
6+
{ name: 'Background Jobs', status: 'Paused', lastChecked: '2025-01-24 12:25 PM' }
7+
];
8+
9+
return (
10+
<div className="container mx-auto p-6">
11+
<h1 className="text-2xl font-bold mb-4">System Status</h1>
12+
<div className="bg-white shadow-md rounded-lg overflow-hidden">
13+
<table className="min-w-full divide-y divide-gray-200">
14+
<thead className="bg-gray-50">
15+
<tr>
16+
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
17+
Component
18+
</th>
19+
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
20+
Status
21+
</th>
22+
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
23+
Last Checked
24+
</th>
25+
</tr>
26+
</thead>
27+
<tbody className="bg-white divide-y divide-gray-200">
28+
{statuses.map((status, index) => (
29+
<tr key={index}>
30+
<td className="px-6 py-4 whitespace-nowrap">{status.name}</td>
31+
<td className="px-6 py-4 whitespace-nowrap">
32+
<span
33+
className={`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${
34+
status.status === 'Running'
35+
? 'bg-green-100 text-green-800'
36+
: 'bg-yellow-100 text-yellow-800'
37+
}`}
38+
>
39+
{status.status}
40+
</span>
41+
</td>
42+
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
43+
{status.lastChecked}
44+
</td>
45+
</tr>
46+
))}
47+
</tbody>
48+
</table>
49+
</div>
50+
</div>
51+
);
52+
}
53+
54+
export default Status
55+

0 commit comments

Comments
 (0)