You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched other issues and found no duplicates
I want to request a feature or enhancement and not ask a question
The problem
Currently when sorting URLs (say in the DNS rewrites tab), the sorting is done from left to right. This is quite inconvinient as a list of following urls:
a.tld
b.tld
a.b.tld
b.a.tld
a.b.a.tld
Will be sorted as follows:
a.b.a.tld
a.b.tld
a.tld
b.a.tld
b.tld
A much better way of sorting would result in the following list:
a.tld
b.a.tld
a.b.a.tld
b.tld
a.b.tld
Proposed solution
Split the strings by the period symbol ("a.b.a.tld" => ["a", "b", "a", "tld"])
Reverse the list (["a", "b", "a", "tld"] => ["tld", "a", "b", "a"])
Join the elements together with a period (["tld", "a", "b", "a"] => tld.a.b.a)
Sort with those keys
Reverse the steps before displaying the sorted list
This could probably be optimized but that's the general idea.
Alternatives considered and additional information
It is worth noting that IPs should not be sorted this way. Therefore, if a field can contain both IPs and domains, we have to check first if the contents of a cell are and ip address or not (for example with this regex ^((\d|1?[1-9]\d|2[0-4]\d|25[0-5])\.){3}(\d|1?[1-9]\d|2[0-4]\d|25[0-5])$ (have not tested it))
The text was updated successfully, but these errors were encountered:
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
I want to request a feature or enhancement and not ask a question
The problem
Currently when sorting URLs (say in the DNS rewrites tab), the sorting is done from left to right. This is quite inconvinient as a list of following urls:
Will be sorted as follows:
A much better way of sorting would result in the following list:
Proposed solution
This could probably be optimized but that's the general idea.
Alternatives considered and additional information
It is worth noting that IPs should not be sorted this way. Therefore, if a field can contain both IPs and domains, we have to check first if the contents of a cell are and ip address or not (for example with this regex
^((\d|1?[1-9]\d|2[0-4]\d|25[0-5])\.){3}(\d|1?[1-9]\d|2[0-4]\d|25[0-5])$
(have not tested it))The text was updated successfully, but these errors were encountered: