Modifying version 6 to show more than 10 top clients?

With version 5.x, I modified the following file to allow 25 top clients. Is there an easy way to do the same with version 6.x? The code is quite a bit different.

--- /srv/http/pihole/admin/scripts/pi-hole/js/index.js	2024-07-27 16:46:28.000000000 -0400
+++ index.js-mod	2023-10-30 06:31:03.000000000 -0400

@@ -473,7 +473,8 @@
 }
 
 function updateTopClientsChart() {
-  $.getJSON("api.php?summaryRaw&getQuerySources&topClientsBlocked", function (data) {
+  $.getJSON("api.php?summaryRaw&getQuerySources=25&topClientsBlocked=25", function (data) {
     if ("FTLnotrunning" in data) {
       return;
     }
@@ -577,7 +578,7 @@
 }
 
 function updateTopLists() {
-  $.getJSON("api.php?summaryRaw&topItems", function (data) {
+  $.getJSON("api.php?summaryRaw&topItems=15", function (data) {
     if ("FTLnotrunning" in data) {
       return;
     }

It's in the settings, called 'webserver.api.maxClients'

1 Like

Thank you