[pve-devel] [PATCH manager] ui: fix search for 'Guests without Backup' window

Lukas Wagner l.wagner at proxmox.com
Fri Jan 20 09:47:10 CET 2023


In JS, a `for (const a in <...>)` loop iterates over indices, not
over values. To iterate over values, `for (const a of <..>)` has
to be used. Furthermore, filtering by ID did not work properly, since
the property is called `vmid`, not `id`.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 www/manager6/dc/BackupJobDetail.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js
index c82f50f4..c4683a47 100644
--- a/www/manager6/dc/BackupJobDetail.js
+++ b/www/manager6/dc/BackupJobDetail.js
@@ -460,7 +460,7 @@ Ext.define('PVE.dc.BackedGuests', {
 			    me.store.clearFilter(true);
 			    me.store.filterBy(function(record) {
 				let data = record.data;
-				for (const property in ['name', 'id', 'type']) {
+				for (const property of ['name', 'vmid', 'type']) {
 				    if (data[property] === null) {
 					continue;
 				    }
-- 
2.30.2






More information about the pve-devel mailing list