]> git.proxmox.com Git - pve-manager.git/commit - www/manager6/qemu/HardwareView.js
gui: qemu: HardwareView: improve button disable code
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 17 Jan 2020 16:14:10 +0000 (17:14 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Jan 2020 09:10:48 +0000 (10:10 +0100)
commit67847d54fab4a87534802bc59eefe54fd32b7b2e
tree1903b47fffff8e3e00efa1af36bd16fb79c38b02
parent9d8553982d55b481a352dd02452a5363b10cd0af
gui: qemu: HardwareView: improve button disable code

this improves following behaviours:
* do not loop over items multiple times
  (we iterated one time extra for efidisk)
* do not check every item for cloudinit
  (we even checked non-disk types)
* make the counts more generic using an object
* also disable cloudinit button when you have one pending
* also disable serial/net button when at limit or the user has
  not the right priviliges

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/qemu/HardwareView.js