Skip to content

Comments

fix(disk-move): add 'delete source' checkbox to Move Disk dialog#58

Open
ry-ops wants to merge 1 commit intoPegaProx:mainfrom
ry-ops:fix/disk-move-delete-source
Open

fix(disk-move): add 'delete source' checkbox to Move Disk dialog#58
ry-ops wants to merge 1 commit intoPegaProx:mainfrom
ry-ops:fix/disk-move-delete-source

Conversation

@ry-ops
Copy link
Contributor

@ry-ops ry-ops commented Feb 21, 2026

Summary

Fixes #52

The Move Disk modal gave users no control over whether the source volume was deleted after the move — it always used the backend default (delete=true). Users who wanted to keep the original had to go into the PVE UI or SSH to handle it manually.

  • Add deleteSource boolean state (defaults to true) and a checkbox in MoveDiskModal
  • Propagate the flag through handleMoveDiskdelete: in the JSON body (the existing /disks/:id/move route already accepts this field)
  • Fix hardcoded German strings in the modal ("Festplatte verschieben", "von") — replaced with t('moveDisk') and t('from')
  • Add EN/DE i18n keys: moveDisk, deleteSourceDisk

Test plan

  • Open disk move dialog on a running or stopped VM
  • Verify "Delete source disk after move" checkbox appears, checked by default
  • Uncheck it, start a move — confirm source volume is retained as unused0 in PVE
  • Check it, start a move — confirm source volume is deleted after move completes
  • Verify EN and DE labels render correctly

🤖 Generated with Claude Code

Previously the Move Disk modal silently called the API with no `delete`
param, leaving the backend to apply its default (delete=True). The user
had no choice: they had to go into the Proxmox UI or SSH to clean up the
old volume themselves.

- Add `deleteSource` state (defaults to `true`) and a checkbox in
  `MoveDiskModal` so users can opt out of deleting the source disk
- Fix hardcoded German strings in the modal title ("Festplatte
  verschieben") and description ("von") — replaced with `t('moveDisk')`
  and `t('from')`
- Propagate the flag through `handleMoveDisk` → `delete:` in the
  JSON body (the existing `/disks/:id/move` backend already accepts this)
- Add EN/DE i18n keys: `moveDisk`, `deleteSourceDisk`

Fixes PegaProx#52

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete source when do a move disk.

1 participant