[pve-devel] [PATCH manager 1/2] www: utils: fix `maxcpu` validity check in render_hostcpu()

Christoph Heiss c.heiss at proxmox.com
Wed Jul 17 14:51:48 CEST 2024


Should be marked [v2] obviously, with v1 here [0].

Sorry for the noise, noticed it only after hitting send.

[0] https://lists.proxmox.com/pipermail/pve-devel/2024-July/064681.html

On Wed, Jul 17, 2024 at 02:49:50PM GMT, Christoph Heiss wrote:
> Comparing with Proxmox.Utils.render_cpu() seems just a slight oversight
> in the condition. Fix it by aligning it with how it is done in
> Proxmox.Utils.render_cpu() for consistency.
>
> Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
> ---
>  www/manager6/Utils.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index f5608944d..ddef11bb1 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -1073,7 +1073,7 @@ Ext.define('PVE.Utils', {
>  	}
>  	var maxcpu = node.data.maxcpu || 1;
>
> -	if (!Ext.isNumeric(maxcpu) && (maxcpu >= 1)) {
> +	if (!Ext.isNumeric(maxcpu) || maxcpu < 1) {
>  	    return '';
>  	}
>
> --
> 2.45.1
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>




More information about the pve-devel mailing list