Ability to sort whitelist/blacklist sites by date added as well as alphabetically

Would just make for easier viewing of the lists.

1 Like

Do you mean on the query log? You can do this already.

No, on the Whitelist page. Currently it's just a list of domains I have whitelisted, listed in order of when they were whitelisted. It'd be nice to be able to view the domains in alphabetic order as well.

I was just about to create a request for this. It's a lot easier to scan the white/blacklist for duplicates if they're listed alphabetically.

Hi,

as my blacklist is getting longer, is there any way to include this feature in the whitelist and blacklist overview?
I think it is only needed to implement a fixed sort from A-Z, to get a much better readable output.

Hello,
I know the list is ordered by timestamp. But currently, it's in ascending order, so the newly added domain or the adlist appears at the bottom (in case of the domain, on the last page). In my opinion, it might be better if it was sorted the other way.
Maybe an option to set.

:slight_smile:

Edward.

So I am not sure if such a reply is allowed or not, (remove it if it is against the rules), but I think I figured out a temporary solution that works for me.

If I modify two lines in groups-adlist.js and groups-domains.js I can get what I want. Try it at your own risk. Might have to run it every time you update, but that's okay I guess.

sudo sed -i "s/order\: \[\[0, \"asc\"\]\],/order\: \[\[0, \"desc\"\]\],/g" /var/www/html/admin/scripts/pi-hole/js/groups-adlists.js
sudo sed -i "s/table.order(\[\[0, \"asc\"\]\]).draw();/table.order(\[\[0, \"desc\"\]\]).draw();/g" /var/www/html/admin/scripts/pi-hole/js/groups-adlists.js
sudo sed -i "s/order\: \[\[0, \"asc\"\]\],/order\: \[\[0, \"desc\"\]\],/g" /var/www/html/admin/scripts/pi-hole/js/groups-domains.js
sudo sed -i "s/table.order(\[\[0, \"asc\"\]\]).draw();/table.order(\[\[0, \"desc\"\]\]).draw();/g" /var/www/html/admin/scripts/pi-hole/js/groups-domains.js

Would find this feature (sort by database ID or date-added as originally suggested, which is problably the same if IDs are never re-used?) extremely helpful, too. The "sed"-hack proposed by Edward is a work-around, but having a "sort by time of adding asc/desc" button would be nice.

Sidenote: suggest to place the "reset sorting" button above the table to be eye-poking.

1 Like