mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Add DNS reply statistics to settings page
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -63,7 +63,26 @@ function updateCacheInfo() {
|
||||
$("#sysinfo-cache-valid-ds").text(cache.valid.ds);
|
||||
$("#sysinfo-cache-valid-dnskey").text(cache.valid.dnskey);
|
||||
$("#sysinfo-cache-valid-other").text(cache.valid.other);
|
||||
$("#sysinfo-cache-overlay").hide();
|
||||
|
||||
var total =
|
||||
cache.optimized + cache.local + cache.auth + cache.extra.unanswered + cache.extra.forwarded;
|
||||
$("#sysinfo-replies-optimized").text(
|
||||
cache.optimized + " (" + ((100 * cache.optimized) / total).toFixed(1) + "%)"
|
||||
);
|
||||
$("#sysinfo-replies-local").text(
|
||||
cache.local + " (" + ((100 * cache.local) / total).toFixed(1) + "%)"
|
||||
);
|
||||
$("#sysinfo-replies-auth").text(
|
||||
cache.auth + " (" + ((100 * cache.auth) / total).toFixed(1) + "%)"
|
||||
);
|
||||
$("#sysinfo-replies-extra-unanswered").text(
|
||||
cache.extra.unanswered + " (" + ((100 * cache.extra.unanswered) / total).toFixed(1) + "%)"
|
||||
);
|
||||
$("#sysinfo-replies-extra-forwarded").text(
|
||||
cache.extra.forwarded + " (" + ((100 * cache.extra.forwarded) / total).toFixed(1) + "%)"
|
||||
);
|
||||
|
||||
$("#sysinfo-dns-overlay").hide();
|
||||
// Update every 10 seconds
|
||||
clearTimeout(cacheinfoTimer);
|
||||
cacheinfoTimer = setTimeout(updateCacheInfo, 10000);
|
||||
|
||||
+136
-78
@@ -134,87 +134,145 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-striped table-bordered nowrap">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span title="Size of the DNS domain cache">DNS cache size:</span>
|
||||
</th>
|
||||
<td id="sysinfo-cache-size"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span title="Number of cache insertions">DNS cache insertions:</span>
|
||||
</th>
|
||||
<td id="sysinfo-cache-inserted"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span title="Number of cache entries that had to be removed although they are not expired (increase cache size to reduce this number)" lookatme-text="DNS cache evictions:">DNS cache evictions:</span>
|
||||
</th>
|
||||
<td id="sysinfo-cache-evicted"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid A records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-a"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid AAAA records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-aaaa"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid CNAME records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-cname"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid SRV records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-srv"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid DS records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-ds"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid DNSKEY records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-dnskey"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Other valid records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-other"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
DNS cache expiries:
|
||||
</th>
|
||||
<td id="sysinfo-cache-expired"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Immortal DNS cache entries:
|
||||
</th>
|
||||
<td id="sysinfo-cache-immortal"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
See also our <a href="https://docs.pi-hole.net/ftldns/dns-cache/" rel="noopener" target="_blank">DNS cache documentation</a>.
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">DNS cache</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-striped table-bordered nowrap">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span title="Size of the DNS domain cache">DNS cache size:</span>
|
||||
</th>
|
||||
<td id="sysinfo-cache-size"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span title="Number of cache insertions">DNS cache insertions:</span>
|
||||
</th>
|
||||
<td id="sysinfo-cache-inserted"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span title="Number of cache entries that had to be removed although they are not expired (increase cache size to reduce this number)" lookatme-text="DNS cache evictions:">DNS cache evictions:</span>
|
||||
</th>
|
||||
<td id="sysinfo-cache-evicted"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
DNS cache expiries:
|
||||
</th>
|
||||
<td id="sysinfo-cache-expired"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Immortal DNS cache entries:
|
||||
</th>
|
||||
<td id="sysinfo-cache-immortal"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid A records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-a"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid AAAA records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-aaaa"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid CNAME records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-cname"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid SRV records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-srv"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid DS records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-ds"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Valid DNSKEY records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-dnskey"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Other valid records in cache:
|
||||
</th>
|
||||
<td id="sysinfo-cache-valid-other"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
See also our <a href="https://docs.pi-hole.net/ftldns/dns-cache/" rel="noopener" target="_blank">DNS cache documentation</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">DNS replies</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-striped table-bordered nowrap">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span>Local replies:</span>
|
||||
</th>
|
||||
<td id="sysinfo-replies-local"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Forwarded queries:
|
||||
</th>
|
||||
<td id="sysinfo-replies-extra-forwarded"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
Unanswered queries:
|
||||
</th>
|
||||
<td id="sysinfo-replies-extra-unanswered"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span>Cache optimizer replies:</span>
|
||||
</th>
|
||||
<td id="sysinfo-replies-optimized"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<span>Authoritative replies:</span>
|
||||
</th>
|
||||
<td id="sysinfo-replies-auth"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay" id="sysinfo-cache-overlay">
|
||||
<div class="overlay" id="sysinfo-dns-overlay">
|
||||
<i class="fa fa-sync fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user