This commit is contained in:
Arthur Lu 2024-04-27 03:50:29 +00:00
parent 29c36cdbf5
commit 199f1b1e99
2 changed files with 3 additions and 3 deletions

View File

@ -439,7 +439,7 @@ async function handleCDAdd () {
const isoSelect = d.querySelector("#iso-select"); const isoSelect = d.querySelector("#iso-select");
for (const iso of isos) { for (const iso of isos) {
isoSelect.append(new Option(iso.name, iso.volid)) isoSelect.append(new Option(iso.name, iso.volid));
} }
isoSelect.selectedIndex = -1; isoSelect.selectedIndex = -1;
} }

View File

@ -167,7 +167,7 @@ async function handleInstanceAdd () {
const nodeSelect = d.querySelector("#node"); const nodeSelect = d.querySelector("#node");
const clusterNodes = await requestPVE("/nodes", "GET"); const clusterNodes = await requestPVE("/nodes", "GET");
const allowedNodes = Object.keys(userCluster.nodes) const allowedNodes = Object.keys(userCluster.nodes);
clusterNodes.data.forEach((element) => { clusterNodes.data.forEach((element) => {
if (element.status === "online" && allowedNodes.includes(element.node)) { if (element.status === "online" && allowedNodes.includes(element.node)) {
nodeSelect.add(new Option(element.node)); nodeSelect.add(new Option(element.node));
@ -215,7 +215,7 @@ async function handleInstanceAdd () {
// add template images to selector // add template images to selector
const templateImage = d.querySelector("#template-image"); // populate templateImage depending on selected image storage const templateImage = d.querySelector("#template-image"); // populate templateImage depending on selected image storage
for (const template of templates) { for (const template of templates) {
templateImage.append(new Option(template.name, template.volid)) templateImage.append(new Option(template.name, template.volid));
} }
templateImage.selectedIndex = -1; templateImage.selectedIndex = -1;
} }