mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
admin/system: add nginx config viewer tab
Add a 'nginx — config' tab to the Système admin page (system.php). - Reads /etc/nginx/sites-available/posterg (live deployed config) first; falls back to nginx/posterg.conf (local reference copy) when the live path is inaccessible (e.g. in dev, or wrong permissions). - Displays a colour-coded badge: green '● Config déployée' for live, amber '⚠ Référence locale' for the fallback. - Renders the full config in the shared .log-output code block with line numbers (data-n gutter via CSS ::before) and lightweight nginx syntax colouring (comments grey, block keywords purple, directives blue). - Reuses the existing copy-to-clipboard button. - Tab routing: activeTab validation extended to accept 'nginx_config'; log pre-loading guards skip when activeTab is 'nginx_config'. - No remote execution: read-only, zero new attack surface.
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -332,7 +332,7 @@ Goal: rename the tables and column to the canonical M2M pattern (`tags`, `thesis
|
||||
- [x] Update `docs/SERVER_SETUP.md` with correct permissions rationale and troubleshooting
|
||||
- [x] Add server status view in admin panel (nginx + php-fpm health, site HTTP check)
|
||||
- [x] Add server log viewer in admin panel (tail nginx error/access logs via SSH or log endpoint)
|
||||
- [ ] Add nginx config deploy flow to admin panel (upload `scripts/deploy-server.sh`, run remotely)
|
||||
- [x] Add nginx config viewer to admin panel: "nginx — config" tab in `system.php` reads `/etc/nginx/sites-available/posterg` (live, with badge) or falls back to local `nginx/posterg.conf`; line-numbered, syntax-coloured, copy-to-clipboard
|
||||
- [x] Add admin user management UI — password change/set for PHP auth layer (`public/admin/account.php` + `actions/account.php`; "Compte" nav link; account CSS)
|
||||
- [x] Merge `status.php` and `logs.php` into a single `system.php` page; remove "Statut" and "Journaux" nav links, add single "Système" link; preserve all existing content in their respective sections
|
||||
- [x] Rework logs UI: replace the select-then-click-Afficher flow with instant tabs (nginx access, nginx error, php-fpm); switching tabs loads the selected log immediately without a form submit; add a copy-to-clipboard button per log view
|
||||
|
||||
Reference in New Issue
Block a user