mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 12:15:00 +01:00
Retreives maxlogage calling api_FTL.php
FTL defines MAXLOGAGE value. PHP retrieves the value and converts seconds to hours Javascript calls the API to update the value. Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
This commit is contained in:
10
api_FTL.php
10
api_FTL.php
@@ -61,6 +61,16 @@ else
|
||||
$data = array_merge($data,$stats);
|
||||
}
|
||||
|
||||
if (isset($_GET["getMaxlogage"]) && $auth) {
|
||||
sendRequestFTL("maxlogage");
|
||||
// Convert seconds to hours and rounds to one decimal place.
|
||||
$ret = round(intval(getResponseFTL()[0]) / 3600, 1);
|
||||
// Return 24h if value is 0, empty, null or non numeric.
|
||||
$ret = $ret ?: 24;
|
||||
|
||||
$data = array_merge($data, array("maxlogage" => $ret));
|
||||
}
|
||||
|
||||
if (isset($_GET['overTimeData10mins']))
|
||||
{
|
||||
sendRequestFTL("overTime");
|
||||
|
||||
Reference in New Issue
Block a user