From 3ebd43bfb02878bb7acfc12bca3b096f2c52d8a2 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 18 May 2023 08:09:23 +0000 Subject: [PATCH] update disk attach for new api change --- scripts/config.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/config.js b/scripts/config.js index 256b8c3..46f5725 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -203,9 +203,7 @@ async function handleDiskDetach() { } async function handleDiskAttach() { - let diskImage = config.data[this.dataset.disk]; - - let header = `Attach ${diskImage}`; + let header = `Attach ${this.dataset.disk}`; let body = ``; dialog(header, body, async (result, form) => { @@ -217,7 +215,7 @@ async function handleDiskAttach() { type: type, vmid: vmid, disk: `${type === "qemu" ? "sata" : "mp"}${device}`, - data: type === "lxc" ? diskImage + `,mp=/mp${device}/` : diskImage + source: this.dataset.disk.replace("unused", "") } let result = await requestAPI("/instance/disk/attach", "POST", body); if (result.status === 200) {