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 3A1D267520 for ; Thu, 30 Jul 2020 12:20:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3775515F68 for ; Thu, 30 Jul 2020 12:20:22 +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 AF78715F5E for ; Thu, 30 Jul 2020 12:20:21 +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 74004433FC for ; Thu, 30 Jul 2020 12:20:21 +0200 (CEST) Date: Thu, 30 Jul 2020 12:20:19 +0200 From: Dominic =?iso-8859-1?Q?J=E4ger?= To: Proxmox VE development discussion Message-ID: <20200730102019.GA511631@mala.proxmox.com> References: <20200707100412.81731-1-d.jaeger@proxmox.com> <20200707100412.81731-3-d.jaeger@proxmox.com> <2405749c-bc36-0a9a-0302-5d73a307b93a@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2405749c-bc36-0a9a-0302-5d73a307b93a@proxmox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SPAM-LEVEL: Spam detection results: 0 AWL 1.894 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 Subject: Re: [pve-devel] [PATCH manager 2/3] Hardware View: Add GUI for importdisk 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: Thu, 30 Jul 2020 10:20:22 -0000 Thank you for taking a look! > > + if (me.isImport) { > > + // These keys & values are accepted by the API as they are > > + let simple = ['backup', 'ssd', 'iothread', 'cache']; > > + let burst = ['mbps_rd', 'mbps_wr', 'iops_rd', 'iops_wr']; > > + burst = burst.concat(burst.map(x => `${x}_max`)); > > + let available = simple.concat(burst); > > + let addValues = key => `${key}=${values[key]}`; > > + let selectedKeys = x => values[x]; > > + let options = available.filter(selectedKeys).map(addValues).join(); > > + // These need modification for the API > > + options += values.discard ? ',discard=on' : ''; > > + options += values.noreplicate ? ',replicate=0' : ''; > > + params.device_options = options; > > One or two newlines in the above block would be nice to make the distinction between the logical blocks more obvious. Done. > > > + if (me.isImport) selector.storageLabel = 'Target storage'; > > this should be a `gettext('Target storage')` so it can be translated. Done. > for consistency I would not change the title and instead set the following: > me.subject = gettext('Import Disk'), Done.