[pve-devel] [PATCH manager] ui: sdn: ipam/dhcp: allow sorting by guest ID
Fiona Ebner
f.ebner at proxmox.com
Fri Aug 1 11:45:34 CEST 2025
Am 01.08.25 um 11:27 AM schrieb Fiona Ebner:
> Previously, sorting would not apply to the leaves of the tree.
>
> Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
> www/manager6/tree/DhcpTree.js | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/www/manager6/tree/DhcpTree.js b/www/manager6/tree/DhcpTree.js
> index 0088d708..40eb40bf 100644
> --- a/www/manager6/tree/DhcpTree.js
> +++ b/www/manager6/tree/DhcpTree.js
> @@ -75,6 +75,7 @@ Ext.define('PVE.sdn.DhcpTree', {
> vnets[element.vnet].children.push(subnet);
> }
>
> + element.name = element.vmid; // for sorting
> element.type = 'mapping';
> element.iconCls = 'x-tree-icon-none';
> subnets[element.subnet].children.push(element);
Just noticed that this doesn't sort numerically, because the returned
values are strings. Should I fix it up here by using parseInt() or
should we change the API endpoint to return integers already?
More information about the pve-devel
mailing list