feat: initialisation complète du CORE ProxmoxPanel
Backend Go 1.23+ : - API REST + WebSocket (chi, gorilla/websocket) - Authentification PAM via SSH + JWT RS256 - Chiffrement AES-256-GCM pour secrets SQLite - Pool SSH, client Proxmox REST, hub WebSocket pub/sub - Système de modules compilés à initialisation conditionnelle - Audit log, migrations SQLite versionnées Frontend Vue 3 + Vite + TypeScript : - Thème Neumorphism sombre/clair (CSS custom properties) - Wizard d'installation, Dashboard drag-drop, Terminal xterm.js - Toutes les vues CORE + stubs modules optionnels - i18n EN/FR (vue-i18n v11) Infrastructure : - Docker multi-stage (Go → alpine, Node → nginx) - docker-compose.yml, .gitattributes, LICENSE MIT, README Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
5dbcb1df07
66 changed files with 10370 additions and 0 deletions
68
backend/modules/updates/README.md
Normal file
68
backend/modules/updates/README.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# Module — Updates
|
||||
|
||||
**Type**: Core (always enabled)
|
||||
|
||||
Run `apt update && apt full-upgrade` on the Proxmox host or any LXC container, with real-time streaming output via WebSocket.
|
||||
|
||||
## Features
|
||||
|
||||
- Target: host, a specific LXC (`lxc:100`), or all LXC containers at once
|
||||
- Output streamed line-by-line via WebSocket — no polling required
|
||||
- Full output saved to `update_history` table in SQLite
|
||||
- Admin-only action
|
||||
|
||||
## API Endpoints
|
||||
|
||||
| Method | Path | Auth | Description |
|
||||
|--------|------|------|-------------|
|
||||
| POST | `/api/updates/run` | JWT+Admin | Start an update job |
|
||||
| GET | `/api/updates/history` | JWT | List past update jobs (last 50) |
|
||||
|
||||
### POST /api/updates/run
|
||||
|
||||
```json
|
||||
{ "target": "host" }
|
||||
```
|
||||
|
||||
```json
|
||||
{ "target": "lxc:100" }
|
||||
```
|
||||
|
||||
```json
|
||||
{ "target": "all" }
|
||||
```
|
||||
|
||||
Response:
|
||||
|
||||
```json
|
||||
{ "job_id": "1710000000-ab3f9z12", "message": "Mise à jour démarrée" }
|
||||
```
|
||||
|
||||
## WebSocket Streaming
|
||||
|
||||
Connect to `GET /ws/updates/{jobId}?token=<jwt>` to receive output in real time.
|
||||
|
||||
Message types published on the channel:
|
||||
|
||||
| Type | Payload | Description |
|
||||
|------|---------|-------------|
|
||||
| `update_output` | `{ "chunk": "..." }` | Line(s) of apt output |
|
||||
| `update_done` | `{ "job_id": "..." }` | Job completed successfully |
|
||||
| `update_error` | `{ "error": "..." }` | Job failed |
|
||||
|
||||
## How It Works
|
||||
|
||||
Updates run over SSH using the credentials configured during installation:
|
||||
|
||||
- **Host**: runs `DEBIAN_FRONTEND=noninteractive apt-get update && apt-get full-upgrade -y` directly
|
||||
- **LXC**: runs the same command via `pct exec <vmid> -- bash -c '...'`
|
||||
- **All**: iterates over `pct list` output and updates each container
|
||||
|
||||
## Requirements
|
||||
|
||||
- SSH access to the Proxmox host with sudo/root privileges
|
||||
- `pct` available on the host (standard on Proxmox VE)
|
||||
|
||||
## License
|
||||
|
||||
MIT — see [LICENSE](../../LICENSE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue