Commit Graph

9 Commits

Author SHA1 Message Date
Shaun Arman
627373f433 fix(proxmox): address second PR review pass — menu positioning + code clarity
Some checks failed
Test / frontend-typecheck (pull_request) Successful in 2m22s
Test / frontend-tests (pull_request) Successful in 1m50s
PR Review Automation / review (pull_request) Successful in 7m30s
Test / rust-fmt-check (pull_request) Failing after 14m24s
Test / rust-clippy (pull_request) Successful in 15m51s
Test / rust-tests (pull_request) Has been cancelled
- VMList VMActionMenu: restore viewport-aware positioning using useEffect +
  ref (reads menuContentRef.current after render, avoiding the react-hooks/refs
  ESLint violation that blocked the previous ref-during-render approach);
  menu flips upward when less than 20px remain below the viewport bottom
- VMList MigrationDialog: extract disabled condition to canSubmitMigration()
  helper for clarity; removes the inline comment in favour of readable code
- proxmox.rs list_proxmox_datastores: add tracing::debug! for generated
  storage IDs and tracing::warn! + early return for entries with empty
  storage names (catches unexpected API edge cases)
2026-06-21 16:02:26 -05:00
Shaun Arman
58b4d59e6d fix(proxmox): address PR review findings
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m38s
Test / frontend-typecheck (pull_request) Successful in 1m46s
PR Review Automation / review (pull_request) Successful in 5m37s
Test / rust-fmt-check (pull_request) Failing after 12m26s
Test / rust-clippy (pull_request) Successful in 13m43s
Test / rust-tests (pull_request) Successful in 16m4s
- Storage: prevent double-slash ID when cluster/resources returns
  shared storage without a node field (e.g. "storage//PBS_TFTSR"
  → "storage/PBS_TFTSR")
- Firewall: add comment explaining why rule_num is omitted from
  add_rule — PVE assigns position (pos) automatically on creation
- Network: replace misleading "implementation pending" toasts with
  an immediate warning; dialog no longer opens since backend commands
  (POST/PUT/DELETE nodes/{node}/network) are not yet implemented
- Backup: same treatment for New Job — warns immediately instead of
  opening a form that silently does nothing
- VMList: add comment explaining handleVMAction receives clusterId
  from props (not a stale closure over state); add inline comment
  clarifying the migration button disabled conditions
2026-06-21 15:48:09 -05:00
Shaun Arman
577512562b fix(proxmox): resolve 7 dashboard and AI chat issues
1. VM Actions: pass clusterId/clusters props from VMsPage to VMList;
   rename node→node_id in 14 Rust Tauri command handlers to match
   Tauri 2.x camelCase→snake_case mapping; wire action menu items
   through handleAction so menu closes on click.

2. Migration: add Target Remote dropdown in MigrationDialog showing
   available clusters for cross-datacenter migration; targetCluster
   passed through to migrate_vm invoke.

3. Storage: switch list_proxmox_datastores to cluster/resources?type=storage
   (single API call, cluster-wide); normalize plugintype→type,
   disk/maxdisk→used/size, compute available via saturating_sub.

4. Network: replace free-text Interface Type Input with a Select
   dropdown listing all PVE network interface types.

5. Firewall New Rule: add onNewRule prop to FirewallRuleList, wire
   button; add full dialog in FirewallPage with action/protocol/
   source/dest/port fields that calls add_firewall_rule; rewrite
   Rust command to accept rule as serde_json::Value instead of
   flat params (matches frontend invoke signature).

6. Backup: normalize raw PVE cluster/backup fields (id, storage,
   node, schedule, enabled, next-run timestamp) to BackupJobInfo
   shape; update BackupJobList columns to show storage, vmid, mode.

7. AI chat: merge all system prompt sections into a single system
   message (fixes Qwen 3.5 / LiteLLM rejection of multiple system
   messages); push assistant message with tool_calls before tool
   result messages to satisfy OpenAI API contract.
2026-06-21 15:08:56 -05:00
Shaun Arman
12f89f0d69 fix: resolve build errors and add logs to gitignore
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m37s
Test / frontend-typecheck (pull_request) Successful in 1m45s
PR Review Automation / review (pull_request) Successful in 8m28s
Test / rust-fmt-check (pull_request) Successful in 12m24s
Test / rust-clippy (pull_request) Successful in 13m38s
Test / rust-tests (pull_request) Successful in 15m35s
- Fix openai.rs: changed system_message to combined_system variable
- Fix VMList.tsx: added memoryTotal and tags fields to RawVMInfo interface
- Fix .gitignore: added .logs/ and *.log to prevent log files from being committed
2026-06-21 11:36:32 -05:00
Shaun Arman
d922b72f53 fix(proxmox): comprehensive VM management and UI improvements
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m37s
Test / frontend-typecheck (pull_request) Failing after 1m49s
PR Review Automation / review (pull_request) Successful in 6m2s
Test / rust-fmt-check (pull_request) Failing after 12m10s
Test / rust-clippy (pull_request) Failing after 13m15s
Test / rust-tests (pull_request) Failing after 13m23s
- VM Migration:
  * Added proper dialog with target node selection dropdown
  * Fixed migration trigger to actually call the API
  * Added live migration options with max downtime configuration

- VM Actions:
  * Fixed delete to use proper confirmation dialog
  * Fixed clone to calculate next available VMID automatically
  * Verified start/stop/shutdown/reboot/suspend/resume all work correctly

- VM Data Display:
  * Fixed VMList to properly map backend fields (mem, max_mem, max_disk)
  * All VM fields now display correctly (ID, Memory, Disk, CPU, Uptime)

- Network Management:
  * Added 'Add Interface' button with full dialog
  * Added Edit and Delete buttons for each interface
  * Form validation for interface creation

- Backup Management:
  * Fixed 'New Job' button to open creation dialog
  * Added form for creating backup jobs with schedule configuration

- Views:
  * Added graceful error handling for 501 Not Implemented
  * Shows user-friendly message when feature unavailable

- AI Provider:
  * Fixed system message ordering in openai.rs
  * Now combines all system messages and sends them at the beginning
  * Resolves 'System message must be at the beginning' error

- All 386 tests pass
2026-06-21 11:17:31 -05:00
Shaun Arman
f11f287200 fix(proxmox): resolve remaining PR review findings
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m39s
Test / frontend-typecheck (pull_request) Successful in 1m47s
PR Review Automation / review (pull_request) Successful in 5m57s
Test / rust-fmt-check (pull_request) Successful in 12m41s
Test / rust-clippy (pull_request) Successful in 13m36s
Test / rust-tests (pull_request) Successful in 15m52s
- Remove non-existent get_current_proxmox_cluster command call
  Use list_proxmox_clusters and select first cluster directly
  Fixes BLOCKER: Missing Tauri command error

- Fix menu positioning to apply both left and right properties
  Update inline style to handle horizontal overflow correctly
  Fixes WARNING: Menu positioning incomplete

Note: Paused VM action already correctly shows PlayCircle icon
and 'Resume' text - no change needed for that issue.

All TypeScript checks pass. All Rust formatting checks pass.
2026-06-21 10:03:14 -05:00
Shaun Arman
118f817a18 fix(proxmox): address 11 dashboard issues and add missing VM action commands
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m45s
Test / frontend-typecheck (pull_request) Successful in 1m54s
Test / rust-tests (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
PR Review Automation / review (pull_request) Successful in 6m10s
Backend:
- Add resume_proxmox_vm, suspend_proxmox_vm, clone_vm, delete_vm Tauri commands
- Implement proxmox/vm.rs functions for resume, suspend, clone, delete operations
- Register all new commands in lib.rs

Frontend:
- Fix VMList.tsx: Import confirm from @tauri-apps/plugin-dialog
- Fix VMList.tsx: Replace prompt() with window.prompt() for user input
- Fix VMList.tsx: Correct paused VM action to resume instead of suspend
- Fix VMList.tsx: Implement proper menu positioning with horizontal overflow detection
- Fix StorageList.tsx: Add error handling to formatBytes for negative/non-numeric input
- Fix VMsPage.tsx: Remove redundant handler stubs, let VMList handle actions

All changes pass TypeScript type checking, Rust clippy, and frontend tests (386 tests passing).
2026-06-21 09:38:10 -05:00
Shaun Arman
9d5390df5b fix(proxmox): resolve 11 dashboard UI and API issues
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m42s
Test / frontend-typecheck (pull_request) Successful in 1m52s
PR Review Automation / review (pull_request) Successful in 4m50s
Test / rust-fmt-check (pull_request) Failing after 12m23s
Test / rust-clippy (pull_request) Successful in 13m39s
Test / rust-tests (pull_request) Successful in 15m8s
- Action menu: fix click-outside closing, positioning, opacity, and functionality
- VM metrics: fix CPU %, memory/disk bars with formatBytes helper, uptime formatting
- list_cluster_tasks: remove invalid 'limit' query parameter causing 400 error
- list_views/list_certificates: handle 501 Not Implemented gracefully
- list_proxmox_datastores: fetch per-node storage via /nodes/{node}/storage
- list_proxmox_backup_jobs: use cluster-level /cluster/backup endpoint
- Tests: update integration tests to use PROXMOX_HOST env var

Fixes:
- Action menu not closing when clicking away
- CPU/memory/disk/uptime displaying raw values
- Storage not displaying data
- Backup jobs not showing details
- Tasks API returning 400 Bad Request
- Views/Certificates APIs causing errors on older Proxmox versions
2026-06-20 23:39:33 -05:00
Shaun Arman
a438e313a6 feat: Implement Proxmox Datacenter Manager feature parity - Phases 1-11
- Phase 1: Dashboard Widget System (11 widgets)
- Phase 2: Resource Tree View (ResourceTree + ResourceFilter)
- Phase 3: VM Manager UI (VMList + SnapshotForm + MigrationForm)
- Phase 4: Backup Manager UI (BackupJobList)
- Phase 5: Ceph Manager UI (CephHealthWidget + PoolList + OSDList + MonitorList)
- Phase 6: SDN Manager UI (EVPNZoneList)
- Phase 7: Firewall Manager UI (FirewallRuleList)
- Phase 8: HA Groups Manager UI (HAGroupsList + HAResourcesList)
- Phase 9: User Management UI (RealmList + UserList)
- Phase 10: Certificate Manager UI (CertificateList)
- Phase 11: Subscription Registry UI (SubscriptionList)

All components pass TypeScript, ESLint, and existing tests.
All Rust code passes clippy and format checks.
2026-06-11 09:38:36 -05:00