@qwickapps/server 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +238 -0
- package/dist/core/control-panel.d.ts +7 -2
- package/dist/core/control-panel.d.ts.map +1 -1
- package/dist/core/control-panel.js +92 -54
- package/dist/core/control-panel.js.map +1 -1
- package/dist/core/gateway.d.ts +159 -79
- package/dist/core/gateway.d.ts.map +1 -1
- package/dist/core/gateway.js +679 -319
- package/dist/core/gateway.js.map +1 -1
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/plugin-registry.d.ts +271 -0
- package/dist/core/plugin-registry.d.ts.map +1 -0
- package/dist/core/plugin-registry.js +326 -0
- package/dist/core/plugin-registry.js.map +1 -0
- package/dist/core/types.d.ts +16 -33
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/plugins/auth/adapters/auth0-adapter.d.ts +14 -0
- package/dist/plugins/auth/adapters/auth0-adapter.d.ts.map +1 -0
- package/dist/plugins/auth/adapters/auth0-adapter.js +179 -0
- package/dist/plugins/auth/adapters/auth0-adapter.js.map +1 -0
- package/dist/plugins/auth/adapters/basic-adapter.d.ts +13 -0
- package/dist/plugins/auth/adapters/basic-adapter.d.ts.map +1 -0
- package/dist/plugins/auth/adapters/basic-adapter.js +51 -0
- package/dist/plugins/auth/adapters/basic-adapter.js.map +1 -0
- package/dist/plugins/auth/adapters/index.d.ts +9 -0
- package/dist/plugins/auth/adapters/index.d.ts.map +1 -0
- package/dist/plugins/auth/adapters/index.js +9 -0
- package/dist/plugins/auth/adapters/index.js.map +1 -0
- package/dist/plugins/auth/adapters/supabase-adapter.d.ts +13 -0
- package/dist/plugins/auth/adapters/supabase-adapter.d.ts.map +1 -0
- package/dist/plugins/auth/adapters/supabase-adapter.js +109 -0
- package/dist/plugins/auth/adapters/supabase-adapter.js.map +1 -0
- package/dist/plugins/auth/auth-plugin.d.ts +40 -0
- package/dist/plugins/auth/auth-plugin.d.ts.map +1 -0
- package/dist/plugins/auth/auth-plugin.js +255 -0
- package/dist/plugins/auth/auth-plugin.js.map +1 -0
- package/dist/plugins/auth/auth-plugin.test.d.ts +9 -0
- package/dist/plugins/auth/auth-plugin.test.d.ts.map +1 -0
- package/dist/plugins/auth/auth-plugin.test.js +147 -0
- package/dist/plugins/auth/auth-plugin.test.js.map +1 -0
- package/dist/plugins/auth/index.d.ts +12 -0
- package/dist/plugins/auth/index.d.ts.map +1 -0
- package/dist/plugins/auth/index.js +13 -0
- package/dist/plugins/auth/index.js.map +1 -0
- package/dist/plugins/auth/types.d.ts +148 -0
- package/dist/plugins/auth/types.d.ts.map +1 -0
- package/dist/plugins/auth/types.js +14 -0
- package/dist/plugins/auth/types.js.map +1 -0
- package/dist/plugins/bans/bans-plugin.d.ts +59 -0
- package/dist/plugins/bans/bans-plugin.d.ts.map +1 -0
- package/dist/plugins/bans/bans-plugin.js +428 -0
- package/dist/plugins/bans/bans-plugin.js.map +1 -0
- package/dist/plugins/bans/index.d.ts +9 -0
- package/dist/plugins/bans/index.d.ts.map +1 -0
- package/dist/plugins/bans/index.js +10 -0
- package/dist/plugins/bans/index.js.map +1 -0
- package/dist/plugins/bans/stores/index.d.ts +7 -0
- package/dist/plugins/bans/stores/index.d.ts.map +1 -0
- package/dist/plugins/bans/stores/index.js +7 -0
- package/dist/plugins/bans/stores/index.js.map +1 -0
- package/dist/plugins/bans/stores/postgres-store.d.ts +29 -0
- package/dist/plugins/bans/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/bans/stores/postgres-store.js +132 -0
- package/dist/plugins/bans/stores/postgres-store.js.map +1 -0
- package/dist/plugins/bans/types.d.ts +128 -0
- package/dist/plugins/bans/types.d.ts.map +1 -0
- package/dist/plugins/bans/types.js +11 -0
- package/dist/plugins/bans/types.js.map +1 -0
- package/dist/plugins/cache-plugin.d.ts +14 -3
- package/dist/plugins/cache-plugin.d.ts.map +1 -1
- package/dist/plugins/cache-plugin.js +27 -7
- package/dist/plugins/cache-plugin.js.map +1 -1
- package/dist/plugins/cache-plugin.test.js +96 -32
- package/dist/plugins/cache-plugin.test.js.map +1 -1
- package/dist/plugins/config-plugin.d.ts +3 -2
- package/dist/plugins/config-plugin.d.ts.map +1 -1
- package/dist/plugins/config-plugin.js +17 -10
- package/dist/plugins/config-plugin.js.map +1 -1
- package/dist/plugins/diagnostics-plugin.d.ts +2 -2
- package/dist/plugins/diagnostics-plugin.d.ts.map +1 -1
- package/dist/plugins/diagnostics-plugin.js +17 -10
- package/dist/plugins/diagnostics-plugin.js.map +1 -1
- package/dist/plugins/entitlements/entitlements-plugin.d.ts +95 -0
- package/dist/plugins/entitlements/entitlements-plugin.d.ts.map +1 -0
- package/dist/plugins/entitlements/entitlements-plugin.js +707 -0
- package/dist/plugins/entitlements/entitlements-plugin.js.map +1 -0
- package/dist/plugins/entitlements/index.d.ts +12 -0
- package/dist/plugins/entitlements/index.d.ts.map +1 -0
- package/dist/plugins/entitlements/index.js +16 -0
- package/dist/plugins/entitlements/index.js.map +1 -0
- package/dist/plugins/entitlements/sources/index.d.ts +9 -0
- package/dist/plugins/entitlements/sources/index.d.ts.map +1 -0
- package/dist/plugins/entitlements/sources/index.js +9 -0
- package/dist/plugins/entitlements/sources/index.js.map +1 -0
- package/dist/plugins/entitlements/sources/postgres-source.d.ts +29 -0
- package/dist/plugins/entitlements/sources/postgres-source.d.ts.map +1 -0
- package/dist/plugins/entitlements/sources/postgres-source.js +169 -0
- package/dist/plugins/entitlements/sources/postgres-source.js.map +1 -0
- package/dist/plugins/entitlements/types.d.ts +232 -0
- package/dist/plugins/entitlements/types.d.ts.map +1 -0
- package/dist/plugins/entitlements/types.js +11 -0
- package/dist/plugins/entitlements/types.js.map +1 -0
- package/dist/plugins/frontend-app-plugin.d.ts +9 -3
- package/dist/plugins/frontend-app-plugin.d.ts.map +1 -1
- package/dist/plugins/frontend-app-plugin.js +14 -9
- package/dist/plugins/frontend-app-plugin.js.map +1 -1
- package/dist/plugins/health-plugin.d.ts +5 -2
- package/dist/plugins/health-plugin.d.ts.map +1 -1
- package/dist/plugins/health-plugin.js +20 -5
- package/dist/plugins/health-plugin.js.map +1 -1
- package/dist/plugins/index.d.ts +8 -2
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +8 -2
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/logs-plugin.d.ts +3 -2
- package/dist/plugins/logs-plugin.d.ts.map +1 -1
- package/dist/plugins/logs-plugin.js +21 -12
- package/dist/plugins/logs-plugin.js.map +1 -1
- package/dist/plugins/postgres-plugin.d.ts +3 -3
- package/dist/plugins/postgres-plugin.d.ts.map +1 -1
- package/dist/plugins/postgres-plugin.js +9 -7
- package/dist/plugins/postgres-plugin.js.map +1 -1
- package/dist/plugins/postgres-plugin.test.js +47 -29
- package/dist/plugins/postgres-plugin.test.js.map +1 -1
- package/dist/plugins/users/index.d.ts +12 -0
- package/dist/plugins/users/index.d.ts.map +1 -0
- package/dist/plugins/users/index.js +13 -0
- package/dist/plugins/users/index.js.map +1 -0
- package/dist/plugins/users/stores/index.d.ts +7 -0
- package/dist/plugins/users/stores/index.d.ts.map +1 -0
- package/dist/plugins/users/stores/index.js +7 -0
- package/dist/plugins/users/stores/index.js.map +1 -0
- package/dist/plugins/users/stores/postgres-store.d.ts +28 -0
- package/dist/plugins/users/stores/postgres-store.d.ts.map +1 -0
- package/dist/plugins/users/stores/postgres-store.js +157 -0
- package/dist/plugins/users/stores/postgres-store.js.map +1 -0
- package/dist/plugins/users/types.d.ts +189 -0
- package/dist/plugins/users/types.d.ts.map +1 -0
- package/dist/plugins/users/types.js +12 -0
- package/dist/plugins/users/types.js.map +1 -0
- package/dist/plugins/users/users-plugin.d.ts +39 -0
- package/dist/plugins/users/users-plugin.d.ts.map +1 -0
- package/dist/plugins/users/users-plugin.js +242 -0
- package/dist/plugins/users/users-plugin.js.map +1 -0
- package/dist-ui/assets/index-Bsp2ntcw.js +465 -0
- package/dist-ui/assets/index-Bsp2ntcw.js.map +1 -0
- package/dist-ui/index.html +1 -1
- package/dist-ui-lib/api/controlPanelApi.d.ts +232 -0
- package/dist-ui-lib/components/ControlPanelApp.d.ts +61 -0
- package/dist-ui-lib/components/index.d.ts +18 -0
- package/dist-ui-lib/config/AppConfig.d.ts +7 -0
- package/dist-ui-lib/dashboard/DashboardWidgetRegistry.d.ts +62 -0
- package/dist-ui-lib/dashboard/DashboardWidgetRenderer.d.ts +8 -0
- package/dist-ui-lib/dashboard/PluginWidgetRenderer.d.ts +19 -0
- package/dist-ui-lib/dashboard/WidgetComponentRegistry.d.ts +44 -0
- package/dist-ui-lib/dashboard/builtInWidgets.d.ts +19 -0
- package/dist-ui-lib/dashboard/index.d.ts +13 -0
- package/dist-ui-lib/dashboard/widgets/ServiceHealthWidget.d.ts +12 -0
- package/dist-ui-lib/dashboard/widgets/index.d.ts +6 -0
- package/dist-ui-lib/index.js +6441 -0
- package/dist-ui-lib/index.js.map +1 -0
- package/dist-ui-lib/pages/ConfigPage.d.ts +1 -0
- package/dist-ui-lib/pages/DashboardPage.d.ts +1 -0
- package/dist-ui-lib/pages/DiagnosticsPage.d.ts +1 -0
- package/dist-ui-lib/pages/EntitlementsPage.d.ts +17 -0
- package/dist-ui-lib/pages/LogsPage.d.ts +1 -0
- package/dist-ui-lib/pages/NotFoundPage.d.ts +1 -0
- package/dist-ui-lib/pages/PluginPage.d.ts +15 -0
- package/dist-ui-lib/pages/SystemPage.d.ts +1 -0
- package/dist-ui-lib/pages/UsersPage.d.ts +22 -0
- package/package.json +18 -6
- package/src/core/control-panel.ts +114 -61
- package/src/core/gateway.ts +863 -403
- package/src/core/index.ts +21 -2
- package/src/core/plugin-registry.ts +653 -0
- package/src/core/types.ts +31 -37
- package/src/index.ts +118 -19
- package/src/plugins/auth/adapters/auth0-adapter.ts +214 -0
- package/src/plugins/auth/adapters/basic-adapter.ts +61 -0
- package/src/plugins/auth/adapters/index.ts +9 -0
- package/src/plugins/auth/adapters/supabase-adapter.ts +141 -0
- package/src/plugins/auth/auth-plugin.test.ts +176 -0
- package/src/plugins/auth/auth-plugin.ts +303 -0
- package/src/plugins/auth/index.ts +33 -0
- package/src/plugins/auth/types.ts +165 -0
- package/src/plugins/bans/bans-plugin.ts +485 -0
- package/src/plugins/bans/index.ts +31 -0
- package/src/plugins/bans/stores/index.ts +7 -0
- package/src/plugins/bans/stores/postgres-store.ts +195 -0
- package/src/plugins/bans/types.ts +141 -0
- package/src/plugins/cache-plugin.test.ts +105 -32
- package/src/plugins/cache-plugin.ts +40 -9
- package/src/plugins/config-plugin.ts +23 -12
- package/src/plugins/diagnostics-plugin.ts +22 -12
- package/src/plugins/entitlements/entitlements-plugin.ts +820 -0
- package/src/plugins/entitlements/index.ts +51 -0
- package/src/plugins/entitlements/sources/index.ts +9 -0
- package/src/plugins/entitlements/sources/postgres-source.ts +253 -0
- package/src/plugins/entitlements/types.ts +256 -0
- package/src/plugins/frontend-app-plugin.ts +24 -12
- package/src/plugins/health-plugin.ts +27 -7
- package/src/plugins/index.ts +106 -4
- package/src/plugins/logs-plugin.ts +28 -14
- package/src/plugins/postgres-plugin.test.ts +49 -29
- package/src/plugins/postgres-plugin.ts +11 -9
- package/src/plugins/users/index.ts +35 -0
- package/src/plugins/users/stores/index.ts +7 -0
- package/src/plugins/users/stores/postgres-store.ts +225 -0
- package/src/plugins/users/types.ts +209 -0
- package/src/plugins/users/users-plugin.ts +281 -0
- package/ui/src/App.tsx +185 -31
- package/ui/src/api/controlPanelApi.ts +354 -1
- package/ui/src/components/ControlPanelApp.tsx +209 -0
- package/ui/src/components/index.ts +62 -0
- package/ui/src/dashboard/DashboardWidgetRegistry.tsx +129 -0
- package/ui/src/dashboard/DashboardWidgetRenderer.tsx +34 -0
- package/ui/src/dashboard/PluginWidgetRenderer.tsx +115 -0
- package/ui/src/dashboard/WidgetComponentRegistry.tsx +116 -0
- package/ui/src/dashboard/builtInWidgets.tsx +29 -0
- package/ui/src/dashboard/index.ts +35 -0
- package/ui/src/dashboard/widgets/ServiceHealthWidget.tsx +140 -0
- package/ui/src/dashboard/widgets/index.ts +7 -0
- package/ui/src/pages/DashboardPage.tsx +28 -149
- package/ui/src/pages/EntitlementsPage.tsx +557 -0
- package/ui/src/pages/LogsPage.tsx +174 -8
- package/ui/src/pages/PluginPage.tsx +148 -0
- package/ui/src/pages/SystemPage.tsx +445 -0
- package/ui/src/pages/UsersPage.tsx +837 -0
- package/ui/tsconfig.lib.json +11 -0
- package/ui/vite.lib.config.ts +51 -0
- package/dist-ui/assets/index-CW1BviRn.js +0 -465
- package/dist-ui/assets/index-CW1BviRn.js.map +0 -1
- package/ui/src/pages/HealthPage.tsx +0 -204
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Card,
|
|
5
|
-
CardContent,
|
|
6
|
-
Typography,
|
|
7
|
-
Table,
|
|
8
|
-
TableBody,
|
|
9
|
-
TableCell,
|
|
10
|
-
TableContainer,
|
|
11
|
-
TableHead,
|
|
12
|
-
TableRow,
|
|
13
|
-
Chip,
|
|
14
|
-
CircularProgress,
|
|
15
|
-
LinearProgress,
|
|
16
|
-
} from '@mui/material';
|
|
17
|
-
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
|
|
18
|
-
import ErrorIcon from '@mui/icons-material/Error';
|
|
19
|
-
import WarningIcon from '@mui/icons-material/Warning';
|
|
20
|
-
import { api, HealthResponse } from '../api/controlPanelApi';
|
|
21
|
-
|
|
22
|
-
function getStatusIcon(status: string, size = 20) {
|
|
23
|
-
switch (status) {
|
|
24
|
-
case 'healthy':
|
|
25
|
-
return <CheckCircleIcon sx={{ color: 'var(--theme-success)', fontSize: size }} />;
|
|
26
|
-
case 'degraded':
|
|
27
|
-
return <WarningIcon sx={{ color: 'var(--theme-warning)', fontSize: size }} />;
|
|
28
|
-
case 'unhealthy':
|
|
29
|
-
return <ErrorIcon sx={{ color: 'var(--theme-error)', fontSize: size }} />;
|
|
30
|
-
default:
|
|
31
|
-
return <CircularProgress size={size} />;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function getStatusColor(status: string): string {
|
|
36
|
-
switch (status) {
|
|
37
|
-
case 'healthy':
|
|
38
|
-
return 'var(--theme-success)';
|
|
39
|
-
case 'degraded':
|
|
40
|
-
return 'var(--theme-warning)';
|
|
41
|
-
case 'unhealthy':
|
|
42
|
-
return 'var(--theme-error)';
|
|
43
|
-
default:
|
|
44
|
-
return 'var(--theme-text-secondary)';
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function formatLatency(latency?: number): string {
|
|
49
|
-
if (latency === undefined) return '-';
|
|
50
|
-
if (latency < 1000) return `${latency}ms`;
|
|
51
|
-
return `${(latency / 1000).toFixed(2)}s`;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function HealthPage() {
|
|
55
|
-
const [health, setHealth] = useState<HealthResponse | null>(null);
|
|
56
|
-
const [loading, setLoading] = useState(true);
|
|
57
|
-
const [error, setError] = useState<string | null>(null);
|
|
58
|
-
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
const fetchHealth = async () => {
|
|
61
|
-
try {
|
|
62
|
-
const data = await api.getHealth();
|
|
63
|
-
setHealth(data);
|
|
64
|
-
setError(null);
|
|
65
|
-
} catch (err) {
|
|
66
|
-
setError(err instanceof Error ? err.message : 'Failed to fetch health');
|
|
67
|
-
} finally {
|
|
68
|
-
setLoading(false);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
fetchHealth();
|
|
73
|
-
const interval = setInterval(fetchHealth, 5000);
|
|
74
|
-
return () => clearInterval(interval);
|
|
75
|
-
}, []);
|
|
76
|
-
|
|
77
|
-
if (loading) {
|
|
78
|
-
return (
|
|
79
|
-
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', minHeight: '50vh' }}>
|
|
80
|
-
<CircularProgress />
|
|
81
|
-
</Box>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (error) {
|
|
86
|
-
return (
|
|
87
|
-
<Card sx={{ bgcolor: 'var(--theme-surface)', border: '1px solid var(--theme-error)' }}>
|
|
88
|
-
<CardContent>
|
|
89
|
-
<Typography color="error">{error}</Typography>
|
|
90
|
-
</CardContent>
|
|
91
|
-
</Card>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const healthChecks = health ? Object.entries(health.checks) : [];
|
|
96
|
-
const healthyCount = healthChecks.filter(([, c]) => c.status === 'healthy').length;
|
|
97
|
-
const totalCount = healthChecks.length;
|
|
98
|
-
const healthPercentage = totalCount > 0 ? (healthyCount / totalCount) * 100 : 0;
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<Box>
|
|
102
|
-
<Typography variant="h4" sx={{ mb: 1, color: 'var(--theme-text-primary)' }}>
|
|
103
|
-
Health Checks
|
|
104
|
-
</Typography>
|
|
105
|
-
<Typography variant="body2" sx={{ mb: 4, color: 'var(--theme-text-secondary)' }}>
|
|
106
|
-
Detailed view of all service health checks
|
|
107
|
-
</Typography>
|
|
108
|
-
|
|
109
|
-
{/* Summary Card */}
|
|
110
|
-
<Card sx={{ mb: 4, bgcolor: 'var(--theme-surface)' }}>
|
|
111
|
-
<CardContent>
|
|
112
|
-
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}>
|
|
113
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
|
114
|
-
{getStatusIcon(health?.status || 'unknown', 32)}
|
|
115
|
-
<Box>
|
|
116
|
-
<Typography variant="h5" sx={{ color: 'var(--theme-text-primary)' }}>
|
|
117
|
-
Overall Status: {health?.status?.charAt(0).toUpperCase()}{health?.status?.slice(1)}
|
|
118
|
-
</Typography>
|
|
119
|
-
<Typography variant="body2" sx={{ color: 'var(--theme-text-secondary)' }}>
|
|
120
|
-
{healthyCount} of {totalCount} checks passing
|
|
121
|
-
</Typography>
|
|
122
|
-
</Box>
|
|
123
|
-
</Box>
|
|
124
|
-
<Typography variant="h3" sx={{ color: getStatusColor(health?.status || 'unknown') }}>
|
|
125
|
-
{healthPercentage.toFixed(0)}%
|
|
126
|
-
</Typography>
|
|
127
|
-
</Box>
|
|
128
|
-
<LinearProgress
|
|
129
|
-
variant="determinate"
|
|
130
|
-
value={healthPercentage}
|
|
131
|
-
sx={{
|
|
132
|
-
height: 8,
|
|
133
|
-
borderRadius: 4,
|
|
134
|
-
bgcolor: 'var(--theme-background)',
|
|
135
|
-
'& .MuiLinearProgress-bar': {
|
|
136
|
-
bgcolor: getStatusColor(health?.status || 'unknown'),
|
|
137
|
-
borderRadius: 4,
|
|
138
|
-
},
|
|
139
|
-
}}
|
|
140
|
-
/>
|
|
141
|
-
</CardContent>
|
|
142
|
-
</Card>
|
|
143
|
-
|
|
144
|
-
{/* Health Checks Table */}
|
|
145
|
-
<Card sx={{ bgcolor: 'var(--theme-surface)' }}>
|
|
146
|
-
<TableContainer>
|
|
147
|
-
<Table>
|
|
148
|
-
<TableHead>
|
|
149
|
-
<TableRow>
|
|
150
|
-
<TableCell sx={{ color: 'var(--theme-text-secondary)', borderColor: 'var(--theme-border)' }}>
|
|
151
|
-
Check
|
|
152
|
-
</TableCell>
|
|
153
|
-
<TableCell sx={{ color: 'var(--theme-text-secondary)', borderColor: 'var(--theme-border)' }}>
|
|
154
|
-
Status
|
|
155
|
-
</TableCell>
|
|
156
|
-
<TableCell sx={{ color: 'var(--theme-text-secondary)', borderColor: 'var(--theme-border)' }}>
|
|
157
|
-
Latency
|
|
158
|
-
</TableCell>
|
|
159
|
-
<TableCell sx={{ color: 'var(--theme-text-secondary)', borderColor: 'var(--theme-border)' }}>
|
|
160
|
-
Last Checked
|
|
161
|
-
</TableCell>
|
|
162
|
-
<TableCell sx={{ color: 'var(--theme-text-secondary)', borderColor: 'var(--theme-border)' }}>
|
|
163
|
-
Error
|
|
164
|
-
</TableCell>
|
|
165
|
-
</TableRow>
|
|
166
|
-
</TableHead>
|
|
167
|
-
<TableBody>
|
|
168
|
-
{healthChecks.map(([name, check]) => (
|
|
169
|
-
<TableRow key={name}>
|
|
170
|
-
<TableCell sx={{ color: 'var(--theme-text-primary)', borderColor: 'var(--theme-border)' }}>
|
|
171
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
|
172
|
-
{getStatusIcon(check.status)}
|
|
173
|
-
<Typography fontWeight={500}>{name}</Typography>
|
|
174
|
-
</Box>
|
|
175
|
-
</TableCell>
|
|
176
|
-
<TableCell sx={{ borderColor: 'var(--theme-border)' }}>
|
|
177
|
-
<Chip
|
|
178
|
-
label={check.status}
|
|
179
|
-
size="small"
|
|
180
|
-
sx={{
|
|
181
|
-
bgcolor: getStatusColor(check.status) + '20',
|
|
182
|
-
color: getStatusColor(check.status),
|
|
183
|
-
textTransform: 'capitalize',
|
|
184
|
-
}}
|
|
185
|
-
/>
|
|
186
|
-
</TableCell>
|
|
187
|
-
<TableCell sx={{ color: 'var(--theme-text-primary)', borderColor: 'var(--theme-border)' }}>
|
|
188
|
-
{formatLatency(check.latency)}
|
|
189
|
-
</TableCell>
|
|
190
|
-
<TableCell sx={{ color: 'var(--theme-text-secondary)', borderColor: 'var(--theme-border)' }}>
|
|
191
|
-
{new Date(check.lastChecked).toLocaleTimeString()}
|
|
192
|
-
</TableCell>
|
|
193
|
-
<TableCell sx={{ color: 'var(--theme-error)', borderColor: 'var(--theme-border)' }}>
|
|
194
|
-
{check.error || '-'}
|
|
195
|
-
</TableCell>
|
|
196
|
-
</TableRow>
|
|
197
|
-
))}
|
|
198
|
-
</TableBody>
|
|
199
|
-
</Table>
|
|
200
|
-
</TableContainer>
|
|
201
|
-
</Card>
|
|
202
|
-
</Box>
|
|
203
|
-
);
|
|
204
|
-
}
|