fix requestPVE call params
This commit is contained in:
parent
a8ad9986d7
commit
c459dad024
@ -15,7 +15,6 @@ async function init () {
|
||||
if (cookie === "") {
|
||||
goToPage("login.html");
|
||||
}
|
||||
|
||||
let user = await requestAPI("/user");
|
||||
let resources = user.resources;
|
||||
let instances = user.instances;
|
||||
|
@ -260,7 +260,7 @@ async function handleDiskResize () {
|
||||
|
||||
async function handleDiskMove () {
|
||||
let content = type === "qemu" ? "images" : "rootdir";
|
||||
let storage = await requestPVE(`/nodes/${node}/storage`, "GET", null);
|
||||
let storage = await requestPVE(`/nodes/${node}/storage`, "GET");
|
||||
|
||||
let header = `Move ${this.dataset.disk}`;
|
||||
|
||||
@ -331,7 +331,7 @@ async function handleDiskDelete () {
|
||||
|
||||
async function handleDiskAdd () {
|
||||
let content = type === "qemu" ? "images" : "rootdir";
|
||||
let storage = await requestPVE(`/nodes/${node}/storage`, "GET", null);
|
||||
let storage = await requestPVE(`/nodes/${node}/storage`, "GET");
|
||||
|
||||
let header = "Create New Disk";
|
||||
|
||||
@ -375,7 +375,7 @@ async function handleDiskAdd () {
|
||||
|
||||
async function handleCDAdd () {
|
||||
let content = "iso";
|
||||
let storage = await requestPVE(`/nodes/${node}/storage`, "GET", null);
|
||||
let storage = await requestPVE(`/nodes/${node}/storage`, "GET");
|
||||
|
||||
let header = `Add a CDROM`;
|
||||
|
||||
|
@ -16,7 +16,7 @@ async function init () {
|
||||
}
|
||||
|
||||
async function populateInstances () {
|
||||
let resources = await requestPVE("/cluster/resources", "GET", null);
|
||||
let resources = await requestPVE("/cluster/resources", "GET");
|
||||
let instanceContainer = document.getElementById("instance-container");
|
||||
let instances = [];
|
||||
|
||||
|
@ -135,7 +135,7 @@ export class Instance extends HTMLElement {
|
||||
const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay));
|
||||
|
||||
while (true) {
|
||||
let taskStatus = await requestPVE(`/nodes/${this.node.name}/tasks/${result.data}/status`);
|
||||
let taskStatus = await requestPVE(`/nodes/${this.node.name}/tasks/${result.data}/status`, "GET");
|
||||
if(taskStatus.data.status === "stopped" && taskStatus.data.exitstatus === "OK") { // task stopped and was successful
|
||||
this.status = targetStatus;
|
||||
this.update();
|
||||
|
Loading…
Reference in New Issue
Block a user