docs: update backlog and CLAUDE.md for console and power control

- backlog: mark Console Link as done (merged to main)
- CLAUDE.md: remove ConsolePanel and /api/vnc from architecture
- CLAUDE.md: note console URL format and new-tab behavior
- CLAUDE.md: remove PROXMOX_CONSOLE_TOKEN env var

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 13:18:10 +01:00
parent 9cfcfd9971
commit 6696db82e9
2 changed files with 4 additions and 6 deletions

View File

@@ -21,7 +21,6 @@ src/
├── app/ ├── app/
│ ├── api/ # Next.js API routes (server-side) │ ├── api/ # Next.js API routes (server-side)
│ │ ├── proxy/[...]/route.js # Reverse proxy to Proxmox web UI │ │ ├── proxy/[...]/route.js # Reverse proxy to Proxmox web UI
│ │ ├── vnc/route.js # VNC ticket fetcher
│ │ ├── power/route.js # Power control (start/stop/restart) │ │ ├── power/route.js # Power control (start/stop/restart)
│ │ ├── nodes/vms/lxc/route.js # Query endpoints (aggregates across nodes) │ │ ├── nodes/vms/lxc/route.js # Query endpoints (aggregates across nodes)
│ │ └── status/route.js # Aggregated summary stats │ │ └── status/route.js # Aggregated summary stats
@@ -30,8 +29,7 @@ src/
├── components/ ├── components/
│ ├── Dashboard.js # Main UI: tabs, summary cards, power action handler │ ├── Dashboard.js # Main UI: tabs, summary cards, power action handler
│ ├── NodeList.js / NodeCard.js # Node overview │ ├── NodeList.js / NodeCard.js # Node overview
│ ├── VMList.js / LXCList.js # VM/LXC list views │ ├── VMList.js / LXCList.js # VM/LXC list views (each row has Console/Start/Stop buttons)
│ ├── ConsolePanel.js # Console embed panel
│ └── StatusBadge.js # Status indicator │ └── StatusBadge.js # Status indicator
└── lib/ └── lib/
└── proxmox.js # Proxmox API client — getNodes, getVMs, getLXC, getSummary, powerControl └── proxmox.js # Proxmox API client — getNodes, getVMs, getLXC, getSummary, powerControl
@@ -44,6 +42,7 @@ src/
- **Dashboard** uses direct React state + manual `axios.get()` calls for power actions (instant UI sync), and SWR with `refreshInterval` for periodic polling of the same endpoints. - **Dashboard** uses direct React state + manual `axios.get()` calls for power actions (instant UI sync), and SWR with `refreshInterval` for periodic polling of the same endpoints.
- **Power action flow**: `handlePowerAction` in Dashboard.js fires `POST /api/power`, then immediately re-fetches all four caches (`/api/nodes`, `/api/vms`, `/api/lxc`, `/api/status`) and sets state directly. Use `requestAnimationFrame` flush before the API call so status messages paint. - **Power action flow**: `handlePowerAction` in Dashboard.js fires `POST /api/power`, then immediately re-fetches all four caches (`/api/nodes`, `/api/vms`, `/api/lxc`, `/api/status`) and sets state directly. Use `requestAnimationFrame` flush before the API call so status messages paint.
- **Auth**: PVEAPIToken header: `Authorization: PVEAPIToken=${TOKEN_ID}=${TOKEN_SECRET}`. - **Auth**: PVEAPIToken header: `Authorization: PVEAPIToken=${TOKEN_ID}=${TOKEN_SECRET}`.
- **Console**: VMList/LXCList build `consoleUrl` from `PROXMOX_WEB_URL` with `?console={qemu|lxc}&vmid={id}&node={node}` params. Dashboard opens it via `window.open()` in a new tab so browser session cookies handle Proxmox auth.
- **TLS**: `NODE_TLS_REJECT_UNAUTHORIZED=0` in `.env.local` for self-signed certs. Shows a console warning — acceptable for internal lab use. - **TLS**: `NODE_TLS_REJECT_UNAUTHORIZED=0` in `.env.local` for self-signed certs. Shows a console warning — acceptable for internal lab use.
- **Tailwind CSS 4**: Uses `@tailwindcss/postcss` config. CSS vars in `globals.css` for theming. - **Tailwind CSS 4**: Uses `@tailwindcss/postcss` config. CSS vars in `globals.css` for theming.
- **All API routes return 502 on Proxmox failures** with `{ error, data: null }`. - **All API routes return 502 on Proxmox failures** with `{ error, data: null }`.
@@ -56,7 +55,6 @@ src/
| `PROXMOX_TOKEN_ID` | Yes | API token ID | | `PROXMOX_TOKEN_ID` | Yes | API token ID |
| `PROXMOX_TOKEN_SECRET` | Yes | API token secret | | `PROXMOX_TOKEN_SECRET` | Yes | API token secret |
| `PROXMOX_WEB_URL` | No | Web UI URL (defaults from PROXMOX_API_URL) | | `PROXMOX_WEB_URL` | No | Web UI URL (defaults from PROXMOX_API_URL) |
| `PROXMOX_CONSOLE_TOKEN` | No | Console session token (defaults from PROXMOX_TOKEN_ID) |
| `NEXT_PUBLIC_API_POLL_INTERVAL` | No | Poll interval ms (default 30000) | | `NEXT_PUBLIC_API_POLL_INTERVAL` | No | Poll interval ms (default 30000) |
| `NODE_TLS_REJECT_UNAUTHORIZED` | No | `0` for self-signed certs | | `NODE_TLS_REJECT_UNAUTHORIZED` | No | `0` for self-signed certs |

View File

@@ -3,8 +3,8 @@
## Quick Wins (low effort, high value) ## Quick Wins (low effort, high value)
### Console Link ### Console Link
- Add a clickable name link per row linking to Proxmox web console: `/pve/console.html?node=X&vmid=Y` - Console button per row opens Proxmox web UI console in new tab. URL built from web UI endpoint with session cookies for auth.
- **Status: done (pending push)** - **Status: done (merged to main)**
### Manual Refresh ### Manual Refresh
- Button in dashboard header that calls `mutate()` on all SWR caches - Button in dashboard header that calls `mutate()` on all SWR caches