all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-manager v2 0/2] ui: vm create: populate EFI and
@ 2026-08-06 13:01 Jonas Theisen
  2026-08-06 13:01 ` [PATCH pve-manager v2 1/2] ui: vm create: populate EFI and TPM storage by default Jonas Theisen
  2026-08-06 13:01 ` [PATCH pve-manager v2 2/2] ui: vm: create: fix autoSelect for disk storage selector when re-enabling field Jonas Theisen
  0 siblings, 2 replies; 3+ messages in thread
From: Jonas Theisen @ 2026-08-06 13:01 UTC (permalink / raw)
  To: pve-devel

On VM creation the storage dropdown for EFI and TPM were empty,
while the storage for VM disks was populated by default.

This patch series adds the parameters to the selectors to also
populate the storage for EFI and TPM disks automatically and fixes
an issue where disabling and reenabling the selectors would not
trigger the autofill.

Reported by a forum user in https://forum.proxmox.com/threads/185473/

Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>

Jonas Theisen (2):
  ui: vm create: populate EFI and TPM storage by default
  ui: vm: create: fix autoSelect for disk storage selector when
    re-enabling field

 www/manager6/form/DiskStorageSelector.js | 5 +++++
 www/manager6/qemu/HDEfi.js               | 1 +
 www/manager6/qemu/HDTPM.js               | 1 +
 www/manager6/qemu/SystemEdit.js          | 2 ++
 4 files changed, 9 insertions(+)

-- 
2.47.3





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

* [PATCH pve-manager v2 1/2] ui: vm create: populate EFI and TPM storage by default
  2026-08-06 13:01 [PATCH pve-manager v2 0/2] ui: vm create: populate EFI and Jonas Theisen
@ 2026-08-06 13:01 ` Jonas Theisen
  2026-08-06 13:01 ` [PATCH pve-manager v2 2/2] ui: vm: create: fix autoSelect for disk storage selector when re-enabling field Jonas Theisen
  1 sibling, 0 replies; 3+ messages in thread
From: Jonas Theisen @ 2026-08-06 13:01 UTC (permalink / raw)
  To: pve-devel

On VM creation the storage dropdown for EFI and TPM were empty,
while the storage for VM disks was populated by default.

This commit adds the parameters to the selectors to also populate
the storage for EFI and TPM disks automatically.

I oriented myself on the parameters already used for VM disk creation
in HDEdit.js

Reported by a forum user in https://forum.proxmox.com/threads/185473/

Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 www/manager6/qemu/HDEfi.js      | 1 +
 www/manager6/qemu/HDTPM.js      | 1 +
 www/manager6/qemu/SystemEdit.js | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/www/manager6/qemu/HDEfi.js b/www/manager6/qemu/HDEfi.js
index 14a64fc0..9c880de5 100644
--- a/www/manager6/qemu/HDEfi.js
+++ b/www/manager6/qemu/HDEfi.js
@@ -63,6 +63,7 @@ Ext.define('PVE.qemu.EFIDiskInputPanel', {
                 nodename: me.nodename,
                 disabled: me.disabled,
                 hideSize: true,
+                autoSelect: me.insideWizard,
             },
             {
                 xtype: 'proxmoxcheckbox',
diff --git a/www/manager6/qemu/HDTPM.js b/www/manager6/qemu/HDTPM.js
index 947e3738..ee51b9ce 100644
--- a/www/manager6/qemu/HDTPM.js
+++ b/www/manager6/qemu/HDTPM.js
@@ -55,6 +55,7 @@ Ext.define('PVE.qemu.TPMDiskInputPanel', {
                 nodename: me.nodename,
                 disabled: me.disabled,
                 hideSize: true,
+                autoSelect: me.insideWizard,
             },
             {
                 xtype: 'proxmoxKVComboBox',
diff --git a/www/manager6/qemu/SystemEdit.js b/www/manager6/qemu/SystemEdit.js
index 299be5f8..458cb493 100644
--- a/www/manager6/qemu/SystemEdit.js
+++ b/www/manager6/qemu/SystemEdit.js
@@ -137,6 +137,7 @@ Ext.define('PVE.qemu.SystemInputPanel', {
             hidden: true,
             hideSize: true,
             usesEFI: true,
+            insideWizard: true,
         },
     ],
 
@@ -184,6 +185,7 @@ Ext.define('PVE.qemu.SystemInputPanel', {
             },
             disabled: true,
             hidden: true,
+            insideWizard: true,
         },
     ],
 });
-- 
2.47.3





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

* [PATCH pve-manager v2 2/2] ui: vm: create: fix autoSelect for disk storage selector when re-enabling field
  2026-08-06 13:01 [PATCH pve-manager v2 0/2] ui: vm create: populate EFI and Jonas Theisen
  2026-08-06 13:01 ` [PATCH pve-manager v2 1/2] ui: vm create: populate EFI and TPM storage by default Jonas Theisen
@ 2026-08-06 13:01 ` Jonas Theisen
  1 sibling, 0 replies; 3+ messages in thread
From: Jonas Theisen @ 2026-08-06 13:01 UTC (permalink / raw)
  To: pve-devel

The `autoSelect` configuration in `DiskStorageSelector` relies on the
underlying `ComboGrid` store's `load` event to select the first
available storage.

When the field is disabled and subsequently re-enabled, the
`load` event does not fire again. Consequently, the field remains
empty despite `autoSelect` being configured.

Fix this by explicitly handling the auto-selection logic inside the
`setDisabled` method. When the field is being enabled and is
currently empty, select the first record from the cached store.

Contributed-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 www/manager6/form/DiskStorageSelector.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/www/manager6/form/DiskStorageSelector.js b/www/manager6/form/DiskStorageSelector.js
index 696f9033..f0af07ec 100644
--- a/www/manager6/form/DiskStorageSelector.js
+++ b/www/manager6/form/DiskStorageSelector.js
@@ -117,6 +117,11 @@ Ext.define('PVE.form.DiskStorageSelector', {
         // reset on disable
         if (value) {
             hdstorage.setValue();
+        } else if (me.autoSelect && !hdstorage.getValue()) {
+            let rec = hdstorage.getStore().first();
+            if (rec && rec.data) {
+                hdstorage.setValue(rec.data[hdstorage.valueField], true);
+            }
         }
         hdstorage.setDisabled(value);
 
-- 
2.47.3





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

end of thread, other threads:[~2026-08-06 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 13:01 [PATCH pve-manager v2 0/2] ui: vm create: populate EFI and Jonas Theisen
2026-08-06 13:01 ` [PATCH pve-manager v2 1/2] ui: vm create: populate EFI and TPM storage by default Jonas Theisen
2026-08-06 13:01 ` [PATCH pve-manager v2 2/2] ui: vm: create: fix autoSelect for disk storage selector when re-enabling field Jonas Theisen

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