Show the closure source and the three-step card state (32.9 points 1 and 2)

This commit is contained in:
ai-bot committed 2026-10-25 17:55:56 +00:00
1 parent 1b453382b5
commit efab6d10af
1 file changed
+16 -8
+16 -8
View File
@@ -169,16 +169,18 @@ function securityTable(securityChecks) {
} }
function closedAlertsTable(closedAlerts) { function closedAlertsTable(closedAlerts) {
// The closures that belong to a key are shown with the code, the action // Every closure of the check is shown with the source of the alert it closed,
// written out as a readable label, and the date (section 27). The source is // the code, the action written out as a readable label, and the date
// not a column: the alert is already named by its code, and the closure // (section 27). The source is what tells the key form and the software form
// belongs to a key (section 32.1). // of the same code apart, so it has a column of its own (section 32.9
// point 1).
if (!closedAlerts.length) { if (!closedAlerts.length) {
return emptyNote("No follow-up was closed on this check."); return emptyNote("No follow-up was closed on this check.");
} }
return dataTable( return dataTable(
["Alert", "Action", "Closed"], ["Source", "Alert", "Action", "Closed"],
closedAlerts.map((entry) => [ closedAlerts.map((entry) => [
entry.source,
entry.code, entry.code,
ACTION_LABELS[entry.action] || entry.action, ACTION_LABELS[entry.action] || entry.action,
entry.acknowledged_at, entry.acknowledged_at,
@@ -229,9 +231,15 @@ function keyNamesText(check) {
} }
function followUpText(check) { function followUpText(check) {
// The summary reports whether the check raised anything to follow up, so the // The card reports the state of the check as it stands now, in three steps:
// card says so in one word (section 32.2 point 14). // nothing was raised, something is still open, or everything that was raised
return check.needs_follow_up ? "Needs follow-up" : "All OK"; // is closed (section 32.9 point 2). needs_follow_up is frozen at save time,
// while follow_up_open follows the merged, unacknowledged alerts the
// dashboard shows, so an alert a newer check re-raised is the newer check's.
if (!check.needs_follow_up) {
return "All OK";
}
return check.follow_up_open ? "Needs follow-up" : "Follow-up closed";
} }
function renderList(checks) { function renderList(checks) {