Change TOP Clients from default 10 to 20

Hi Team,
ive edited: /var/www/html/admin/scripts/pi-hole/js/index.js with this line

api.php?summaryRaw&getQuerySources=25&topClientsBlocked=25

reboot,
but it shows always only 10 clients
Any Ideas?

Pi-hole Version v4.1.1 Web Interface Version v4.1.1 FTL Version v4.1.2

EDIT: ive to wait about 2min, after this time all my 25 clients are shown :wink:

Sorry for newbie question but how do you actually change it? i tried to edit the file on file manager but it wont save the edited file. thx

Hello,

I typically use nano to edit. Being that the permissions are different for the file use sudo.

sudo nano /var/www/html/admin/scripts/pi-hole/js/index.js

You can do ctrl-w to find and enter - topclients, and that should take you to the line. add =25 or what ever number after Sources and Blocked.
example api.php?summaryRaw&getQuerySources=25&topClientsBlocked=25

then ctrl-o to write, then confirm name and press enter to save, then ctrl x to exit

It will take a bit, but should start to show you the larger list of clients.

JC

1 Like

Thank you.

I did this on 5.2.2 and it still works:

on scripts/pi-hole/js/index.js we must add the amount on the parameters getQuerySources, topItems, topClients and topClientsBlocked.

Example, replace getQuerySources&topClientsBlocked for getQuerySources=50&topClientsBlocked=50

We really should have this as a WebUI setting! If no value is received as parameter - as it is on repo index.js -, api.php could query the value from settings instead of using default 10.