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 1AEA76307E for ; Mon, 24 Aug 2020 10:42:06 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0A69E1B431 for ; Mon, 24 Aug 2020 10:42:06 +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 8E1B11B427 for ; Mon, 24 Aug 2020 10:42:05 +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 1CB2F44843 for ; Mon, 24 Aug 2020 10:42:05 +0200 (CEST) Date: Mon, 24 Aug 2020 10:42:02 +0200 From: Dominic =?iso-8859-1?Q?J=E4ger?= To: Thomas Lamprecht Cc: Proxmox VE development discussion Message-ID: <20200824084202.GA1742874@mala.proxmox.com> References: <20200730101829.52823-1-d.jaeger@proxmox.com> <20200730101829.52823-2-d.jaeger@proxmox.com> <7d766efe-9cf4-fe60-a522-c223600cdd6d@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7d766efe-9cf4-fe60-a522-c223600cdd6d@proxmox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SPAM-LEVEL: Spam detection results: 0 AWL 1.724 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 widget-toolkit v2 1/3] EditWindow: Change url to 'importdisk' for import 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, 24 Aug 2020 08:42:06 -0000 On Thu, Aug 20, 2020 at 05:36:52PM +0200, Thomas Lamprecht wrote: > On 30.07.20 12:18, Dominic Jäger wrote: > > --- a/src/window/Edit.js > > +++ b/src/window/Edit.js > > @@ -134,6 +134,10 @@ Ext.define('Proxmox.window.Edit', { > > + if (me.isImport) { > > + url = url.replace('config', 'importdisk'); > > + } > I'd rather avoid doing this here, i.e., the common shared code should not > do such transforming things specific for a single use case downstream.. > That adds coupling, which should be avoided if possible. > > Why can the import window instance not handle this? > > sorry to catch this only now.. > This was the first way that I found that resulted in a working prototype. And I wasn't sure if this is actually the right direction for this patch, so I left it like that for the moment. I'll think of a better way.