improve account page loading time
This commit is contained in:
parent
c4ddc4ded3
commit
09bdf686b3
@ -25,14 +25,22 @@ async function init () {
|
|||||||
if (cookie === "") {
|
if (cookie === "") {
|
||||||
goToPage("login.html");
|
goToPage("login.html");
|
||||||
}
|
}
|
||||||
const resources = await requestAPI("/user/dynamic/resources");
|
|
||||||
const meta = await requestAPI("/global/config/resources");
|
let resources = requestAPI("/user/dynamic/resources");
|
||||||
const instances = await requestAPI("/user/config/cluster");
|
let meta = requestAPI("/global/config/resources");
|
||||||
const nodes = await requestAPI("/user/config/nodes");
|
let instances = requestAPI("/user/config/cluster");
|
||||||
|
let nodes = requestAPI("/user/config/nodes");
|
||||||
|
|
||||||
|
resources = await resources;
|
||||||
|
meta = await meta;
|
||||||
|
instances = await instances;
|
||||||
|
nodes = await nodes;
|
||||||
|
|
||||||
document.querySelector("#username").innerText = `Username: ${getCookie("username")}`;
|
document.querySelector("#username").innerText = `Username: ${getCookie("username")}`;
|
||||||
document.querySelector("#pool").innerText = `Pool: ${instances.pool}`;
|
document.querySelector("#pool").innerText = `Pool: ${instances.pool}`;
|
||||||
document.querySelector("#vmid").innerText = `VMID Range: ${instances.vmid.min} - ${instances.vmid.max}`;
|
document.querySelector("#vmid").innerText = `VMID Range: ${instances.vmid.min} - ${instances.vmid.max}`;
|
||||||
document.querySelector("#nodes").innerText = `Nodes: ${nodes.toString()}`;
|
document.querySelector("#nodes").innerText = `Nodes: ${nodes.toString()}`;
|
||||||
|
|
||||||
populateResources("#resource-container", meta, resources);
|
populateResources("#resource-container", meta, resources);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user