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