Merge pull request #830 from pi-hole/new/cacheinfo

Add DNS cache information to Settings page
This commit is contained in:
Mark Drobnak
2018-08-30 16:07:21 -04:00
committed by GitHub
3 changed files with 65 additions and 0 deletions

View File

@@ -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']))