Skip to content

Commit 046f0ac

Browse files
simonjjCopilot
andcommitted
feat: show last-refreshed date on region availability page
Displays the generated_at timestamp from region-features.json as a human-readable date on the page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 681e9cd commit 046f0ac

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

β€Žaca-getting-started/region-availability.htmlβ€Ž

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,13 @@
327327
font-size: 0.9em;
328328
}
329329

330+
.last-refreshed {
331+
text-align: right;
332+
color: #605e5c;
333+
font-size: 0.85em;
334+
margin-bottom: 12px;
335+
}
336+
330337
/* Legend */
331338
.legend {
332339
display: flex;
@@ -485,7 +492,7 @@ <h1>🌍 Azure Container Apps β€” Region Availability</h1>
485492
let sortCol = null;
486493
let sortAsc = true;
487494

488-
// ── Fetch Data ────────────────────────────────────────────
495+
// ── Fetch Data ──────────────���──────────────���──────────────
489496
async function init() {
490497
try {
491498
const resp = await fetch(DATA_URL);
@@ -506,7 +513,7 @@ <h1>🌍 Azure Container Apps β€” Region Availability</h1>
506513
}
507514
}
508515

509-
// ── Render ────────────────────────────────────────────────
516+
// ── Render ────��──────────────��──────────────��─────────────
510517
function render() {
511518
loading.remove();
512519

@@ -569,6 +576,14 @@ <h1>🌍 Azure Container Apps β€” Region Availability</h1>
569576
<div class="summary-card"><div class="number">${regionsWithAZ}</div><div class="label">Regions with AZ</div></div>
570577
</div>`;
571578

579+
// Last refreshed timestamp
580+
const refreshed = data.generated_at ? new Date(data.generated_at) : null;
581+
const refreshedStr = refreshed
582+
? refreshed.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })
583+
+ ' at ' + refreshed.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', timeZoneName: 'short' })
584+
: 'Unknown';
585+
html += `<div class="last-refreshed">Data last refreshed: ${refreshedStr}</div>`;
586+
572587
// Controls
573588
html += `<div class="controls">
574589
<div class="search-row">
@@ -651,7 +666,7 @@ <h1>🌍 Azure Container Apps β€” Region Availability</h1>
651666
bindEvents();
652667
}
653668

654-
// ── Events ────────────────────────────────────────────────
669+
// ── Events ───��──────────────��──────────────��──────────────
655670
function bindEvents() {
656671
const searchInput = document.getElementById('search');
657672
if (searchInput) {
@@ -693,14 +708,14 @@ <h1>🌍 Azure Container Apps β€” Region Availability</h1>
693708
});
694709
}
695710

696-
// ── Util ──────────────────────────────────────────────────
711+
// ── Util ���──────────────���──────────────���──────────────���────
697712
function escapeHtml(str) {
698713
const div = document.createElement('div');
699714
div.textContent = str;
700715
return div.innerHTML;
701716
}
702717

703-
// ── Start ─────────────────────────────────────────────────
718+
// ── Start ─────���──────────────���──────────────���─────────────
704719
init();
705720
})();
706721
</script>

0 commit comments

Comments
Β (0)