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 373C16154B for ; Fri, 20 Nov 2020 10:38:47 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0A119EF71 for ; Fri, 20 Nov 2020 10:38:17 +0100 (CET) Received: from dev.dominic.proxmox.com (212-186-127-178.static.upcbusiness.at [212.186.127.178]) by firstgate.proxmox.com (Proxmox) with ESMTP id 04BD6EF4C for ; Fri, 20 Nov 2020 10:38:15 +0100 (CET) Received: by dev.dominic.proxmox.com (Postfix, from userid 0) id 87FB72236A; Fri, 20 Nov 2020 10:38:14 +0100 (CET) From: =?UTF-8?q?Dominic=20J=C3=A4ger?= To: pve-devel@lists.proxmox.com Date: Fri, 20 Nov 2020 10:38:12 +0100 Message-Id: <20201120093812.65554-7-d.jaeger@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201120093812.65554-1-d.jaeger@proxmox.com> References: <20201120093812.65554-1-d.jaeger@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -0.386 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KHOP_HELO_FCRDNS 0.399 Relay HELO differs from its IP's reverse DNS NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH manager 6/6 v2] importdisk gui: Make storages selectable again 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: Fri, 20 Nov 2020 09:38:47 -0000 And fix parameters for the API Signed-off-by: Dominic Jäger --- v2: Added www/manager6/qemu/HDEdit.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js index f8e811e1..0c5603ab 100644 --- a/www/manager6/qemu/HDEdit.js +++ b/www/manager6/qemu/HDEdit.js @@ -137,6 +137,8 @@ Ext.define('PVE.qemu.HDInputPanel', { } else { console.assert(me.isImport, "Returning multiple key/values is only allowed in import"); + delete me.drive.file; // TODO make this nesting mess less + delete me.drive.format; params.device_options = PVE.Parser.printPropertyString(me.drive); params.source = this.getSourceValue(values); params.device = values.controller + values.deviceid; @@ -226,7 +228,11 @@ Ext.define('PVE.qemu.HDInputPanel', { me.advancedColumn1 = []; me.advancedColumn2 = []; - let nodename = this.getViewModel().get('nodename'); // TODO hacky whacky + /* + * If the panel is part of a wizard (ImportWizard), then it gets the value from the viewmodel + * If the panel is part of a PVE.qemu.HDEdit window then it gets the nodename assigned from the window + */ + let nodename = this.getViewModel().get('nodename') || me.nodename; if (!me.confid || me.unused) { @@ -532,6 +538,7 @@ Ext.define('PVE.qemu.HDEdit', { unused: unused, isCreate: me.isCreate, showSourcePathTextfield: me.isImport, + isImport: me.isImport, returnSingleKey: !me.isImport, }); -- 2.20.1