]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #4627: ui: backup edit: don't deselect all guests on load
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 31 Mar 2023 10:03:08 +0000 (12:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Apr 2023 11:27:57 +0000 (13:27 +0200)
'selectPoolMembers' will be called when the poolid field changes.
(That can even happen when the mode is not even 'pool') Due to how
the fields are set, there is a race condition that this will be
called after the remaining fields were set up, including the VM list
that might have entries selected.

Since the first thing we do here is to deselect all, this wiped the
virtual guest selection sometimes.

To fix it, check if we're actually in the correct mode before doing
anything.

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

index 7c6e244af2f43ecb610d218a77bd4ff47b10b10f..03a026513a3ef9de94c25e2241f994a9f41dcb45 100644 (file)
@@ -96,6 +96,12 @@ Ext.define('PVE.dc.BackupEdit', {
 
        selectPoolMembers: function() {
            let me = this;
+           let mode = me.lookup('modeSelector').getValue();
+
+           if (mode !== 'pool') {
+               return;
+           }
+
            let vmgrid = me.lookup('vmgrid');
            let poolid = me.lookup('poolSelector').getValue();