mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Add new api.php?getCacheInfo callback
Signed-off-by: DL6ER <dl6er@dl6er.de>
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();
|
||||
$querytypes = array();
|
||||
foreach($return as $ret)
|
||||
{
|
||||
$tmp = explode(": ",$ret);
|
||||
$querytypes[$tmp[0]] = floatval($tmp[1]);
|
||||
}
|
||||
|
||||
$result = array('cacheinfo' => $querytypes);
|
||||
$data = array_merge($data, $result);
|
||||
}
|
||||
|
||||
if (isset($_GET['getAllQueries']) && $auth)
|
||||
{
|
||||
if(isset($_GET['from']) && isset($_GET['until']))
|
||||
|
||||
Reference in New Issue
Block a user