[pve-devel] [PATCH manager 1/4] correctly delete name of a qemu vm

Emmanuel Kasper e.kasper at proxmox.com
Wed Jul 6 11:19:14 CEST 2016


Reviewed-by: Emmanuel Kasper <e.kasper at proxmox.com>

On 07/05/2016 05:06 PM, Dominik Csapak wrote:
> we mistakenly sent
> 'name:'
> instead of:
> 'delete:name'
> 
> in case of an empty name of qemu guest
> which lead to an error message that it is
> not a valid dns name
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/manager6/qemu/Options.js | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
> index 95d6eb1..9f2bd07 100644
> --- a/www/manager6/qemu/Options.js
> +++ b/www/manager6/qemu/Options.js
> @@ -28,12 +28,24 @@ Ext.define('PVE.qemu.Options', {
>  		    xtype: 'pveWindowEdit',
>  		    subject: gettext('Name'),
>  		    items: {
> -			xtype: 'textfield',
> -			name: 'name',
> -			vtype: 'DnsName',
> -			value: '',
> -			fieldLabel: gettext('Name'),
> -			allowBlank: true
> +			xtype: 'inputpanel',
> +			items:{
> +			    xtype: 'textfield',
> +			    name: 'name',
> +			    vtype: 'DnsName',
> +			    value: '',
> +			    fieldLabel: gettext('Name'),
> +			    allowBlank: true
> +			},
> +			onGetValues: function(values) {
> +			    var params = values;
> +			    if (values.name === undefined ||
> +				values.name === null ||
> +				values.name === '') {
> +				params = { 'delete':'name'};
> +			    }
> +			    return params;
> +			}
>  		    }
>  		} : undefined
>  	    },
> 




More information about the pve-devel mailing list