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

Problem Sorting IP Addresses #6

Open
ISSchuster opened this issue Jul 9, 2024 · 1 comment
Open

Problem Sorting IP Addresses #6

ISSchuster opened this issue Jul 9, 2024 · 1 comment

Comments

@ISSchuster
Copy link

ISSchuster commented Jul 9, 2024

Hi, great plugin but there is a problem sorting IP Addresses...

Follwing Table:

Server IP User Password
server01 10.61.5.234 root 123456
server02 10.61.5.232 root 123456
server03 10.61.5.231 root 123456
server04 10.61.5.235 root 123456
server05 10.61.5.236 root 123456
server06 10.61.5.237 root 123456

Sorting by IP results in:
10.61.5.234
10.61.5.232
10.61.5.231
10.61.5.235
10.61.5.236
10.61.5.237

or

10.61.5.237
10.61.5.236
10.61.5.235
10.61.5.231
10.61.5.232
10.61.5.234

Doesn't seem quiet right ;-) Any idea for a solution.

Seems it doesn't get sorted at all - even as text it should be sorted correctly?

I often have lists with IP Addresses and would like to sort them.

Thanks.

Just did some more tests:
I replaced the . with a -
10-61-5-234 and so on is sorted correctly... But that's not an IP anymore ;-)

@hieuthi
Copy link
Owner

hieuthi commented Jul 9, 2024

This plugin uses an open source library that has a very naive method of determining whether a column is text, number or date string so it interpreted IP as number. Of course I could write the logic myself but that would create more works for me and IP is kinda niche data, so there is nothing I could do at the moment.

That being said, I will leave this issue open and may get back to it at a later date when I have some free time to spend on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants