From: Giorgio Ravera Date: Thu, 19 Mar 2026 21:54:02 +0000 (+0100) Subject: Minor changes to about X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=679da405b04da98b123a220bd6b46f81a23910d1;p=network-manager.git Minor changes to about --- diff --git a/backend/routes/about.py b/backend/routes/about.py index f053eb9..26ac077 100644 --- a/backend/routes/about.py +++ b/backend/routes/about.py @@ -2,6 +2,7 @@ # Import standard modules from fastapi import APIRouter +from datetime import datetime, timezone # Import local modules from backend.db.config import get_config @@ -19,7 +20,9 @@ router = APIRouter() def about(): return { "app": { + "name": settings.APP_NAME, "version": settings.APP_VERSION, }, "domain": settings.DOMAIN, + "server_time": datetime.now(timezone.utc).isoformat(), } diff --git a/frontend/js/index.js b/frontend/js/index.js index 5ffebca..2c5faf3 100644 --- a/frontend/js/index.js +++ b/frontend/js/index.js @@ -289,6 +289,11 @@ if (restoreModal) { } // ------------------------------------------------------- -// KICKOFF +// Periodic API Check // ------------------------------------------------------- -apiCheck(); +async function periodicTest() { + await apiCheck(); + setTimeout(periodicTest, 10000); +} + +periodicTest(); diff --git a/frontend/js/services.js b/frontend/js/services.js index 0055701..d86492c 100644 --- a/frontend/js/services.js +++ b/frontend/js/services.js @@ -6,7 +6,7 @@ export async function apiCheck() { if (!pill) return; try { - const r = await fetch('/api/health'); + const r = await fetch('/about'); if (r.ok) { pill.textContent = 'API OK'; pill.classList.remove('btn-outline-primary');