Add structured headers to the PHP pages layer
Documents each tab's purpose, what it renders, and which endpoints it polls. Pages that start with markup get the header in a <?php ?> block so it never reaches the browser. Also corrects the layer diagram in README-unraid.md: eight of eleven pages hold no PHP logic and poll api/ for everything — only auth, monitor and scheduler require an include/ file directly.
This commit is contained in:
@@ -1,3 +1,35 @@
|
||||
<?php
|
||||
// ═══════════════════════════════════════════════════════════════════════════════════════════════
|
||||
// PURPOSE
|
||||
// Fallback tab. Current state of every node (NORMAL / FALLBACK / NO_INTERNET / DARK),
|
||||
// which tiers have activated, handback strike progress, and which covered containers are
|
||||
// actually running.
|
||||
//
|
||||
// DESIGN PRINCIPLES
|
||||
// Pure view — markup plus a poll against api/fallback.php. State parsing lives in
|
||||
// include/fallback.php.
|
||||
//
|
||||
// Reports what each node believes about itself. Remote state is read from the partner's own
|
||||
// state file rather than inferred from what this host can reach.
|
||||
//
|
||||
// Polls faster than most tabs (30s) because this is the page someone opens during an
|
||||
// outage, when stale numbers are actively misleading.
|
||||
//
|
||||
// OPERATIONAL SAFEGUARDS
|
||||
// Read-only. The page cannot trigger a failover, force a handback, or start a covered
|
||||
// container. Fallback is driven by fallback.sh reacting to real reachability, and a manual
|
||||
// override from a browser is exactly the wrong way to enter that state.
|
||||
//
|
||||
// A missing state file renders as unknown, never as NORMAL — claiming healthy for a
|
||||
// fallback process that is not running would be the worst possible error on this page.
|
||||
//
|
||||
// RENDERS
|
||||
// Per-node state, tier activation and delays, handback strikes, covered container status
|
||||
//
|
||||
// DEPENDS ON
|
||||
// api/fallback.php polled every 30s → include/fallback.php
|
||||
// api/confform.php inline conf edits → include/confform.php
|
||||
?>
|
||||
<style>
|
||||
/* ── Existing status styles ── */
|
||||
.vv-fb-active { background:#1a1200;border:1px solid #5a3800;border-radius:6px;padding:12px 14px; }
|
||||
|
||||
Reference in New Issue
Block a user