diff --git a/account.html b/account.html index 0dfe55b..631329f 100644 --- a/account.html +++ b/account.html @@ -27,24 +27,25 @@

Account

-
-

Username:

-

Pool:

-

VMID Range:

-
-
- - - - - - - - - - -
ResourceUsedFreeTotal
-
+

Account Details

+

Username:

+

Pool:

+

VMID Range:

+

Nodes:

+
+
+

Cluster Resources

+ + + + + + + + + + +
ResourceUsedFreeTotal
diff --git a/scripts/account.js b/scripts/account.js index 6627683..06deacb 100644 --- a/scripts/account.js +++ b/scripts/account.js @@ -19,9 +19,10 @@ async function init () { let user = await requestAPI("/user"); let resources = user.resources; let instances = user.instances; - document.querySelector("#username").innerHTML += getCookie("username"); - document.querySelector("#pool").innerHTML += instances.pool; - document.querySelector("#vmid").innerHTML += `[${instances.vmid.min},${instances.vmid.max}]`; + document.querySelector("#username").innerText = `Username: ${getCookie("username")}`; + document.querySelector("#pool").innerText = `Pool: ${instances.pool}`; + document.querySelector("#vmid").innerText = `VMID Range: ${instances.vmid.min} - ${instances.vmid.max}`; + document.querySelector("#nodes").innerText = `Nodes: ${user.nodes.toString()}`; buildResourceTable(resources, "#resource-table"); } diff --git a/scripts/config.js b/scripts/config.js index 7e876b9..9492694 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -53,7 +53,7 @@ function addResourceLine (fieldset, iconHref, labelText, inputAttr, unitText=nul field.append(icon); let label = document.createElement("label"); - label.innerHTML = labelText; + label.innerText = labelText; label.htmlFor = labelText; field.append(label); @@ -120,7 +120,7 @@ function addDiskLine (fieldset, busPrefix, busName, device, diskDetails) { // Add a label for the disk bus and device number let diskLabel = document.createElement("label"); - diskLabel.innerHTML = diskName; + diskLabel.innerText = diskName; diskLabel.dataset.disk = diskID; field.append(diskLabel);