mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
fix ordering of boot order when reading request data
This commit is contained in:
parent
32f7c1eb01
commit
7b38f00a69
2 changed files with 2 additions and 4 deletions
|
@ -377,10 +377,9 @@ def boot_order(vmid):
|
|||
user = User(session['userinfo']['preferred_username'])
|
||||
proxmox = connect_proxmox()
|
||||
if user.rtp or int(vmid) in user.allowed_vms:
|
||||
print(request.form)
|
||||
boot_order = []
|
||||
for key, value in request.form.items():
|
||||
boot_order.append(value)
|
||||
for key in sorted(request.form):
|
||||
boot_order.append(request.form[key])
|
||||
vm = VM(vmid)
|
||||
vm.set_boot_order(boot_order)
|
||||
return '', 200
|
||||
|
|
|
@ -989,7 +989,6 @@ $("#edit-boot-order").click(function(){
|
|||
for (k = 0; k < boot_order.length; k++) {
|
||||
e = document.getElementById(`boot-order-${k + 1}`);
|
||||
data.append(`${k + 1}`, e.options[e.selectedIndex].value);
|
||||
console.log(e.options[e.selectedIndex].value);
|
||||
}
|
||||
fetch(`/vm/${vmid}/boot_order`, {
|
||||
credentials: 'same-origin',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue