mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
- Add src/SystemController.php (452 lines) encapsulating:
- runStatusChecks(): nginx, php-fpm, HTTP ping, SQLite DB, storage, maintenance flag
- getStatusData() / getPhpInfo() / getDiskInfo() with SystemCache TTL delegation
- getLogData(tab, n): log file tail reading + file metadata
- getNginxConfigData(): live-then-local nginx config reading
- Static helpers: logLineClass(), nginxLineClass(), statusLabel(), statusClass(),
humanBytes(), diskColor() — shared by both entry points
- invalidateAll() for ?refresh=1 cache busting
- Rewrite admin/system.php: 582 → 282 lines
- All free functions (safeExec, systemdStatus, localHttpCheck, humanBytes,
statusLabel, statusClass, logLineClass, nginxLineClass, readLogTail) removed
- Data sections replaced by controller method calls
- View template unchanged; now calls SystemController::statusClass() etc. directly
- Rewrite admin/system-fragment.php: 213 → 137 lines
- All duplicated frag_readLogTail(), frag_logLineClass(), frag_nginxLineClass()
helpers removed
- Now instantiates SystemController and delegates getLogData()/getNginxConfigData()
- Identical rendering logic preserved; constant references updated to
SystemController::LOG_FILES and SystemController::ALLOWED_LINES
No behaviour change; no CSS/JS changes.
TODO Index
Pending tasks split by topic. Completed tasks have been removed.
| File | Topic |
|---|---|
| 01-css-semantic-refactor.md | CSS class audit, semantic HTML for templates (public + admin), inline style extraction, favicon |
| 02-php-components.md | Form field partials, shared UI partials, controller extraction, backend maintenance |
| 03-system-cache.md | system_cache table, SystemCache class, system.php refactor |
| 04-accessibility.md | WCAG 2.1 AA — remaining failures grouped by success criterion |