Support BOTA alerts. Closes #58

This commit is contained in:
Ian Renton
2025-10-31 14:06:22 +00:00
parent 193838b9d3
commit 65d546ef7e
15 changed files with 107 additions and 29 deletions

View File

@@ -213,9 +213,17 @@ function addAlertRowsToTable(tbody, alerts) {
}
// Format sig_refs
var sig_refs = ""
if (a["sig_refs"]) {
sig_refs = a["sig_refs"].map(a => `<span class='nowrap'>${a}</span>`).join(", ");
var sig_refs = "";
if (a["sig_refs"] != null) {
var items = []
for (var i = 0; i < a["sig_refs"].length; i++) {
if (a["sig_refs"][i]["url"] != null) {
items[i] = `<a href='${a["sig_refs"][i]["url"]}' title='${a["sig_refs"][i]["name"]}' target='_new' class='sig-ref-link'>${a["sig_refs"][i]["id"]}</a>`
} else {
items[i] = `${a["sig_refs"][i]["id"]}`
}
}
sig_refs = items.join(", ");
}
// Populate the row