mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
SOTA & WWFF alert providers #17
This commit is contained in:
@@ -85,8 +85,15 @@ function addAlertRowsToTable(tbody, alerts) {
|
||||
// Format UTC times for display
|
||||
var start_time = moment.unix(a["start_time"]).utc();
|
||||
var start_time_formatted = start_time.format("YYYY-MM-DD HH:mm");
|
||||
var end_time = moment.unix(a["end_time"]).utc();
|
||||
var end_time_formatted = (end_time != null) ? end_time.format("YYYY-MM-DD HH:mm") : "Not specified";
|
||||
var end_time_unix = moment.unix(a["end_time"]);
|
||||
var end_time = end_time_unix.utc();
|
||||
var end_time_formatted = (end_time_unix != null && end_time_unix > 0 && end_time != null) ? end_time.format("YYYY-MM-DD HH:mm") : "---";
|
||||
|
||||
// Format DX flag
|
||||
var dx_flag = "<i class='fa-solid fa-circle-question'></i>";
|
||||
if (a["dx_flag"] && a["dx_flag"] != null && a["dx_flag"] != "") {
|
||||
dx_flag = a["dx_flag"];
|
||||
}
|
||||
|
||||
// Format dx country
|
||||
var dx_country = a["dx_country"]
|
||||
@@ -115,13 +122,13 @@ function addAlertRowsToTable(tbody, alerts) {
|
||||
// Format sig_refs
|
||||
var sig_refs = ""
|
||||
if (a["sig_refs"]) {
|
||||
sig_refs = a["sig_refs"].join(", ")
|
||||
sig_refs = a["sig_refs"].map(a => `<span class='nowrap'>${a}</span>`).join(", ");
|
||||
}
|
||||
|
||||
// Populate the row
|
||||
$tr.append(`<td class='nowrap'>${start_time_formatted}</td>`);
|
||||
$tr.append(`<td class='nowrap'>${end_time_formatted}</td>`);
|
||||
$tr.append(`<td class='nowrap'><span class='flag-wrapper hideonmobile' title='${dx_country}'>${a["dx_flag"]}</span><a class='dx-link' href='https://qrz.com/db/${a["dx_call"]}' target='_new'>${a["dx_call"]}</a></td>`);
|
||||
$tr.append(`<td class='nowrap'><span class='flag-wrapper hideonmobile' title='${dx_country}'>${dx_flag}</span><a class='dx-link' href='https://qrz.com/db/${a["dx_call"]}' target='_new'>${a["dx_call"]}</a></td>`);
|
||||
$tr.append(`<td class='hideonmobile'>${freqsModesText}</td>`);
|
||||
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
|
||||
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid fa-${a["icon"]}'></i></span> ${sigSourceText}</td>`);
|
||||
|
||||
Reference in New Issue
Block a user