mirror of
https://github.com/pi-hole/web.git
synced 2026-02-15 07:25:39 +00:00
Acknowledge possible custom time interval set by MAXLOGAGE in pihole-FTL.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
15
index.php
15
index.php
@@ -8,6 +8,19 @@
|
||||
$indexpage = true;
|
||||
require "scripts/pi-hole/php/header.php";
|
||||
require_once("scripts/pi-hole/php/gravity.php");
|
||||
|
||||
function getinterval()
|
||||
{
|
||||
global $piholeFTLConf;
|
||||
if(isset($piholeFTLConf["MAXLOGAGE"]))
|
||||
{
|
||||
return round(floatval($piholeFTLConf["MAXLOGAGE"]), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "24";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- Small boxes (Stat box) -->
|
||||
<div class="row">
|
||||
@@ -69,7 +82,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="box" id="queries-over-time">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Queries over last 24 hours</h3>
|
||||
<h3 class="box-title">Queries over last <?php echo getinterval(); ?> hours</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart">
|
||||
|
||||
@@ -152,6 +152,16 @@
|
||||
$FTLpid = intval(pidofFTL());
|
||||
$FTL = ($FTLpid !== 0 ? true : false);
|
||||
|
||||
$piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf";
|
||||
if(is_readable($piholeFTLConfFile))
|
||||
{
|
||||
$piholeFTLConf = parse_ini_file($piholeFTLConfFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
$piholeFTLConf = array();
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<!-- Pi-hole: A black hole for Internet advertisements
|
||||
|
||||
@@ -9,7 +9,6 @@ require "scripts/pi-hole/php/header.php";
|
||||
require "scripts/pi-hole/php/savesettings.php";
|
||||
// Reread ini file as things might have been changed
|
||||
$setupVars = parse_ini_file("/etc/pihole/setupVars.conf");
|
||||
$piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf";
|
||||
if(is_readable($piholeFTLConfFile))
|
||||
{
|
||||
$piholeFTLConf = parse_ini_file($piholeFTLConfFile);
|
||||
|
||||
Reference in New Issue
Block a user