fix bugs in api changes
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
bff5ca3929
commit
928d1d1516
@ -519,6 +519,9 @@ async function handleFormExit() {
|
||||
cores: document.querySelector("#Cores").value,
|
||||
memory: document.querySelector("#Memory").value
|
||||
}
|
||||
if (type === "lxc") {
|
||||
body.swap = document.querySelector("#Swap").value;
|
||||
}
|
||||
let result = await requestAPI("/instance/resources", "POST", body);
|
||||
if (result.status === 200) {
|
||||
await getConfig();
|
||||
|
@ -156,7 +156,7 @@ async function handleInstanceAdd() {
|
||||
let clusterNodes = await requestPVE("/nodes", "GET");
|
||||
let allowedNodes = await requestAPI("/user/nodes", "GET");
|
||||
clusterNodes.data.forEach((element) => {
|
||||
if (element.status === "online" && allowedNodes.includes(element.node)) {
|
||||
if (element.status === "online" && allowedNodes.nodes.includes(element.node)) {
|
||||
nodeSelect.add(new Option(element.node));
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user