populate static elements of config.html,

add node info to config page search,
change login.css to form.css
This commit is contained in:
Arthur Lu
2022-12-19 16:13:43 -08:00
parent 529959cba5
commit 913175239c
5 changed files with 23 additions and 3 deletions

View File

@@ -4,5 +4,13 @@ window.addEventListener("DOMContentLoaded", init);
async function init () {
let uriData = getURIData();
console.log(uriData);
let node = uriData.node;
let type = uriData.type;
let vmid = uriData.vmid;
await populateForm(node, type, vmid);
}
async function populateForm (node, type, vmid) {
let config = request(`/nodes/${node}/${type}/${vmid}/config`);
console.log(config);
}

View File

@@ -125,7 +125,7 @@ class Instance extends HTMLElement {
configButton.src = data.status === "running" ? "images/actions/config-inactive.svg" : "images/actions/config-active.svg";
configButton.addEventListener("click", () => {
if (!this.actionLock && this.status !== "running") {
goToPage("config.html", {type: this.type, vmid: this.vmid});
goToPage("config.html", {node: this.node, type: this.type, vmid: this.vmid});
}
})
}