diff --git a/config.html b/config.html index 784b7ed..f26b91f 100644 --- a/config.html +++ b/config.html @@ -5,8 +5,20 @@ tronnet - client + +
+
+
+ Change Configuration +
+ + +
+
+
+
\ No newline at end of file diff --git a/css/login.css b/css/form.css similarity index 100% rename from css/login.css rename to css/form.css diff --git a/login.html b/login.html index 1a91119..1a3712d 100644 --- a/login.html +++ b/login.html @@ -5,7 +5,7 @@ tronnet - client - + diff --git a/scripts/config.js b/scripts/config.js index f52679f..9168826 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -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); } \ No newline at end of file diff --git a/scripts/elements.js b/scripts/elements.js index b9caace..c20cc6d 100644 --- a/scripts/elements.js +++ b/scripts/elements.js @@ -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}); } }) }