diff --git a/server/index.js b/server/index.js index 40b38cc76..3c40d158b 100644 --- a/server/index.js +++ b/server/index.js @@ -167,6 +167,13 @@ app.get('/healthz', (req, res) => { app.get('/api/health', (req, res) => { try { const healthSummary = stateManager.getHealthSummary(); + // Add system info including placeholder status + const state = stateManager.getState(); + healthSummary.system = { + configPlaceholder: state.isConfigPlaceholder || false, + hasData: stateManager.hasData(), + clientsInitialized: Object.keys(global.pulseApiClients?.apiClients || {}).length > 0 + }; res.json(healthSummary); } catch (error) { console.error("Error in /api/health:", error); diff --git a/src/public/setup.html b/src/public/setup.html index 013816bec..7132b81f6 100644 --- a/src/public/setup.html +++ b/src/public/setup.html @@ -540,8 +540,8 @@ console.log('Health check response:', health); // Check if the server has successfully loaded configuration - // Look for signs that API clients are initialized and not in placeholder mode - if (health.system && health.system.configPlaceholder === false) { + // Look for overall health and recent activity + if (health.overall === 'healthy' && health.lastUpdate && health.connections && health.connections.total > 0) { showSuccess('Configuration applied successfully!', true, false); // Re-enable the save button