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:
Gmer4Lfe
2026-08-02 00:51:41 -04:00
parent 0b4ff27be4
commit ccc6c742ee
12 changed files with 414 additions and 5 deletions
+28
View File
@@ -1,3 +1,31 @@
<?php
// ═══════════════════════════════════════════════════════════════════════════════════════════════
// PURPOSE
// Docker tab. Container inventory grouped into Varaverk-owned folders, with start / stop /
// restart controls and WebUI links.
//
// DESIGN PRINCIPLES
// Pure view — inventory and folder state come from api/docker.php; actions go to
// api/docker_action.php. Folder storage and the conf mirror live in include/docker.php.
//
// Folders are Varaverk's own, not folder.view3's. The grouping survives that plugin being
// absent or reset; it is synced to only when installed.
//
// OPERATIONAL SAFEGUARDS
// Destructive actions are confirmed in the browser before the request is sent.
//
// Container actions are routed through a dedicated action endpoint that validates the name
// against the real inventory — the page never composes a docker command.
//
// Container names are escaped on render, so a name containing markup cannot inject.
//
// RENDERS
// Folder-grouped container grid, per-container state, WebUI links, action buttons
//
// DEPENDS ON
// api/docker.php polled every 60s → include/docker.php
// api/docker_action.php start/stop/restart
?>
<style>
.vv-dk-toolbar { display:flex;align-items:center;gap:8px;margin-bottom:12px;padding:0 2px;flex-wrap:wrap; }
.vv-dk-title { font-size:13px;font-weight:bold;color:#888;text-transform:uppercase;letter-spacing:.06em;flex:1; }