From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 95B3F6970B for ; Mon, 31 Aug 2020 12:55:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8C61B13255 for ; Mon, 31 Aug 2020 12:55:43 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id C7F1F1324B for ; Mon, 31 Aug 2020 12:55:42 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9317E44960 for ; Mon, 31 Aug 2020 12:55:42 +0200 (CEST) Date: Mon, 31 Aug 2020 12:55:40 +0200 From: Dominic =?iso-8859-1?Q?J=E4ger?= To: Proxmox VE development discussion Message-ID: <20200831105540.GB120313@mala.proxmox.com> References: <20200825151426.17428-1-a.lauterer@proxmox.com> <20200825151426.17428-5-a.lauterer@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825151426.17428-5-a.lauterer@proxmox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SPAM-LEVEL: Spam detection results: 0 AWL 1.591 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mozilla.org, data.name] Subject: Re: [pve-devel] [PATCH manager 4/4] ui: qemu: Add disk reassign dialog X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2020 10:55:43 -0000 Somehow my eslint complains about undefined variables? Maybe the "const" from the example [0] is required? On Tue, Aug 25, 2020 at 05:14:26PM +0200, Aaron Lauterer wrote: > + let dropdownData = []; > + for ([vmid, data] of Object.entries(vms)) { > + if (vmid === me.vmid) { continue; } > + dropdownData.push({ > + vmid: vmid, > + name: `${vmid} ${data.name}`, > + }); > + } [0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries