Now that SIGs are rebranded as Activities, we can merge DXpedition and Contest into that without it being too weird, and get rid of AlertType #147

This commit is contained in:
Ian Renton
2026-09-18 16:50:00 +01:00
parent bf9b4ac68c
commit cea90695ba
21 changed files with 92 additions and 113 deletions
+5 -11
View File
@@ -14,7 +14,12 @@ info:
Spothole's source code is located at https://git.ianrenton.com/ian/spothole and the README there provides setup instructions if you would like to run your own copy. A demonstration server of Spothole is located at https://spothole.app. The README also contains some examples of how you could query the API of the demonstration server to integrate the data into your own apps.
## Changelog
### 2.2
* Renamed AMSAT SIG to "Satellite" as AMSAT is a specific organisation not just a general term for satellite QSOs
* Removed `alert_type` from alert data. Contest, DXpedition and Satellite alerts now give those values in `sig` instead, alongside the existing outdoor activity programmes. Teeeeechnically a breaking change but AlertType is so new I doubt anyone is using it yet, so slipped this one in anyway. Sorry :)
### 2.1
* Added AMSAT, EME, DTMBA, FEA, BIWOTA, COTA & PGA SIGs
@@ -952,14 +957,6 @@ components:
- TOILET
example: PARK
AlertType:
type: string
enum:
- XOTA
- DXPEDITION
- CONTEST
example: XOTA
Continent:
type: string
enum:
@@ -1489,9 +1486,6 @@ components:
items:
$ref: '#/components/schemas/ActivityRef'
description: Activity references. We allow multiple here for e.g. n-fer activations, unlike ADIF SIG_INFO. Still named "sig_refs" in the API for backwards compatibility.
alert_type:
description: "The type of alert this is: xOTA, DXpedition, or Contest."
$ref: "#/components/schemas/AlertType"
url:
type: string
description: A URL linking to more information about the alert, e.g. DXpedition or contest info.
+14 -24
View File
@@ -54,7 +54,7 @@ function updateTable() {
const showDX = $("#tableShowDX")[0].checked;
const showFreqsModes = $("#tableShowFreqsModes")[0].checked;
const showComment = $("#tableShowComment")[0].checked;
const showType = $("#tableShowType")[0].checked;
const showActivity = $("#tableShowActivity")[0].checked;
const showRef = $("#tableShowRef")[0].checked;
// Populate table with headers
@@ -75,11 +75,11 @@ function updateTable() {
if (showComment) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Comment</th>`);
}
if (showType) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Type</th>`);
if (showActivity) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Activity</th>`);
}
if (showRef) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Ref.</th>`);
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Reference</th>`);
}
table.find('tbody').empty();
@@ -151,7 +151,7 @@ function addAlertRowsToTable(tbody, alerts) {
const showDX = $("#tableShowDX")[0].checked;
const showFreqsModes = $("#tableShowFreqsModes")[0].checked;
const showComment = $("#tableShowComment")[0].checked;
const showType = $("#tableShowType")[0].checked;
const showActivity = $("#tableShowActivity")[0].checked;
const showRef = $("#tableShowRef")[0].checked;
// Get times for the alert, and convert to local time if necessary.
@@ -210,14 +210,14 @@ function addAlertRowsToTable(tbody, alerts) {
if (a["dx_calls"] != null) {
dx_calls_html = a["dx_calls"].map(call => `<a class='dx-link' href='https://qrz.com/db/${call}' target='_new'>${call}</a>`).join(", ");
}
if (dx_calls_html === "" && a["alert_type"] === "CONTEST") {
if (dx_calls_html === "" && a["sig"] === "Contest") {
// Contest = true and no DX callsigns, so display "Contest"
dx_calls_html = "Contest"
}
// Format DXpedition country
let dx_country_html = "";
if (a["alert_type"] === "DXPEDITION" && a["dx_country"] != null && a["dx_country"] !== "") {
if (a["sig"] === "DXpedition" && a["dx_country"] != null && a["dx_country"] !== "") {
dx_country_html = `<br/>${a["dx_country"]}`;
}
@@ -250,20 +250,10 @@ function addAlertRowsToTable(tbody, alerts) {
}
// Type, activity or fallback to source
let activityTypeText = a["source"];
if (a["alert_type"] === "CONTEST") {
activityTypeText = "Contest";
} else if (a["alert_type"] === "DXPEDITION") {
activityTypeText = "DXpedition";
} else if (a["alert_type"] === "SATELLITE") {
activityTypeText = "Satellite";
} else if (a["alert_type"] === "XOTA") {
if (a["sig"]) {
activityTypeText = a["sig"];
} else {
activityTypeText = "xOTA";
}
// Activity or fallback to "General DX"
let activityText = "General DX";
if (a["sig"]) {
activityText = a["sig"];
}
// Format activity refs
@@ -296,8 +286,8 @@ function addAlertRowsToTable(tbody, alerts) {
if (showComment) {
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
}
if (showType) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${activityTypeText}</td>`);
if (showActivity) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${activityText}</td>`);
}
if (showRef) {
$tr.append(`<td class='hideonmobile'>${activityRefs}</td>`);
@@ -314,7 +304,7 @@ function addAlertRowsToTable(tbody, alerts) {
}
const $td2 = $("<td colspan='100'>");
if (showType) {
if (showActivity) {
$td2.append(`<span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> `);
}
if (showRef) {
+13 -13
View File
@@ -128,7 +128,7 @@ function updateTable() {
const showComment = $("#tableShowComment")[0].checked;
const showBearing = $("#tableShowBearing")[0].checked && userPos != null;
const showDistance = $("#tableShowDistance")[0].checked && userPos != null;
const showType = $("#tableShowType")[0].checked;
const showActivity = $("#tableShowActivity")[0].checked;
const showRef = $("#tableShowRef")[0].checked;
const showDE = $("#tableShowDE")[0].checked;
const showWorkedCheckbox = $("#tableShowWorkedCheckbox")[0].checked;
@@ -157,11 +157,11 @@ function updateTable() {
if (showDistance) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Distance</th>`);
}
if (showType) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Type</th>`);
if (showActivity) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Activity</th>`);
}
if (showRef) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Ref.</th>`);
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Reference</th>`);
}
if (showDE) {
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>DE</th>`);
@@ -208,7 +208,7 @@ function createNewTableRowsForSpot(s, highlightNew) {
const showComment = $("#tableShowComment")[0].checked;
const showBearing = $("#tableShowBearing")[0].checked && userPos != null;
const showDistance = $("#tableShowDistance")[0].checked && userPos != null;
const showType = $("#tableShowType")[0].checked;
const showActivity = $("#tableShowActivity")[0].checked;
const showRef = $("#tableShowRef")[0].checked;
const showDE = $("#tableShowDE")[0].checked;
const showWorkedCheckbox = $("#tableShowWorkedCheckbox")[0].checked;
@@ -327,10 +327,10 @@ function createNewTableRowsForSpot(s, highlightNew) {
}
}
// Format "type" (activity or fallback to source)
let typeText = s["source"];
// Format activity
let activityText = "General DX";
if (s["sig"]) {
typeText = s["sig"];
activityText = s["sig"];
}
// Format activity refs
@@ -397,8 +397,8 @@ function createNewTableRowsForSpot(s, highlightNew) {
if (showDistance) {
$tr.append(`<td class='nowrap hideonmobile'>${distanceText}</td>`);
}
if (showType) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${typeText}</td>`);
if (showActivity) {
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${activityText}</td>`);
}
if (showRef) {
$tr.append(`<td class='hideonmobile' style='max-width: 11em;'>${activityRefs}</td>`);
@@ -410,7 +410,7 @@ function createNewTableRowsForSpot(s, highlightNew) {
$tr.append(`<td class='nowrap hideonmobile'>${workedCheckbox}</td>`);
}
// Second row for mobile view only, containing type, ref & comment
// Second row for mobile view only, containing activity, ref & comment
const $tr2 = $("<tr class='hidenotonmobile'>");
// Apply styles as per the first row
@@ -429,8 +429,8 @@ function createNewTableRowsForSpot(s, highlightNew) {
const $td2 = $("<td colspan='100'>");
const $td2floatleft = $(`<div style="float: left;">`);
if (showType) {
$td2floatleft.append(`<span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${typeText} `);
if (showActivity) {
$td2floatleft.append(`<span class='icon-wrapper'><i class='fa-solid ${s["icon"]}'></i></span> ${activityText} `);
}
if (showRef) {
$td2floatleft.append(`${activityRefs} `);
+1 -1
View File
@@ -60,7 +60,7 @@ function generateActivitiesMultiToggleFilterCard(activity_options) {
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
$grid.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${(o["region_flag"] != null) ? o['region_flag'] : ''}</label></div></div>`);
});
$body.append(`<div class="w-100"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-NO_SIG" value="NO_SIG" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-NO_SIG" for="filter-button-sig-NO_SIG"><i class="fa-solid fa-tower-cell"></i> General DX</label></div></div>`);
$body.append(`<div class="w-100 mb-1"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-NO_SIG" value="NO_SIG" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-NO_SIG" for="filter-button-sig-NO_SIG"><i class="fa-solid fa-tower-cell"></i> General DX</label></div></div>`);
$body.append($grid);
});