fix(ui): Add status-content container to preserve webhooks panel
All checks were successful
Build and Push Docker Image / build (push) Successful in 37s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 50s
CI / Security audit (push) Successful in 1m1s
CI / Tests & coverage (push) Successful in 1m19s

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.
This commit is contained in:
2026-05-19 22:27:11 +01:00
parent e2757768c7
commit 57908e2b9e
2 changed files with 6 additions and 2 deletions

View File

@@ -920,9 +920,11 @@ function renderStatusPanel(data, panel) {
}
html += `</tbody></table></div></div>`;
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 => {

View File

@@ -69,6 +69,8 @@
</header>
<div id="status-panel" class="status-panel" style="display: none;">
<!-- Status content gets rendered here -->
<div id="status-content"></div>
<!-- Webhooks Configuration Panel (nested inside status) -->
<div class="webhooks-section" id="webhooks-section" style="display: none;">
<div class="webhooks-header" id="webhooks-header">