mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 18:59:48 +01:00
Enabled auto-update for summary statistics. Top row statistics update
every 20 seconds.
This commit is contained in:
11
api.php
11
api.php
@@ -4,10 +4,19 @@
|
||||
|
||||
$data = array();
|
||||
|
||||
if (isset($_GET['summary'])) {
|
||||
if (isset($_GET['summaryRaw'])) {
|
||||
$data = array_merge($data, getSummaryData());
|
||||
}
|
||||
|
||||
if (isset($_GET['summary'])) {
|
||||
$sum = getSummaryData();
|
||||
$sum['ads_blocked_today'] = number_format( $sum['ads_blocked_today']);
|
||||
$sum['dns_queries_today'] = number_format( $sum['dns_queries_today']);
|
||||
$sum['ads_percentage_today'] = number_format( $sum['ads_percentage_today'], 1, '.', '');
|
||||
$sum['domains_being_blocked'] = number_format( $sum['domains_being_blocked']);
|
||||
$data = array_merge($data, $sum);
|
||||
}
|
||||
|
||||
if (isset($_GET['overTimeData'])) {
|
||||
$data = array_merge($data, getOverTimeData());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user