fix disk detach and disk resize issues

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-30 23:35:26 +00:00
parent 37839d4117
commit 77baa2f30c

View File

@ -167,7 +167,7 @@ async function handleDiskDetach () {
node: node,
type: type,
vmid: vmid,
action: `delete=${this.id}`
action: JSON.stringify({delete: this.id})
};
let result = await requestAPI("/disk/detach", "POST", body);
if (result.status === 200) {
@ -199,7 +199,7 @@ async function handleDiskResize () {
node: node,
type: type,
vmid: vmid,
action: `disk=${this.id}&size=+${form.get("size-increment")}G`
action: JSON.stringify({disk: this.id, size: `+${form.get("size-increment")}G`})
}
let result = await requestAPI("/disk/resize", "POST", body);
if (result.status === 200) {