Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphabetical sorting of IP addresses rather than numerical #21

Closed
rowanthorpe opened this issue Jun 28, 2013 · 6 comments
Closed

Alphabetical sorting of IP addresses rather than numerical #21

rowanthorpe opened this issue Jun 28, 2013 · 6 comments

Comments

@rowanthorpe
Copy link
Contributor

When clicking the arrows on the web-interface to sort ipv[46]addresses, they are sorted "alphabetically", e.g.:

192.168.1.1
192.168.1.10
192.168.1.2

The sort needs to be changed to "numerical" for these to be meaningful. This also impacts on ipv6 addresses, keeping in mind that it needs to "numerically" sort hex-numbers .

@rowanthorpe
Copy link
Contributor Author

For reference, to help whoever works on this bug, it seems that this is governed by DataTables which is included from here.

The line that sets the actual sorting seems to be here.

On reflection this will probably be quite complex to change because rather than using DataTable's internal sorting types (string, numeric, date, html) it will require actually parsing the IP addresses, including IPv6 in its compacted form, etc...

@barryo
Copy link
Member

barryo commented Jul 19, 2013

DataTables allows for custom sort functions (we already actually have
them in places).

It probably means a hidden column linked to the IP addresses with the
int32 for ipv4 and the fully decompressed v6 address.

It's a not insignificant bit of work which only yields some frontend
niceness so it'll be a pretty low priority.

On 19/07/13 14:03, Rowan Thorpe wrote:

For reference, to help whoever works on this bug, it seems that this is
governed by DataTables http://www.datatables.net which is included
from here
https://github.com/inex/IXP-Manager/blob/master/public/js/220-jquery.dataTables-1.9.4.js.

The line that sets the actual sorting seems to be here
https://github.com/inex/IXP-Manager/blob/master/application/controllers/Ipv4AddressController.php#L110.

On reflection this will probably be quite complex to change because
rather than using DataTable's internal sorting types (string, numeric,
date, html) it will require actually parsing the IP addresses, including
IPv6 in its compacted form, etc...


Reply to this email directly or view it on GitHub
#21 (comment).

@nickhilliard
Copy link
Member

http://datatables.net/plug-ins/sorting, search for "IP addresses".

@rowanthorpe
Copy link
Contributor Author

Nice 👍 I can see that only accurately sorts IPv4 dot-notation though, but that would still be an improvement for IPv6 (over alphabetical) anyway, until someone wants to contribute a thorough IPv6-sort to Datatables...

@listerr
Copy link
Contributor

listerr commented Jan 22, 2014

Also /customer/list needs fixing because it Lexical sorts ASNs instead of numerically.

@listerr
Copy link
Contributor

listerr commented Mar 14, 2019

I know this might be considered a "frontend niceness" but it makes assigning IP addressees a complete pain and unhelpful, and the process makes no sense. It is not as straightforward as "go to the bottom of the list, find the next free one and assign it."

It is "pick through the list of addresses until you get to a high numbered one that looks like it may or may not be in the right sequence" (and a host of other IP address management issues...)

Also VERY ANNOYING is that this list always defaults to IPv6 when I never, ever care about IPv6 in this page, or assign IPv6 addresses in this way, since we already know what those are going to be, they're never picked from a list. I know you want to evangelise IPv6 and all that, but IXPs are already sold on IPv6. It just adds a needless annoying extra click in an already awkward workflow in the admin interface.

With the migration to Laravel, is there some possibility that this can be fixed?

yannrobin added a commit that referenced this issue Feb 10, 2020
barryo added a commit that referenced this issue Feb 10, 2020
[Bf] - fix IP sorting - fixes #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants