public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: fix search for 'Guests without Backup' window
Date: Fri, 20 Jan 2023 09:47:10 +0100	[thread overview]
Message-ID: <20230120084710.94577-1-l.wagner@proxmox.com> (raw)

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@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





             reply	other threads:[~2023-01-20  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20  8:47 Lukas Wagner [this message]
2023-01-20  8:56 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230120084710.94577-1-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal