[pve-devel] [PATCH manager 1/2] add defaultSize parameter for DiskStorageSelector and set it to 8 for lxc

Dominik Csapak d.csapak at proxmox.com
Fri Jan 5 10:37:06 CET 2018


any comment ?

On 12/13/2017 11:34 AM, Dominik Csapak wrote:
> we had it previously on 8GB for containers, but with the refactoring,
> this got lost. this patch changes this back
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>   www/manager6/form/DiskStorageSelector.js | 6 +++++-
>   www/manager6/lxc/MPEdit.js               | 1 +
>   2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/form/DiskStorageSelector.js b/www/manager6/form/DiskStorageSelector.js
> index a742e0c8..2067a6ca 100644
> --- a/www/manager6/form/DiskStorageSelector.js
> +++ b/www/manager6/form/DiskStorageSelector.js
> @@ -28,6 +28,10 @@ Ext.define('PVE.form.DiskStorageSelector', {
>       // hides the size field (e.g, for the efi disk dialog)
>       hideSize: false,
>   
> +    // sets the intial size value
> +    // string because else we get a type confusion
> +    defaultSize: '32',
> +
>       changeStorage: function(f, value) {
>   	var me = this;
>   	var formatsel = me.getComponent('diskformat');
> @@ -115,7 +119,7 @@ Ext.define('PVE.form.DiskStorageSelector', {
>   		minValue: 0.001,
>   		maxValue: 128*1024,
>   		decimalPrecision: 3,
> -		value: '32',
> +		value: me.defaultSize,
>   		allowBlank: false
>   	    },
>   	    {
> diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js
> index 04c9b77c..54eca7b4 100644
> --- a/www/manager6/lxc/MPEdit.js
> +++ b/www/manager6/lxc/MPEdit.js
> @@ -175,6 +175,7 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
>   	    nodename: me.nodename,
>   	    storageContent: 'rootdir',
>   	    autoSelect: true,
> +	    defaultSize: 8,
>   	    hidden: me.unused || !me.isCreate
>   	});
>   
> 





More information about the pve-devel mailing list