debug: Add more detailed logging to renderStatusPanel
All checks were successful
Build and Push Docker Image / build (push) Successful in 26s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m8s
CI / Security audit (push) Successful in 1m21s
CI / Tests & coverage (push) Successful in 1m38s

This commit is contained in:
2026-05-19 22:33:09 +01:00
parent d3483f3be7
commit e5920b207f

View File

@@ -820,6 +820,7 @@ async function refreshStatusPanel() {
} }
function renderStatusPanel(data, panel) { function renderStatusPanel(data, panel) {
console.log('[Status] renderStatusPanel called with data:', data ? 'yes' : 'no', 'keys:', data ? Object.keys(data) : 'none');
const s = data.server; const s = data.server;
const hrs = Math.floor(s.uptimeSeconds / 3600); const hrs = Math.floor(s.uptimeSeconds / 3600);
const mins = Math.floor((s.uptimeSeconds % 3600) / 60); const mins = Math.floor((s.uptimeSeconds % 3600) / 60);
@@ -926,7 +927,13 @@ function renderStatusPanel(data, panel) {
html += `</tbody></table></div></div>`; html += `</tbody></table></div></div>`;
// Render into status-content div, not the whole panel (preserves webhooks section) // Render into status-content div, not the whole panel (preserves webhooks section)
const contentDiv = document.getElementById('status-content'); const contentDiv = document.getElementById('status-content');
if (contentDiv) contentDiv.innerHTML = html; console.log('[Status] contentDiv found:', !!contentDiv, 'HTML length:', html.length);
if (contentDiv) {
contentDiv.innerHTML = html;
console.log('[Status] HTML rendered, contentDiv innerHTML length:', contentDiv.innerHTML.length);
} else {
console.error('[Status] contentDiv not found!');
}
// Wire close button — addEventListener avoids CSP inline handler restrictions // Wire close button — addEventListener avoids CSP inline handler restrictions
const closeBtn = document.getElementById('status-close-btn'); const closeBtn = document.getElementById('status-close-btn');
if (closeBtn) closeBtn.addEventListener('click', closeStatusPanel); if (closeBtn) closeBtn.addEventListener('click', closeStatusPanel);