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

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Aug 20 17:36:52 CEST 2020


On 30.07.20 12:18, Dominic Jäger wrote:
> Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
> ---
> v1->v2: unchanged
> 
>  src/window/Edit.js | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/window/Edit.js b/src/window/Edit.js
> index d7972b6..2dfab19 100644
> --- a/src/window/Edit.js
> +++ b/src/window/Edit.js
> @@ -134,6 +134,10 @@ Ext.define('Proxmox.window.Edit', {
>  	    values = undefined;
>  	}
>  
> +	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..





More information about the pve-devel mailing list