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

Alpha-Numeric Sort Zones #126

Open
vectr0n opened this issue Mar 1, 2019 · 3 comments
Open

Alpha-Numeric Sort Zones #126

vectr0n opened this issue Mar 1, 2019 · 3 comments

Comments

@vectr0n
Copy link

vectr0n commented Mar 1, 2019

Either by default or an option to have the zones page sorted by alpha-numeric. I am not even sure how it's sorted by default, everything is everywhere.

@thomas-pike
Copy link
Collaborator

thomas-pike commented Mar 3, 2019

There was a deliberate choice to the way that it is currently ordered, though it certainly might not be obvious (or indeed useful in all situations). It is ordered alphabetically by top-level domain, and then by domain, subdomain etc. The advantages of sorting in this way are:

  • Clear distinction between domains belonging to different TLDs.
  • Delegated subdomains get grouped next to the domains that they belong to.
  • Reverse zones automatically get ordered by the IP prefix (read in a left-to-right direction).

For example, if you had example.com, foobar.com, example.org, subdomain1.example.com, subdomain2.example.com, subdomain1.example.org and sub.subdomain1.example.org, they would be sorted as:

               example.com
    subdomain1.example.com
    subdomain2.example.com
                foobar.com
               example.org
    subdomain1.example.org
sub.subdomain1.example.org

But I accept that there are disadvantages to sorting this way too:

  • Sort order is not immediately obvious.
  • Sometimes you want domains to be grouped together, even if their TLDs are different (eg. if you have example.com, example.org, example.tv, example.co.uk, example.net, etc. and then foobar.com, foobar.org...)

So it might make sense to have it possible to change the sort order, either on a per-user or per-installation setup.

@vectr0n
Copy link
Author

vectr0n commented Mar 3, 2019

Thanks for the reply and explanation. It would be nice to have am option in the way it's sorted by default if not to much work. I am not a dev by any means so I have no way of helping or do it myself and submitting a PR.

@jsoref
Copy link
Contributor

jsoref commented Jun 14, 2019

@vectr0n: Your issue was a great contribution by itself.

FWIW, even if you don't speak PHP, you can make improvements like the one I just offered (it barely requires speaking HTML).

As for actually offering multiple sort orderings, I can't think of a great way to do it... Normally one uses a widget that looks like: ↕, but that's purely for reversing an alphabetical sort. It looks like the recommended approach would be Sort: [ {by ...} |v].

Most of the time, I don't think I've been terribly bothered by the current sort. -- If I need to group by project.example.{*} vs. documentation.example.{*}, I will generally just filter to project.example or documentation.example and be left with something that covers what I actually need to look at.

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

3 participants