mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-05 04:13:09 -04:00
20 lines
606 B
PHP
20 lines
606 B
PHP
<?php
|
|
|
|
if (!$Viewer->permitted('site_analysis')) {
|
|
error(403);
|
|
}
|
|
|
|
$keys = array_filter($Cache->getAllKeys(), function ($key) { return strpos($key, 'analysis_') === 0; });
|
|
$items = array_map(function($key) {
|
|
global $Cache;
|
|
$value = $Cache->get_value($key);
|
|
$value['time'] = date('Y-m-d H:i:s', $value['time'] ?? 0);
|
|
$value['key'] = substr($key, strlen('analysis_'));
|
|
return $value;
|
|
}, $keys);
|
|
usort($items, function ($a, $b) { return $a['time'] > $b['time'] ? -1 : ($a['time'] === $b['time'] ? 0 : 1); });
|
|
|
|
echo $Twig->render('admin/error-analysis.twig', [
|
|
'list' => $items,
|
|
]);
|