app.js: show every alert with its check date and id (section 21)

This commit is contained in:
ai-bot committed 2026-10-02 14:19:20 +00:00
1 parent 9cb2d5072b
commit dc60de044b
1 file changed
+7 -2
+7 -2
View File
@@ -116,7 +116,12 @@ function createAlertItem(alert) {
const message = document.createElement("p"); const message = document.createElement("p");
message.textContent = alert.message; message.textContent = alert.message;
item.append(source, message); // Every alert names the saved check it came from (section 21).
const origin = document.createElement("p");
origin.className = "alert-origin";
origin.textContent = `From check ${alert.check_id} · ${alert.checked_at}`;
item.append(source, message, origin);
return item; return item;
} }
@@ -153,7 +158,7 @@ async function loadAlerts() {
const alerts = await response.json(); const alerts = await response.json();
if (!alerts.length) { if (!alerts.length) {
alertsList.replaceChildren(createEmptyState( alertsList.replaceChildren(createEmptyState(
"No alerts. The most recent saved check has no result that needs follow-up.", "No alerts. No saved check has a result that needs follow-up.",
)); ));
alertCount.textContent = "No alerts"; alertCount.textContent = "No alerts";
return; return;