Top Clients (blocked): Compute frequency relative to number of blocked not total number of queries

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-05-10 15:29:38 +02:00
parent 0d283bbfa2
commit 62f349b996

View File

@@ -593,7 +593,7 @@ function updateTopClientsChart() {
}
url = "<a href=\"queries.php?client="+clientip+"\" title=\""+clientip+"\">"+clientname+"</a>";
percentage = data.top_sources_blocked[client] / data.dns_queries_today * 100;
percentage = data.top_sources_blocked[client] / data.ads_blocked_today * 100;
clientblockedtable.append("<tr> <td>" + url +
"</td> <td>" + data.top_sources_blocked[client] + "</td> <td> <div class=\"progress progress-sm\" title=\""+percentage.toFixed(1)+"% of " + data.dns_queries_today + "\"> <div class=\"progress-bar progress-bar-blue\" style=\"width: " +
percentage + "%\"></div> </div> </td> </tr> ");