remove storage and iso from disk image options

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-17 11:04:28 -08:00
parent d9ccaddd3c
commit 70d1995453

View File

@ -167,7 +167,7 @@ async function addDiskLine (fieldset, busPrefix, busName, device, diskDataParsed
let diskImageSelect = document.createElement("select"); let diskImageSelect = document.createElement("select");
let diskImageOptions = await request(`/nodes/${node}/storage/${storage}/content?content=iso`); let diskImageOptions = await request(`/nodes/${node}/storage/${storage}/content?content=iso`);
diskImageOptions.data.forEach((element) => { diskImageOptions.data.forEach((element) => {
diskImageSelect.add(new Option(element.volid.replace(`${storage}:`), element.volid)); diskImageSelect.add(new Option(element.volid.replace(`${storage}:iso/`, ""), element.volid));
}); });
diskImageSelect.value = diskDataParsed.filename; diskImageSelect.value = diskDataParsed.filename;
field.append(diskImageSelect); field.append(diskImageSelect);