From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Fiona Ebner <f.ebner@proxmox.com>,
Stefan Hanreich <s.hanreich@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] ui: sdn: ipam/dhcp: allow sorting by guest ID
Date: Fri, 1 Aug 2025 13:19:47 +0200 [thread overview]
Message-ID: <2014f691-aa28-4ab4-91c1-48c1f68d8a54@proxmox.com> (raw)
In-Reply-To: <0f6db1c9-a1bd-4ac3-9836-79ceac6b4eec@proxmox.com>
Am 01.08.25 um 11:45 schrieb Fiona Ebner:
> 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@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?
A dedicated VMID return property, i.e. that always will just contain the
VMID (not like "id" from /cluster/resources/ which depends on the
resource type) should indeed always be an integer, so changing the type
in the API seems alright to me.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-08-01 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 9:26 Fiona Ebner
2025-08-01 9:45 ` Fiona Ebner
2025-08-01 11:19 ` Thomas Lamprecht [this message]
2025-08-01 15:38 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2014f691-aa28-4ab4-91c1-48c1f68d8a54@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.hanreich@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.