// Narrow server-rendered live-status enhancement. Fetches an HTML fragment // from the same origin and replaces only the dashboard live region. Does // not parse JSON, rebuild DOM from client state, or depend on any framework. (function () { "use strict"; var region = document.getElementById("live-status"); if (!region) { return; } setInterval(function () { fetch("/ui/_status_fragment", { headers: { Accept: "text/html" } }) .then(function (response) { if (!response.ok) { throw new Error("fragment refresh failed"); } return response.text(); }) .then(function (html) { region.innerHTML = html; }) .catch(function () { // Ignore transient network errors; the next tick will retry. }); }, 10000); })();