Wrong sorting on DNS page

I’ve found a small cosmetic bug:
NethServer release 7.4.1708
on the admin-panel, section configuration, item DNS, tab hosts.
wrong behavior:
when I click the column header “IP address” the table is sorted on the IP column alphanumerical, so comes before


expected behaviour:
when I click the column header “IP address” the table is sorted on the IP column numerical, so comes before


Small bug, hopefully it can be fixed in a upcoming release.
(NB: maybe the same error is present in other sections/tables, I haven’t searched for it. When someone notices the same behaviour on other places, please report here.)

I think the variable is a string, but it’s more work than only converting it to an integer. I think you have to split it to

integer4=1 or 3 or 22

In my opinion you have to sort it one by one with an algorithm, first you have to look for integer1, for example 191<192>193, after that you have to look for integer2, then integer3 and at least integer4. At last step you can sort it by first integer1, than integer2 and so on and do the output like this


I think an other easier way could be if you have always 3 digits at a block, like this:

so it’s sorted automatically at the right way.

unfortunately, that’s not regarded a valid IP address when entering in the web-interface…

The data are sorted as strings, it’s the behavior of jQuery data-table plugin.

You need to get your hands dirty with JavaScript to get this fixed. :open_mouth: