[pve-devel] [PATCH manager] fix #4627: ui: backup edit: don't deselect all vms on load
Dominik Csapak
d.csapak at proxmox.com
Fri Mar 31 12:03:08 CEST 2023
'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 entires selected.
Since the first thing we do here is to deselect all, this wiped
the vm selection sometimes.
To fix it, check if we're actually in the correct mode before doing
anything.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/dc/Backup.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 7c6e244af..03a026513 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -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();
--
2.30.2
More information about the pve-devel
mailing list