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 AFE05637BE for ; Tue, 25 Aug 2020 11:32:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9E23024DF7 for ; Tue, 25 Aug 2020 11:31:41 +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 CC2BC24DED for ; Tue, 25 Aug 2020 11:31:40 +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 8E7694486D for ; Tue, 25 Aug 2020 11:31:40 +0200 (CEST) Date: Tue, 25 Aug 2020 11:31:38 +0200 From: Dominic =?iso-8859-1?Q?J=E4ger?= To: Thomas Lamprecht Cc: Proxmox VE development discussion Message-ID: <20200825093138.GA2634346@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> <20200824084202.GA1742874@mala.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200824084202.GA1742874@mala.proxmox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SPAM-LEVEL: Spam detection results: 0 AWL 1.705 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. [proxmox.com] 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: Tue, 25 Aug 2020 09:32:11 -0000 I think that doing this without changing anything in the shared code is not trivial. So it's still transforming the url [0], but not specific to the import function anymore. Of course I am still open for other approaches that I haven't seen yet :) [0] https://lists.proxmox.com/pipermail/pve-devel/2020-August/044807.html On Mon, Aug 24, 2020 at 10:42:02AM +0200, Dominic Jäger wrote: > 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.. > > > I'll think of a better way. >