feat: add Services and Logs modules (systemctl + journalctl via SSH)

Backend:
- modules/services: list, status, start/stop/restart systemctl services
  with pct exec support for LXC targets
- modules/logs: journalctl unit listing + WebSocket live streaming
  (direct SSH connection, journalctl -f, graceful teardown on WS close)
- migrations/003: seed services and logs modules in DB
- main.go: register services.New() and logs.New() in module loader

Frontend:
- services.html: target selector, search/filter, services table with
  active state indicators and start/stop/restart buttons
- logs.html: target + unit selectors, live follow toggle, scrollable
  terminal output with 3000-line cap
- app.js: servicePage() and logsPage() Alpine components + navItems
- locales: services and logs i18n keys (fr + en)
- pages.css: services table, state dots, logs output styles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
enzo 2026-03-22 02:03:55 +01:00
parent 98cdabf3e1
commit 5836f2201a
10 changed files with 1012 additions and 2 deletions

View file

@ -115,6 +115,34 @@
"desc": "SFTP file browser",
"moduleNotEnabled": "Module not enabled. Go to Settings → Modules to enable it."
},
"services": {
"desc": "systemd service management",
"target": "Target",
"filter": "Filter by name or description…",
"noServices": "No services found",
"name": "Service",
"status": "Status",
"substate": "Sub-state",
"description": "Description",
"start": "Start",
"stop": "Stop",
"restart": "Restart",
"reload": "Reload",
"enable": "Enable",
"disable": "Disable"
},
"logs": {
"desc": "System journal viewer via journalctl",
"target": "Target",
"unit": "Unit",
"unitAll": "All units",
"lines": "Lines",
"follow": "Follow live",
"stopFollow": "Stop",
"clear": "Clear",
"noLogs": "No logs — click «Follow» to start",
"connecting": "Connecting…"
},
"settings": {
"general": "General",
"infrastructure": "Infrastructure",