[pve-devel] [PATCH manager] fix #2810: don't add options multiple times to features property

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Jun 22 14:51:08 CEST 2020


does not fix the issue (which is that the state is not properly resetted 
between editing one container and then another one).

On June 22, 2020 1:54 pm, Oguz Bektas wrote:
> instead of unconditionally pushing to the 'mounts' array we need to check
> if we already have the option in there. without this, we get config
> options like:
> 
> features: nfs;nfs;nfs
> 
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
>  www/manager6/lxc/FeaturesEdit.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/www/manager6/lxc/FeaturesEdit.js b/www/manager6/lxc/FeaturesEdit.js
> index 1275a2e0..63a9a2a9 100644
> --- a/www/manager6/lxc/FeaturesEdit.js
> +++ b/www/manager6/lxc/FeaturesEdit.js
> @@ -72,7 +72,7 @@ Ext.define('PVE.lxc.FeaturesInputPanel', {
>  	var me = this;
>  	var mounts = me.mounts;
>  	me.fstypes.forEach(function(fs) {
> -	    if (values[fs]) {
> +	    if (values[fs] && !mounts.includes(fs)) {
>  		mounts.push(fs);
>  	    }
>  	    delete values[fs];
> -- 
> 2.20.1
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




More information about the pve-devel mailing list