diff --git a/hbd/server/templates/plugins.html b/hbd/server/templates/plugins.html index b7eb804..0bc946f 100644 --- a/hbd/server/templates/plugins.html +++ b/hbd/server/templates/plugins.html @@ -1305,9 +1305,12 @@ // ── Auto-refresh (30 s) ───────────────────────────────────────────────── setInterval(() => { + document.querySelectorAll('.host-card').forEach(card => { + fetchHostGlance(card.dataset.hostname); + }); + document.querySelectorAll('.host-card:not(.collapsed)').forEach(card => { const hostname = card.dataset.hostname; - fetchHostGlance(hostname); card.querySelectorAll('.plugin-accordion:not(.collapsed)').forEach(acc => { const pname = acc.dataset.plugin; @@ -1327,31 +1330,16 @@ // ── Init ──────────────────────────────────────────────────────────────── document.addEventListener('DOMContentLoaded', () => { - // If a host fragment is in the URL, expand and scroll to that host; - // otherwise expand the first host as before. - const hash = window.location.hash; - if (hash) { - const hostname = decodeURIComponent(hash.slice(1)); + // Fetch glance data for every host immediately so the strip is always populated. + document.querySelectorAll('.host-card').forEach(card => { + fetchHostGlance(card.dataset.hostname); + }); + + // Expand and load info for the target host (URL hash or first host). + function expandHost(hostname) { const card = document.querySelector(`.host-card[data-hostname="${hostname}"]`); - if (card) { - card.classList.remove('collapsed'); - fetchHostGlance(hostname); - fetchHostInfo(hostname).then(data => { - infoCache[hostname] = data; - renderInfoSection(hostname, data); - }).catch(() => { - const el = document.getElementById(`info-${hostname}`); - if (el) el.innerHTML = '