all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: qemu: unify enabled state of pci, usb and rng
@ 2025-04-08 18:16 Stoiko Ivanov
  2025-04-09  6:20 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2025-04-08 18:16 UTC (permalink / raw)
  To: pve-devel

all 3 additions fail in the backend, if a user does not have
VM.Config.HWType on the VM.

unify their display to cause less confusion, to the most recently
added version for the rng.

drop the now unused noHWPerm (eslint reminded me about that).

found while reviewing:
https://lore.proxmox.com/all/20250408195959.0b1f3aaf@rosa.proxmox.com/T/#t

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 www/manager6/qemu/HardwareView.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index b949264f..480bbb3d 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -599,7 +599,6 @@ Ext.define('PVE.qemu.HardwareView', {
 	    });
 
 	    // heuristic only for disabling some stuff, the backend has the final word.
-	    const noHWPerm = !caps.nodes['Sys.Console'] && !caps.mapping['Mapping.Use'];
 	    const noVMConfigHWTypePerm = !caps.vms['VM.Config.HWType'];
 	    const noVMConfigNetPerm = !caps.vms['VM.Config.Network'];
 	    const noVMConfigDiskPerm = !caps.vms['VM.Config.Disk'];
@@ -607,8 +606,8 @@ Ext.define('PVE.qemu.HardwareView', {
 	    const noVMConfigCloudinitPerm = !caps.vms['VM.Config.Cloudinit'];
 	    const noVMConfigOptionsPerm = !caps.vms['VM.Config.Options'];
 
-	    me.down('#addUsb').setDisabled(noHWPerm || isAtUsbLimit());
-	    me.down('#addPci').setDisabled(noHWPerm || isAtLimit('hostpci'));
+	    me.down('#addUsb').setDisabled(noVMConfigHWTypePerm || isAtUsbLimit());
+	    me.down('#addPci').setDisabled(noVMConfigHWTypePerm || isAtLimit('hostpci'));
 	    me.down('#addAudio').setDisabled(noVMConfigHWTypePerm || isAtLimit('audio'));
 	    me.down('#addSerial').setDisabled(noVMConfigHWTypePerm || isAtLimit('serial'));
 	    me.down('#addNet').setDisabled(noVMConfigNetPerm || isAtLimit('net'));
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH manager] ui: qemu: unify enabled state of pci, usb and rng
  2025-04-08 18:16 [pve-devel] [PATCH manager] ui: qemu: unify enabled state of pci, usb and rng Stoiko Ivanov
@ 2025-04-09  6:20 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-04-09  6:20 UTC (permalink / raw)
  To: pve-devel, Stoiko Ivanov

On Tue, 08 Apr 2025 20:16:40 +0200, Stoiko Ivanov wrote:
> all 3 additions fail in the backend, if a user does not have
> VM.Config.HWType on the VM.
> 
> unify their display to cause less confusion, to the most recently
> added version for the rng.
> 
> drop the now unused noHWPerm (eslint reminded me about that).
> 
> [...]

Applied, thanks!

[1/1] ui: qemu: unify enabled state of pci, usb and rng
      commit: 5641693298ba8345220aea8917784261f1ef9be9


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-09  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 18:16 [pve-devel] [PATCH manager] ui: qemu: unify enabled state of pci, usb and rng Stoiko Ivanov
2025-04-09  6:20 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal