« Pi-hole » : différence entre les versions

De wiki jackbot
Aller à la navigation Aller à la recherche
mAucun résumé des modifications
mAucun résumé des modifications
Ligne 17 : Ligne 17 :


Repérer la fonction :
Repérer la fonction :
<code>
<syntaxhighlight lang="js">
function updateTopClientsChart() {
function updateTopClientsChart() {
   $.getJSON("api.php?summaryRaw&getQuerySources=20&topClientsBlocked", function (data) {
   $.getJSON("api.php?summaryRaw&getQuerySources=20&topClientsBlocked", function (data) {
Ligne 23 : Ligne 23 :
       return;
       return;
     }
     }
</code>
</syntaxhighlight>


Ici le morceau getQuerySources=20, permettra d'afficher 20 clients
Ici le morceau getQuerySources=20, permettra d'afficher 20 clients

Version du 18 mars 2021 à 20:21


Pour bloquer la pub :

https://pi-hole.net/

https://docs.pi-hole.net/


Modifier l'affichage

le nombre de clients

Par défaut seulement 10 clients s'affiche dans l'interface de pi-hole. Si comme moi vous souhaitez en voir plus, il faut alors modifier le fichier :

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

Repérer la fonction :

function updateTopClientsChart() {
  $.getJSON("api.php?summaryRaw&getQuerySources=20&topClientsBlocked", function (data) {
    if ("FTLnotrunning" in data) {
      return;
    }

Ici le morceau getQuerySources=20, permettra d'afficher 20 clients