This commit is contained in:
seb
2026-07-07 20:08:23 +02:00
parent 61fee8069d
commit b4fa5857ad
3 changed files with 6 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ function EndpointDashboard({ endpoint, range }) {
<Box sx={{ mb: 8, p: 3, bgcolor: 'background.paper', borderRadius: 2, border: '1px solid', borderColor: 'divider' }}>
<Box sx={{ display: 'flex', alignItems: 'center', mb: 3 }}>
<Typography variant="h6" sx={{ mr: 2, fontWeight: 700 }}>
{endpoint.id}
{endpoint.name || endpoint.id}
<Typography component="span" variant="caption" color="text.secondary" sx={{ ml: 1, fontWeight: 400 }}>
({endpoint.url})
</Typography>

View File

@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TSE Monitor</title>
<meta name="description" content="CloudTSE availability and response-time dashboard" />
<title>Monitor</title>
<meta name="description" content="Availability and response-time dashboard" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />

View File

@@ -24,6 +24,7 @@ for (const [key, value] of Object.entries(process.env)) {
const id = key.substring(9, key.length - 4);
ENDPOINTS.push({
id,
name: process.env[`ENDPOINT_${id}_NAME`] || id,
url: value,
expectJsonAttr: process.env[`ENDPOINT_${id}_EXPECT_JSON_ATTR`],
expectSubstring: process.env[`ENDPOINT_${id}_EXPECT_SUBSTRING`]
@@ -31,7 +32,7 @@ for (const [key, value] of Object.entries(process.env)) {
}
}
if (ENDPOINTS.length === 0) {
ENDPOINTS.push({ id: 'DEFAULT', url: process.env.TSE_URL || 'http://3.78.227.48:20001/' });
ENDPOINTS.push({ id: 'DEFAULT', name: 'Default Endpoint', url: process.env.TSE_URL || 'http://3.78.227.48:20001/' });
}
// ── DB ────────────────────────────────────────────────────────────────────────
@@ -294,7 +295,7 @@ const app = express();
app.use((_, res, next) => { res.setHeader('Access-Control-Allow-Origin', '*'); next(); });
app.get('/api/endpoints', (_, res) => {
res.json(ENDPOINTS.map(e => ({ id: e.id, url: e.url })));
res.json(ENDPOINTS.map(e => ({ id: e.id, name: e.name, url: e.url })));
});
app.get('/api/summary', (req, res) => {