Refactor of caching & data storage part 3 #118

This commit is contained in:
Ian Renton
2026-07-31 17:45:09 +01:00
parent 818fd2d504
commit 0f59af6f9e
24 changed files with 592 additions and 268 deletions
+28 -11
View File
@@ -23,6 +23,7 @@ info:
* Added `comment_names` to SIGs in the `/options`, to reflect how they might be referred to in spot comments where
it differs from their `name`.
* Added `propagation_mode` field to spots
* Added `sig_ref_data_providers` to status and removed `cleanup`
### 1.3
@@ -1720,6 +1721,28 @@ components:
is zero, the provider has never updated.
example: 1759579508
SIGRefDataProviderStatus:
type: object
properties:
sig_name:
type: string
description: The name of the SIG.
example: WWFF
enabled:
type: boolean
description: Whether the provider is enabled or not.
example: true
status:
type: string
description: The status of the provider.
example: OK
last_updated:
type: number
description: >
The last time at which this provider received data, UTC seconds since UNIX epoch. If this
is zero, the provider has never updated.
example: 1759579508
SpotList:
type: array
items:
@@ -1787,17 +1810,6 @@ components:
type: integer
description: Number of alerts currently in the system.
example: 123
"cleanup":
type: object
properties:
status:
type: string
description: The status of the cleanup thread
example: OK
last_ran:
type: number
description: The last time the cleanup operation ran, UTC seconds since UNIX epoch.
example: 1759579508
"webserver":
type: object
properties:
@@ -1828,6 +1840,11 @@ components:
description: An array of all the solar conditions providers.
items:
$ref: '#/components/schemas/SolarConditionsProviderStatus'
sig_ref_data_providers:
type: array
description: An array of all the SIG reference data providers.
items:
$ref: '#/components/schemas/SIGRefDataProviderStatus'
Options:
type: object
+9 -3
View File
@@ -12,9 +12,6 @@ function loadStatus() {
$("#web-server-last-api").text(moment.unix(jsonData["webserver"]["last_api_access"]).utc().fromNow());
$("#web-server-last-page").text(moment.unix(jsonData["webserver"]["last_page_access"]).utc().fromNow());
$("#cleanup-status").text(jsonData["cleanup"]["status"]);
$("#cleanup-last-ran").text(moment.unix(jsonData["cleanup"]["last_ran"]).utc().fromNow());
jsonData["spot_providers"].forEach(p => {
$("#spot-providers-status-container").append(`
<div class="row row-cols-1 row-cols-md-4 g-4 mb-2">
@@ -42,6 +39,15 @@ function loadStatus() {
<div class="col">Last updated: ${(p["enabled"] && p["last_updated"] > 0) ? moment.unix(p["last_updated"]).utc().fromNow() : "N/A"}</div>
</div>`);
});
jsonData["sig_ref_data_providers"].forEach(p => {
$("#sig-ref-data-providers-status-container").append(`
<div class="row row-cols-1 row-cols-md-4 g-4 mb-2">
<div class="col"><strong>${p["sig_name"]}</strong></div>
<div class="col">Status: ${p["status"]}</div>
<div class="col">Last updated: ${(p["enabled"] && p["last_updated"] > 0) ? moment.unix(p["last_updated"]).utc().fromNow() : "N/A"}</div>
</div>`);
});
});
}