Neutralize box/host names in comments (hub box / bridge box instead of internal hostnames)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@ async function refresh(){
|
|||||||
applyFederationExtra(j);
|
applyFederationExtra(j);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On the AlabamaLink box (aldmr) fold the AlabamaLink line INTO the existing
|
// On the AlabamaLink box fold the AlabamaLink line INTO the existing
|
||||||
// federation marquee so both scroll together in the one bar — same style, no
|
// federation marquee so both scroll together in the one bar — same style, no
|
||||||
// second banner. Every other box keeps just the federation line. Gated on the
|
// second banner. Every other box keeps just the federation line. Gated on the
|
||||||
// local reflector identity from the status (KT4ROY / alabama.reflector-network.com),
|
// local reflector identity from the status (KT4ROY / alabama.reflector-network.com),
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ function cfg(): array {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// redis() / redis_connect() / redis_scan_mget() come from auth/lib/redis.php
|
// redis() / redis_connect() / redis_scan_mget() come from auth/lib/redis.php
|
||||||
// (copy of callmgr2/www-mumien/auth/lib/redis.php).
|
// (copy of <dmr-portal>/auth/lib/redis.php).
|
||||||
require __DIR__ . '/lib/redis.php';
|
require __DIR__ . '/lib/redis.php';
|
||||||
// json_in/json_out, CSRF and rate limiting come from auth/lib/http.php (copy of
|
// json_in/json_out, CSRF and rate limiting come from auth/lib/http.php (copy of
|
||||||
// callmgr2's); the rate-limit keys keep this site's namespace.
|
// callmgr2's); the rate-limit keys keep this site's namespace.
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
// acl.php — shared PHP helper for every web (dmr-web, svx-web).
|
// acl.php — shared PHP helper for every web (dmr-web, svx-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/auth/lib/acl.php; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/auth/lib/acl.php; other repos carry a COPY.
|
||||||
// Admin-on-admin checks. Needs acct_admin_level() and json_out() from the site.
|
// Admin-on-admin checks. Needs acct_admin_level() and json_out() from the site.
|
||||||
|
|
||||||
// An admin may change another account only when their own level is strictly
|
// An admin may change another account only when their own level is strictly
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
// html.php — shared PHP helper for every web (dmr-web, svx-web, svxlink-web).
|
// html.php — shared PHP helper for every web (dmr-web, svx-web, svxlink-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/auth/lib/html.php; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/auth/lib/html.php; other repos carry a COPY.
|
||||||
// HTML escaping for server-rendered pages.
|
// HTML escaping for server-rendered pages.
|
||||||
|
|
||||||
// Escape for HTML text and attribute context (quotes included, invalid UTF-8 replaced).
|
// Escape for HTML text and attribute context (quotes included, invalid UTF-8 replaced).
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
// http.php — shared PHP helper for every web (dmr-web, svx-web).
|
// http.php — shared PHP helper for every web (dmr-web, svx-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/auth/lib/http.php; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/auth/lib/http.php; other repos carry a COPY.
|
||||||
// JSON request/response, CSRF check, Redis-backed rate limiting.
|
// JSON request/response, CSRF check, Redis-backed rate limiting.
|
||||||
// Loaded by auth/lib.php; needs cfg() from the page's own lib.php.
|
// Loaded by auth/lib.php; needs cfg() from the page's own lib.php.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
// redis.php — shared PHP helper for every web (dmr-web, svx-web).
|
// redis.php — shared PHP helper for every web (dmr-web, svx-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/auth/lib/redis.php; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/auth/lib/redis.php; other repos carry a COPY.
|
||||||
// Redis connections (main + aux) and the batched SCAN+MGET read — the only way to read many keys.
|
// Redis connections (main + aux) and the batched SCAN+MGET read — the only way to read many keys.
|
||||||
// Loaded by auth/lib.php; needs cfg() from the page's own lib.php.
|
// Loaded by auth/lib.php; needs cfg() from the page's own lib.php.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
// shell.php — shared PHP helper for every web (dmr-web, svx-web, svxlink-web).
|
// shell.php — shared PHP helper for every web (dmr-web, svx-web, svxlink-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/auth/lib/shell.php; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/auth/lib/shell.php; other repos carry a COPY.
|
||||||
|
|
||||||
// Shell-argument quoting for the few pages that run local helpers.
|
// Shell-argument quoting for the few pages that run local helpers.
|
||||||
function sh_arg($v): string { return escapeshellarg((string)$v); }
|
function sh_arg($v): string { return escapeshellarg((string)$v); }
|
||||||
|
|||||||
+3
-3
@@ -48,8 +48,8 @@ function renderLastheard(payload){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Network bridge directory (crawled from every reflector): so a bridge that
|
// Network bridge directory (crawled from every reflector): so a bridge that
|
||||||
// arrives bare over a trunk (speed: node/system empty) renders IDENTICALLY to
|
// arrives bare over a trunk (hub reflector: node/system empty) renders IDENTICALLY to
|
||||||
// where it is a local client (aldmr: astmeta filled node/system). Same code,
|
// where it is a local client (bridge box: astmeta filled node/system). Same code,
|
||||||
// same result on both boxes.
|
// same result on both boxes.
|
||||||
const bn = (window.__svxportal_lastStatus && window.__svxportal_lastStatus.bridge_nodes) || {};
|
const bn = (window.__svxportal_lastStatus && window.__svxportal_lastStatus.bridge_nodes) || {};
|
||||||
const now = Math.floor(Date.now()/1000);
|
const now = Math.floor(Date.now()/1000);
|
||||||
@@ -72,7 +72,7 @@ function renderLastheard(payload){
|
|||||||
// Callsign column = the callsign field as-is (e.g. the trunk callsign
|
// Callsign column = the callsign field as-is (e.g. the trunk callsign
|
||||||
// KT4ROY-ASL). The gateway/reflector descriptor ("East Coast Reflector via
|
// KT4ROY-ASL). The gateway/reflector descriptor ("East Coast Reflector via
|
||||||
// 45225 / W2ECR") lives in the Location column. Uniform on every box: an
|
// 45225 / W2ECR") lives in the Location column. Uniform on every box: an
|
||||||
// AllStar row (aldmr) and the same talker arriving over the trunk (speed)
|
// AllStar row (bridge box) and the same talker arriving over the trunk (hub)
|
||||||
// render identically — the backend already fills callsign + location, the
|
// render identically — the backend already fills callsign + location, the
|
||||||
// web just shows them, it never re-derives the name.
|
// web just shows them, it never re-derives the name.
|
||||||
const csCell = `<b>${escHtml(e.callsign || eSystem || '')}</b>`;
|
const csCell = `<b>${escHtml(e.callsign || eSystem || '')}</b>`;
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// api.js — shared HTTP helpers for every web (dmr-web, svx-web, svxlink-web).
|
// api.js — shared HTTP helpers for every web (dmr-web, svx-web, svxlink-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/api.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/api.js; other repos carry a COPY.
|
||||||
//
|
//
|
||||||
// apiFetch(url, {method, body, form, csrf, headers, quiet}) → {ok, status, json}
|
// apiFetch(url, {method, body, form, csrf, headers, quiet}) → {ok, status, json}
|
||||||
// apiGet(url, opts) → json | null GET, cache: no-store
|
// apiGet(url, opts) → json | null GET, cache: no-store
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// auth_ui.js — shared sign-in / register / sign-out transport (dmr-web, svx-web).
|
// auth_ui.js — shared sign-in / register / sign-out transport (dmr-web, svx-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/auth_ui.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/auth_ui.js; other repos carry a COPY.
|
||||||
// Needs lib/api.js. Pages keep their own field validation and messages; this
|
// Needs lib/api.js. Pages keep their own field validation and messages; this
|
||||||
// owns the request/response contract so both webs behave the same.
|
// owns the request/response contract so both webs behave the same.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// changelog.js — shared "recent updates" viewer (dmr-web, svx-web).
|
// changelog.js — shared "recent updates" viewer (dmr-web, svx-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/changelog.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/changelog.js; other repos carry a COPY.
|
||||||
// Reads changelog.json (newest first, {date, repo, hash, type, summary}) and
|
// Reads changelog.json (newest first, {date, repo, hash, type, summary}) and
|
||||||
// renders a client-side paginated list. Needs lib/fmt.js (escHtml).
|
// renders a client-side paginated list. Needs lib/fmt.js (escHtml).
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// fmt.js — shared formatting helpers for every web (dmr-web, svx-web, svxlink-web).
|
// fmt.js — shared formatting helpers for every web (dmr-web, svx-web, svxlink-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/fmt.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/fmt.js; other repos carry a COPY.
|
||||||
// Every function here replaced an identical local copy; outputs are unchanged.
|
// Every function here replaced an identical local copy; outputs are unchanged.
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// pager.js — shared pagination (dmr-web, svx-web).
|
// pager.js — shared pagination (dmr-web, svx-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/pager.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/pager.js; other repos carry a COPY.
|
||||||
//
|
//
|
||||||
// pageSizeFor('monitorBody', 32, 160) rows that fit below the element (min 5)
|
// pageSizeFor('monitorBody', 32, 160) rows that fit below the element (min 5)
|
||||||
// pagerHtml({page, pages, total, noun, cls}) footer « ‹ 1..n › » as HTML;
|
// pagerHtml({page, pages, total, noun, cls}) footer « ‹ 1..n › » as HTML;
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
/* Theme engine — Dark / Light / Color, with a Color editor. Shared by every web
|
/* Theme engine — Dark / Light / Color, with a Color editor. Shared by every web
|
||||||
* (canonical copy: callmgr2/www-mumien/lib/theme.js; other repos carry a COPY).
|
* (canonical copy: <dmr-portal>/lib/theme.js; other repos carry a COPY).
|
||||||
* Page settings: window.THEME_AUTH_BASE (default '/auth/'); window.THEME_SERVER_SYNC = false
|
* Page settings: window.THEME_AUTH_BASE (default '/auth/'); window.THEME_SERVER_SYNC = false
|
||||||
* disables the per-account sync (svxlink-web has no account backend).
|
* disables the per-account sync (svxlink-web has no account backend).
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// ui_field.js — shared form-field builders (dmr-web, svx-web, svxlink-web).
|
// ui_field.js — shared form-field builders (dmr-web, svx-web, svxlink-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/ui_field.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/ui_field.js; other repos carry a COPY.
|
||||||
//
|
//
|
||||||
// makeToggleBtn(isOn, onFlip(next, btn), extraCls) Enable/Disable button; .value 'true'/'false', .setOn()
|
// makeToggleBtn(isOn, onFlip(next, btn), extraCls) Enable/Disable button; .value 'true'/'false', .setOn()
|
||||||
// makeBoolSelect(cls, val, disabled) same button, fires 'change' — drop-in for a true/false <select>
|
// makeBoolSelect(cls, val, disabled) same button, fires 'change' — drop-in for a true/false <select>
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
// ui_list.js — shared list editor for every web (dmr-web, svx-web, svxlink-web).
|
// ui_list.js — shared list editor for every web (dmr-web, svx-web, svxlink-web).
|
||||||
//
|
//
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/ui_list.js. Other repos carry a
|
// Canonical copy: <dmr-portal>/lib/ui_list.js. Other repos carry a
|
||||||
// plain COPY (never a symlink); deploy copies it in. Plain script, no deps
|
// plain COPY (never a symlink); deploy copies it in. Plain script, no deps
|
||||||
// beyond the shared CSS classes (btn, form-control, data-table, mono).
|
// beyond the shared CSS classes (btn, form-control, data-table, mono).
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
// later version. See the LICENSE file for details.
|
// later version. See the LICENSE file for details.
|
||||||
|
|
||||||
// ui_msg.js — shared status/error message helpers (dmr-web, svx-web, svxlink-web).
|
// ui_msg.js — shared status/error message helpers (dmr-web, svx-web, svxlink-web).
|
||||||
// Canonical copy: callmgr2/www-mumien/lib/ui_msg.js; other repos carry a COPY.
|
// Canonical copy: <dmr-portal>/lib/ui_msg.js; other repos carry a COPY.
|
||||||
//
|
//
|
||||||
// setMsg(elOrId, text, isErr) inline text line: hidden when empty, green/red
|
// setMsg(elOrId, text, isErr) inline text line: hidden when empty, green/red
|
||||||
// showErr(elOrId, text) show/hide an error line, keeps its own colour
|
// showErr(elOrId, text) show/hide an error line, keeps its own colour
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
// One file, sectioned per subsystem plus shared sections (redis, nodes, trunk,
|
// One file, sectioned per subsystem plus shared sections (redis, nodes, trunk,
|
||||||
// lastheard). Read at start and on reload (SIGHUP / file-watch) and held in
|
// lastheard). Read at start and on reload (SIGHUP / file-watch) and held in
|
||||||
// memory. `modules` toggles which subsystems run on this box, so the same
|
// memory. `modules` toggles which subsystems run on this box, so the same
|
||||||
// binary runs all of them on speed/aldmr and only astmeta on the allstar box.
|
// binary runs all of them on a reflector box and only astmeta on an AllStar bridge box.
|
||||||
//
|
//
|
||||||
// Secrets carry an @@PLACEHOLDER@@ that deploy-remote.sh --conf fills from the
|
// Secrets carry an @@PLACEHOLDER@@ that deploy-remote.sh --conf fills from the
|
||||||
// live file per box, so the structure is one file but secrets differ per host.
|
// live file per box, so the structure is one file but secrets differ per host.
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@
|
|||||||
// svxdr — the merged svx daemon: astmeta + nodelist + proxy + xlink in ONE
|
// svxdr — the merged svx daemon: astmeta + nodelist + proxy + xlink in ONE
|
||||||
// process, each a subsystem goroutine, toggled per box by /etc/svxlink/svxdr.json.
|
// process, each a subsystem goroutine, toggled per box by /etc/svxlink/svxdr.json.
|
||||||
//
|
//
|
||||||
// One binary, one config. Runs all subsystems on speed/aldmr; only astmeta on
|
// One binary, one config. A reflector box runs all subsystems; a pure AllStar
|
||||||
// the allstar box. Co-located subsystems share memory (no localhost HTTP hop);
|
// bridge box runs only astmeta. Co-located subsystems share memory (no localhost HTTP hop);
|
||||||
// the HTTP talker-meta ingest stays for a REMOTE astmeta feeding this box.
|
// the HTTP talker-meta ingest stays for a REMOTE astmeta feeding this box.
|
||||||
//
|
//
|
||||||
// Phase 1 scaffold: config + module toggles + lifecycle (start / SIGHUP reload /
|
// Phase 1 scaffold: config + module toggles + lifecycle (start / SIGHUP reload /
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ package nodelist
|
|||||||
//
|
//
|
||||||
// Which URL is read is per-box config MONITOR_STATUS_URL (falls back to
|
// Which URL is read is per-box config MONITOR_STATUS_URL (falls back to
|
||||||
// REFLECTOR_STATUS_URL):
|
// REFLECTOR_STATUS_URL):
|
||||||
// speed → https://reflector.sm2ampr.net/geu/status/ (the master's full view)
|
// hub box → https://<master-reflector>/geu/status/ (the master's full view)
|
||||||
// aldmr → http://127.0.0.1:8080/status (its own reflector)
|
// bridge box → http://127.0.0.1:8080/status (its own reflector)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -309,8 +309,8 @@ func buildMonitor(client *http.Client, generated string) (monStatus, bool) {
|
|||||||
return monStatus{}, false
|
return monStatus{}, false
|
||||||
}
|
}
|
||||||
// Normalize at ingest: sat-login node callsigns -> per-TG name. Covers the
|
// Normalize at ingest: sat-login node callsigns -> per-TG name. Covers the
|
||||||
// case where monitorStatusURL is a foreign master (e.g. speed reads the SE hub
|
// case where monitorStatusURL is a foreign master (e.g. a hub box reads a foreign master
|
||||||
// where aldmr's sat nodes federate in). A local read via the proxy is already
|
// where its satellite nodes federate in). A local read via the proxy is already
|
||||||
// normalized; re-normalizing is a harmless no-op.
|
// normalized; re-normalizing is a harmless no-op.
|
||||||
body = statusnorm.Normalize(body, renameSatNode)
|
body = statusnorm.Normalize(body, renameSatNode)
|
||||||
var raw struct {
|
var raw struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user