fix(proxmox): fix VM actions, remove Disk column, add Create VM #130

Merged
sarman merged 4 commits from fix/proxmox-vm-actions-v3 into beta 2026-06-21 23:45:17 +00:00

4 Commits

Author SHA1 Message Date
Shaun Arman
e6dddc1b27 fix(proxmox): align ISO frontend validation with backend
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m44s
Test / frontend-typecheck (pull_request) Successful in 1m53s
PR Review Automation / review (pull_request) Successful in 6m9s
Test / rust-fmt-check (pull_request) Successful in 12m1s
Test / rust-clippy (pull_request) Successful in 13m33s
Test / rust-tests (pull_request) Successful in 15m5s
Frontend regex required a .iso suffix that the backend does not enforce.
Changed from /^[a-zA-Z0-9_-]+:iso\/.+\.iso$/ to
/^[a-zA-Z0-9_-]+:iso\/[^,]+$/ to match the backend rule: must start
with storage:iso/ and contain no commas. Updated hint and error text
accordingly.
2026-06-21 18:28:49 -05:00
Shaun Arman
51311b9e83 fix(fmt): apply cargo fmt to proxmox command ISO validation
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m51s
Test / frontend-typecheck (pull_request) Successful in 2m4s
PR Review Automation / review (pull_request) Successful in 5m32s
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
2026-06-21 18:17:19 -05:00
Shaun Arman
64fc808908 fix(proxmox): address PR review suggestions
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
- Cores max aligned to backend limit (128→512)
- MigrationDialog shows loading state while node list fetches
- CreateVmDialog validates ISO format client-side on change, blocks
  submit and highlights field on invalid input
2026-06-21 18:16:13 -05:00
Shaun Arman
a9a063f786 fix(proxmox): fix VM actions, remove Disk column, add Create VM
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m37s
Test / frontend-typecheck (pull_request) Successful in 1m49s
PR Review Automation / review (pull_request) Successful in 10m13s
Test / rust-fmt-check (pull_request) Failing after 12m20s
Test / rust-clippy (pull_request) Successful in 13m53s
Test / rust-tests (pull_request) Has been cancelled
Issue 1 — VM actions silently doing nothing:
The root cause was a missing <Toaster> mount in App.tsx. All
toast.success/error calls were no-ops because the sonner Toaster
component was never rendered. Added it at the App root.

Also added dialog:allow-confirm capability (was missing, caused VM
delete confirmation to throw silently).

Issue 2 — Remove Disk column:
PVE cluster/resources returns only static disk allocation, not actual
usage, making the column misleading. Removed from VMList header, row,
and the diskPercent calculation.

Issue 3 — Add VM creation:
- New list_proxmox_nodes Tauri command (GET /nodes) for real node list
- New create_proxmox_vm Tauri command with server-side input validation:
  vmid range, numeric bounds, node/storage/bridge path-safety check,
  ISO volume-ID format check to prevent comma-property injection
- CreateVmDialog component with node/storage discovery on open
- "Add VM" button wired into VMsPage

MigrationDialog now fetches real cluster nodes via list_proxmox_nodes
instead of inferring them from the VMs already in the list.

Added suspendProxmoxVm, resumeProxmoxVm, listProxmoxNodes,
createProxmoxVm client wrappers to proxmoxClient.ts.

Tests: 446 Rust + 405 frontend, all pass. 19 new VMList tests (TDD),
7 new Rust tests for security validation logic.
2026-06-21 18:01:37 -05:00