From b4fa5857ad3d232583d92dfda85a9cbe3643a084 Mon Sep 17 00:00:00 2001 From: seb Date: Tue, 7 Jul 2026 20:08:23 +0200 Subject: [PATCH] u --- dashboard/src/App.jsx | 2 +- index.html | 4 ++-- monitor.js | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dashboard/src/App.jsx b/dashboard/src/App.jsx index 84b9110..110d47c 100644 --- a/dashboard/src/App.jsx +++ b/dashboard/src/App.jsx @@ -56,7 +56,7 @@ function EndpointDashboard({ endpoint, range }) { - {endpoint.id} + {endpoint.name || endpoint.id} ({endpoint.url}) diff --git a/index.html b/index.html index 77cb1fb..9939478 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,8 @@ - TSE Monitor - + Monitor + diff --git a/monitor.js b/monitor.js index c9eb3c5..63b3783 100644 --- a/monitor.js +++ b/monitor.js @@ -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) => {