refresh SWR images only when checks finish
Keep periodic/status-driven SWR image reloads disabled, but refresh the SWR report when swr.run.finished or swr.report.changed events arrive so newly generated images are loaded once via updated timestamps.
This commit is contained in:
@@ -4744,9 +4744,10 @@ function connectEvents() {
|
|||||||
});
|
});
|
||||||
eventSource.addEventListener("swr.run.finished", async () => {
|
eventSource.addEventListener("swr.run.finished", async () => {
|
||||||
await refreshStatus();
|
await refreshStatus();
|
||||||
|
await refreshSwrReport();
|
||||||
});
|
});
|
||||||
eventSource.addEventListener("swr.report.changed", async () => {
|
eventSource.addEventListener("swr.report.changed", async () => {
|
||||||
// SWR images are intentionally not auto-reloaded to avoid repeated browser fetches.
|
await refreshSwrReport();
|
||||||
});
|
});
|
||||||
eventSource.addEventListener("plugin.provider.changed", async () => {
|
eventSource.addEventListener("plugin.provider.changed", async () => {
|
||||||
await refreshPlugins();
|
await refreshPlugins();
|
||||||
|
|||||||
Reference in New Issue
Block a user