From 6bddccb91accf3210d6dad7864a8de424411613d Mon Sep 17 00:00:00 2001 From: david kiania Date: Fri, 26 Jun 2026 15:33:32 +0300 Subject: [PATCH] feat(tickets): per-dataset "Last updated" freshness in the explorer Add a "Last updated EAT" readout under the ticket-explorer Time filter (right-aligned, its own line) so data freshness is visible while searching, for both INC and CRQ. Also fix renderIncMetrics to read freshness[DS] instead of the hardcoded freshness.inc, so the overview "updated" stamp reflects the active dataset. Co-Authored-By: Claude Opus 4.8 --- src/index.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 9284de8..f27ba79 100644 --- a/src/index.html +++ b/src/index.html @@ -140,6 +140,8 @@ .ff.custom { display: none; } .ff.custom.show { display: flex; } .x-filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; } + /* Data-freshness readout: wraps to its own full-width line under the filter row, right-aligned. */ + .x-fresh { flex-basis: 100%; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; } /* ── Content grid ────────────────────────────────────────────────────── */ main { padding: 16px 18px 40px; display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); } @@ -474,6 +476,7 @@
+
Search by ticket id, engineer, cluster, state and time.
@@ -1218,8 +1221,13 @@ function renderIncMetrics(m, freshness) { `
${num(cr.per_day_avg, 1)}Closures / day
`, ]; $('tk-metrics').innerHTML = tiles.join(''); - const fr = freshness && freshness.inc; + // Freshness is per-dataset — show the ACTIVE dataset's last ingest (was hardcoded to inc). + const fr = freshness && freshness[DS]; $('tk-fresh').textContent = fr ? `updated ${eatShort(fr.ingested_at)} · ${intg(fr.records_ingested)} records` : ''; + // Mirror it in the ticket-explorer filter bar (below the Time field) so freshness is + // visible while searching, for both INC and CRQ. + const xf = $('tk-x-fresh'); + if (xf) xf.textContent = fr ? `Last updated ${eatShort(fr.ingested_at)} EAT` : ''; } // ── Ticket explorer (search) — GET /webhook/inc-search ──────────────────────