[pve-devel] [PATCH widget-toolkit v2 1/3] EditWindow: Change url to 'importdisk' for import

Dominic Jäger d.jaeger at proxmox.com
Tue Aug 25 11:31:38 CEST 2020


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.
> 





More information about the pve-devel mailing list