From 163b5915f3e9c7a0d9f316423067e73f916ecf35 Mon Sep 17 00:00:00 2001 From: OE6DXD Date: Mon, 16 Mar 2026 11:41:50 +0100 Subject: [PATCH] stop automatic SWR image reloading Disable periodic and station-status-triggered SWR report refreshes on the web UI, and only use per-band updatedAt values for cache-busting image URLs. This prevents constant image refetching while still loading new images when their timestamps actually change. --- public/app.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/app.js b/public/app.js index 72c4933..2318254 100644 --- a/public/app.js +++ b/public/app.js @@ -293,7 +293,6 @@ async function init() { const route = currentRoute(); if (route === "/rms/swr" || route === "/rms") { refreshStatus().catch(() => {}); - refreshSwrReport().catch(() => {}); } }, SWR_DETAIL_REFRESH_MS); } @@ -2215,7 +2214,7 @@ function renderSwrBandsInto(container, report, options = {}) { container.classList.remove("swr-summary-list"); for (const band of bands) { - const imageVersion = band.updatedAt || report.generatedAt || ""; + const imageVersion = band.updatedAt || ""; const imageUrl = withCacheVersion(band.imageUrl, imageVersion); const block = document.createElement("div"); block.className = "plugin-block"; @@ -4687,7 +4686,6 @@ function connectEvents() { }; eventSource.addEventListener("station.status.changed", async () => { await refreshStatus(); - await refreshSwrReport(); if (canSeeActivityLog()) { await refreshActivityLog(); } @@ -4748,7 +4746,7 @@ function connectEvents() { await refreshStatus(); }); eventSource.addEventListener("swr.report.changed", async () => { - await refreshSwrReport(); + // SWR images are intentionally not auto-reloaded to avoid repeated browser fetches. }); eventSource.addEventListener("plugin.provider.changed", async () => { await refreshPlugins();