From 57908e2b9eae61f8d1e06a66df256bae056223d3 Mon Sep 17 00:00:00 2001 From: Gronod Date: Tue, 19 May 2026 22:27:11 +0100 Subject: [PATCH] fix(ui): Add status-content container to preserve webhooks panel The webhooks panel was being destroyed when renderStatusPanel set panel.innerHTML. Added a dedicated #status-content div for status data, keeping webhooks section intact when status refreshes. --- public/app.js | 6 ++++-- public/index.html | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/app.js b/public/app.js index d592a06..ed8bbc8 100644 --- a/public/app.js +++ b/public/app.js @@ -920,9 +920,11 @@ function renderStatusPanel(data, panel) { } html += ``; - panel.innerHTML = html; + // Render into status-content div, not the whole panel (preserves webhooks section) + const contentDiv = document.getElementById('status-content'); + if (contentDiv) contentDiv.innerHTML = html; // Wire close button — addEventListener avoids CSP inline handler restrictions - const closeBtn = panel.querySelector('#status-close-btn'); + const closeBtn = document.getElementById('status-close-btn'); if (closeBtn) closeBtn.addEventListener('click', closeStatusPanel); // Set bar widths via JS DOM assignment — immune to CSP style-src restrictions panel.querySelectorAll('.timing-bar[data-w]').forEach(el => { diff --git a/public/index.html b/public/index.html index ae0c43f..325f222 100644 --- a/public/index.html +++ b/public/index.html @@ -69,6 +69,8 @@