[SOLVED] Pi-hole v5 - DOCKER - Customize Dashboard?

Pi-hole v5 - DOCKER - Customize Dashboard?

Expected Behaviour:

Greetings. Is it possible to customize the graphs and tables on the Dashboard page? Specifically, I am looking to increase the row counts in the Top Domains and Top Clients tables.

I reviewed the following article, but it references v4, and it appears that the code has changed and the article is no longer current with the files names and code sections.

Actual Behaviour:

Everything is behaving as expected. This questions is if the expected behaviour can be changed.

Debug Token:

https://tricorder.pi-hole.net/2k1b7rzmuy

Half way there. I located the "// Extract only the first ten entries" section in the /var/www/html/admin/api_db.php file, but this only controls the Top Clients table on the Long Term Data -> Lists page.

All the way there.

I located the "function updateTopClientsChart() {" section in the /var/www/html/admin/scripts/pi-hole/js/index.js file.

First, I copied the existing line:
$.getJSON("api.php?summaryRaw&getQuerySources&topClientsBlocked", function(data) {

Then, I commented out the existing line
// $.getJSON("api.php?summaryRaw&getQuerySources&topClientsBlocked", function(data) {

Finally, I modified the copy of the original line
$.getJSON("api.php?summaryRaw&getQuerySources=20&topClientsBlocked=20", function(data) {

Hope this helps someone else out.

Just remember to revert the changes before you try to update.

Thanks for the tip. I just figured I would need to re-apply the changes as the upgrade process would simply over-write the entire file. Does the upgrade process perform differently?

The update compares /var/www/html/admin which is a local git repository. If there are changes to the repo that makes the local repository "dirty" then the update will fail. We do attempt to stash changes so you can reapply them but there's a high chance the update just won't complete.

Good to know. This is my first time working with DOCKER. No doubt my actions would have caused another trip to the forums.

I was wondering what these files were:

/var/cache/lighttpd/compress/admin/scripts/pi-hole/js/

Are these backups of files that are modified?

Oh, wait, this is Docker? Sorry I missed that. The update process is different for docker since pihole -up isn't supported. When there's a new version released you pull the new image which would be missing your changes. You'll have to make the same changes with the new image.

The /var/cache files are created by lighttpd automatically to improve response times. Making changes to the js files will update the cache the first time the page is served.

Fantastic. Thanks for the great insight. I've learned a lot today.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.