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,31 @@
|
||||
<?php
|
||||
// ═══════════════════════════════════════════════════════════════════════════════════════════════
|
||||
// PURPOSE
|
||||
// Arrs tab. Library counts, queue state, root folders and recent cleanup/discovery activity
|
||||
// for every Sonarr / Radarr / Lidarr instance across all nodes.
|
||||
//
|
||||
// DESIGN PRINCIPLES
|
||||
// Pure view — markup plus a poll against api/arrs.php. Instance discovery, live fetching
|
||||
// and stats parsing all live in include/arrs.php.
|
||||
//
|
||||
// Local nodes are live, remote nodes are cached. The page surfaces cache age rather than
|
||||
// hiding it, so a 2-hour-old partner count is never presented as current.
|
||||
//
|
||||
// OPERATIONAL SAFEGUARDS
|
||||
// Read-only with respect to media. Nothing here triggers a scan, import, or deletion —
|
||||
// the arr cleanups are scheduled scripts, not page buttons.
|
||||
//
|
||||
// A node with no cache yet renders as "not collected", distinct from a node that genuinely
|
||||
// has an empty library.
|
||||
//
|
||||
// RENDERS
|
||||
// Per-node arr cards: tracked counts, queue, root folders, cleanup and discovery stats
|
||||
// Inline conf editing for arr-related settings
|
||||
//
|
||||
// DEPENDS ON
|
||||
// api/arrs.php polled every 60s → include/arrs.php
|
||||
// api/confform.php inline conf edits → include/confform.php
|
||||
?>
|
||||
<style>
|
||||
/* ── Cards ───────────────────────────────────────────────── */
|
||||
.vv-arr-card { background:#161616;border:1px solid #2a2a2a;border-radius:6px;padding:12px 14px;min-width:0; }
|
||||
|
||||
Reference in New Issue
Block a user