Add a logged-in-only status/debug panel at the bottom of the sidebar

Dumps every read-only status endpoint (health, offline/terrain build
status, regions, caches, hiking trails, kiwix, plugins, GNSS, LiveTrack)
as JSON, refreshed every 5s while open so a running build's progress
shows live.
This commit is contained in:
randy committed 2026-11-12 11:37:42 +01:00
1 parent 0051a0337c
commit cf483d183c
6 files changed
+137

No files matched your search

+3
View File
@@ -20,6 +20,7 @@ import { LAYERS_ICON, WAYPOINT_ICON, SUNRISE_ICON, SUNSET_ICON, PENDING_ICON } f
import { formatCoords, formatSunInfo } from "/js/sun.js";
import { notifySidePanelOpen, onlyOneSidePanelOpen } from "/js/panels.js";
import { isLoggedIn } from "/js/auth.js";
import { DebugControl } from "/js/debug.js";
import HomeButton from "/vendor/npmap-home-button/home-button.esm.js";
import OverviewMap from "/vendor/npmap-overview/overview.esm.js";
import * as maplibregl from "/vendor/maplibre-gl/maplibre-gl.mjs";
@@ -568,6 +569,8 @@ sidebar.insertAdjacentHTML("beforeend", `<div class="sidebar-group-label" title=
gnssControl.mount(sidebar);
new LiveTrackPanelControl(map).mount(sidebar);
if (isLoggedIn()) new DebugControl().mount(sidebar);
// The sidebar already has a "Base map" icon (opens the same panel) —
// this is a second entry point for it, grouped with Home/zoom on the map
// itself rather than off in the page's own side rail, matching NPS's