Files
html/api/v79-vault-stats.php
OpusWIRE b21260fb13
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
V79 DG formatK + Vault Wrapper + CRM validated Doctrine 4+14+65 - User screenshots 3 fixes DG 8500 format Vault -KB bug CRM drill-down 52eme session - V79 ROOT CAUSES 1 DG conversion_funnel count 8500 rendered raw no K/M format 2 Vault wevia-vault.php returns total_bytes but vault-manager.html reads d.bytes -> NaN display -KB 3 CRM already well-structured - V79 LIVRABLES 1 DG dg-command-center.html patched formatK(n) helper injected + count renderings auto K/M suffix 8500 -> 8.5K + GOLD V79 backup 2 NOUVEAU api v79-vault-stats.php wrapper immutable bypass adds bytes size size_kb size_human aliases wevia-vault.php chattr +i locked by parallel Claude doctrine 14 honest pas force 3 vault-manager.html also chattr +i - wrapper URL accessible directly returns real 311290 bytes = 304 KB 180 notes 11 dirs live 4 CRM validated Deal Tracker + Contacts + Pipeline tabs + source badges already doctrine 65 drill-down satisfied 5 WIRE 5 intents v79_vault_size_fixed v79_dg_format_k v79_crm_drill_down_ok v79_3_fixes_dashboards v79_vault_wrapper chat 4/4 PASS real wevia-autonomous 6 V79 vault link added to WTP V55-V63 section additif doctrine 14 - Doctrine 4 HONNETE 2/3 fixes deployables DG + wrapper 1/3 blocked chattr +i vault-manager.html je documente pas force - NR 153/153 CONSTANT 52eme session doctrine 16 - 1 api wrapper + 1 html patch + 2 GOLD + 5 intents + session + wiki + plan 11 crees 0 ecrases doctrine 14 [Opus WIRE V79]
2026-04-20 03:14:51 +02:00

30 lines
1.0 KiB
PHP

<?php
// V79 Vault Stats Wrapper - adds bytes/size/size_kb aliases without touching immutable wevia-vault.php
// Doctrine #14: enrichissement additif zero ecrasement
header('Content-Type: application/json');
$action = $_GET['action'] ?? 'stats';
$ch = curl_init("http://127.0.0.1/api/wevia-vault.php?action=" . urlencode($action));
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5, CURLOPT_SSL_VERIFYPEER => false]);
$body = curl_exec($ch);
curl_close($ch);
$d = @json_decode($body, true);
if (!is_array($d)) {
echo json_encode(['error' => 'upstream error', 'raw' => substr($body, 0, 200)]);
exit;
}
// Add aliases if action=stats
if ($action === 'stats' && isset($d['total_bytes'])) {
$b = (int)$d['total_bytes'];
$d['bytes'] = $b;
$d['size'] = $b;
$d['size_kb'] = round($b / 1024);
$d['size_mb'] = round($b / 1024 / 1024, 2);
$d['size_human'] = $b >= 1048576 ? round($b/1048576,1) . ' MB' : round($b/1024) . ' KB';
$d['_v79_wrapper'] = true;
}
echo json_encode($d);