Enhancing the display when sorting IP Address in DHCP module

Hey team,

I’ve been playing with NethServer 2.0 beta (7.2.15.11) and here’s a suggestion for displaying IP addresses in the IP Reservation tab. Let’s say you have the following IP addresses: 192.168.1.9, 192.168.1.2, 192.168.1.200 and 192.168.1.10. If you sorted by IP Address, it would look like

  • 192.168.1.10
  • 192.168.1.2
  • 192.168.1.200
  • 192.168.1.9

Ideally, it would look like this:

  • 192.168.1.2
  • 192.168.1.9
  • 192.168.1.10
  • 192.168.1.200

I suspect that the easiest way to get it to look like the above is:

  • 192.168.001.002
  • 192.168.001.009
  • 192.168.001.010
  • 192.168.001.200

I currently assign devices to specific buckets manually so that it’ll be easier to find them and then it’s easier to sort it by IP address so I can see the gaps.

1 Like

It sounds reasonable and such sorting looks a bit unuseful implemented in this way.
How hard is it to change this behaviour? @davidep

We use https://datatables.net/ component to display tables: it supports sorting on special formats. Please dig it to see if an IP sorting plugin is available and test it: we could merge it with our server-manager :wink:

1 Like

Here’s a quick link that shows how to do it: https://datatables.net/plug-ins/sorting/ip-address

Kelvin

2 Likes