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