[pve-devel] [PATCH pve-manager 1/2] Refactor PVE.form.GroupSelector.

Thomas Lamprecht t.lamprecht at proxmox.com
Mon May 7 11:31:14 CEST 2018


Am 05/04/2018 um 04:06 PM schrieb René Jochum:

please try to add (short) information _why_ you do this here.
I mean, I can guess it and be probably correct, especially as 2/2 is 
here in context.

> Signed-off-by: René Jochum <r.jochum at proxmox.com>
> ---
>   www/manager6/form/GroupSelector.js | 25 +++++++++++--------------
>   1 file changed, 11 insertions(+), 14 deletions(-)
> 
> diff --git a/www/manager6/form/GroupSelector.js b/www/manager6/form/GroupSelector.js
> index e7c674ff..0b7c2280 100644
> --- a/www/manager6/form/GroupSelector.js
> +++ b/www/manager6/form/GroupSelector.js
> @@ -1,6 +1,16 @@
> +Ext.define('pve-groups', {
> +	extend: 'Ext.data.Model',
> +	fields: [ 'groupid', 'comment' ],
> +	proxy: {
> +            type: 'proxmox',

indentation error (all spaces), I know you just copied it but that is
actually the best time to fix them, as lines get touched anyways.

> +	    url: "/api2/json/access/groups"
> +	},
> +	idProperty: 'groupid'
> +});
> +
>   Ext.define('PVE.form.GroupSelector', {
>       extend: 'Proxmox.form.ComboGrid',
> -    alias: ['widget.pveGroupSelector'],
> +    xtype: 'pveGroupSelector',
>   
>       allowBlank: false,
>       autoSelect: false,
> @@ -42,17 +52,4 @@ Ext.define('PVE.form.GroupSelector', {
>   
>   	store.load();
>       }
> -
> -}, function() {
> -
> -    Ext.define('pve-groups', {
> -	extend: 'Ext.data.Model',
> -	fields: [ 'groupid', 'comment' ],
> -	proxy: {
> -            type: 'proxmox',
> -	    url: "/api2/json/access/groups"
> -	},
> -	idProperty: 'groupid'
> -    });
> -
>   });
> 





More information about the pve-devel mailing list