remove colons from forms
This commit is contained in:
parent
3a174c6989
commit
da4dab35cc
@ -14,9 +14,9 @@
|
||||
<fieldset>
|
||||
<legend>Proxmox VE Login</legend>
|
||||
<div class="labels-inputs">
|
||||
<label for="username">Username:</label>
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username">
|
||||
<label for="username">Password:</label>
|
||||
<label for="username">Password</label>
|
||||
<input type="password" id="password" name="password">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -24,17 +24,17 @@ async function populateForm (node, type, vmid) {
|
||||
let config = await request(`/nodes/${node}/${type}/${vmid}/config`);
|
||||
console.log(config);
|
||||
|
||||
addFormLine("name", "name", "Name:", {type: "text", value: config.data.name});
|
||||
addFormLine("name", "name", "Name", {type: "text", value: config.data.name});
|
||||
|
||||
addFormLine("resources", "cores", "Cores:", {type: "number", value: config.data.cores, min: 1, max: 8192});
|
||||
addFormLine("resources", "memory", "Memory:", {type: "number", value: config.data.memory, min: 16});
|
||||
addFormLine("resources", "cores", "Cores", {type: "number", value: config.data.cores, min: 1, max: 8192});
|
||||
addFormLine("resources", "memory", "Memory", {type: "number", value: config.data.memory, min: 16});
|
||||
|
||||
let i = 0;
|
||||
while(Object.hasOwn(config.data, `sata${i}`)){
|
||||
let sata = config.data[`sata${i}`];
|
||||
sata = `{"${sata.replaceAll(":", '":"').replaceAll("=", '":"').replaceAll(",", '","')}"}`;
|
||||
sata = JSON.parse(sata);
|
||||
addFormLine("resources", `sata${i}`, `SATA ${i}:`, {type: "text", value: sata.size});
|
||||
addFormLine("resources", `sata${i}`, `SATA ${i}`, {type: "text", value: sata.size});
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user