mirror of
https://github.com/pi-hole/web.git
synced 2026-04-28 04:33:58 +01:00
Merge pull request #830 from pi-hole/new/cacheinfo
Add DNS cache information to Settings page
This commit is contained in:
15
api_FTL.php
15
api_FTL.php
@@ -245,6 +245,21 @@ else
|
||||
$data = array_merge($data, $result);
|
||||
}
|
||||
|
||||
if (isset($_GET['getCacheInfo']) && $auth)
|
||||
{
|
||||
sendRequestFTL("cacheinfo");
|
||||
$return = getResponseFTL();
|
||||
$cacheinfo = array();
|
||||
foreach($return as $ret)
|
||||
{
|
||||
$tmp = explode(": ",$ret);
|
||||
$cacheinfo[$tmp[0]] = floatval($tmp[1]);
|
||||
}
|
||||
|
||||
$result = array('cacheinfo' => $cacheinfo);
|
||||
$data = array_merge($data, $result);
|
||||
}
|
||||
|
||||
if (isset($_GET['getAllQueries']) && $auth)
|
||||
{
|
||||
if(isset($_GET['from']) && isset($_GET['until']))
|
||||
|
||||
Reference in New Issue
Block a user