diff --git a/hbd/server/templates/log.html b/hbd/server/templates/log.html index af01b6f..b27b944 100644 --- a/hbd/server/templates/log.html +++ b/hbd/server/templates/log.html @@ -87,6 +87,7 @@ var PAGE_SIZE = 200; var oldestTs = null; // ts of the oldest loaded row (pagination cursor) var seq = 0; // guards against out-of-order fetch responses + var newestTs = null; // ts of the newest loaded row (dedup guard for the WS tail) function escHtml(s) { return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,'''); @@ -165,6 +166,7 @@ data.events.forEach(function (ev) { html += logRowHtml(ev); if (ev.ts != null && (oldestTs == null || ev.ts < oldestTs)) oldestTs = ev.ts; + if (ev.ts != null && (newestTs == null || ev.ts > newestTs)) newestTs = ev.ts; }); box.insertAdjacentHTML('beforeend', html); if (!box.children.length) box.innerHTML = '