41 lines
1.5 KiB
PHP
41 lines
1.5 KiB
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
$r = [];
|
|
|
|
// L99 results
|
|
$results = @json_decode(@file_get_contents('/var/www/html/api/l99-results.json'), true) ?: [];
|
|
$r['pass'] = $results['pass'] ?? null;
|
|
$r['fail'] = $results['fail'] ?? null;
|
|
$r['total'] = $results['total'] ?? null;
|
|
$r['score'] = $results['score'] ?? null;
|
|
$r['timestamp'] = $results['timestamp'] ?? null;
|
|
|
|
// Page health
|
|
$pages = @json_decode(@file_get_contents('/var/www/html/api/wevia-page-scan.json'), true) ?: [];
|
|
$r['page_scan'] = $pages;
|
|
|
|
// Screenshots
|
|
$r['screenshots'] = count(glob('/opt/weval-l99/screenshots/*.png'));
|
|
$r['videos'] = count(glob('/opt/weval-l99/videos/*.webm'));
|
|
|
|
// NonReg
|
|
$nr = @json_decode(@file_get_contents('/var/www/html/api/l99-results.json'), true) ?: [];
|
|
$r['nonreg'] = ['pass' => $nr['pass'] ?? 0, 'total' => ($nr['pass']??0)+($nr['fail']??0)];
|
|
|
|
// L99 modules
|
|
$r['modules'] = [
|
|
'l99_saas' => file_exists('/var/www/html/l99-saas.html'),
|
|
'l99_classic' => file_exists('/var/www/html/l99.html'),
|
|
'l99_brain' => file_exists('/var/www/html/l99-brain.html'),
|
|
'l99_fullscreen' => file_exists('/var/www/html/l99-fullscreen.html'),
|
|
'sovereign_claude' => file_exists('/var/www/html/sovereign-claude.html'),
|
|
'page_scanner' => file_exists('/opt/weval-l99/wevia-page-scan.sh'),
|
|
'purge_scan' => file_exists('/opt/weval-l99/l99-purge-scan.sh'),
|
|
];
|
|
|
|
// Crons
|
|
$crons = shell_exec('crontab -l 2>/dev/null | grep l99 | wc -l');
|
|
$r['l99_crons'] = intval(trim($crons));
|
|
|
|
echo json_encode($r, JSON_PRETTY_PRINT);
|