Files
html/api/wevia-enterprise.php
2026-04-12 22:57:03 +02:00

19 lines
1.0 KiB
PHP

<?php
header("Content-Type: application/json");
$action = $_GET["action"] ?? "list";
$modules = ["dashboard","strategy","financial","HR","pipeline","KPIs","evolution","deals","contacts","tasks"];
switch ($action) {
case "list": echo json_encode(["modules" => $modules, "count" => count($modules)]); break;
case "dashboard":
echo json_encode([
"routes" => intval(trim(shell_exec("grep -c '// Route' /var/www/html/api/weval-ia-fast.php 2>/dev/null"))),
"skills" => intval(trim(shell_exec("ls -d /opt/deer-flow/skills/weval/*/ 2>/dev/null | wc -l"))),
"wiki" => intval(trim(shell_exec("ls /opt/weval-l99/wiki/*.json 2>/dev/null | wc -l"))),
"apis" => intval(trim(shell_exec("ls /var/www/html/api/wevia-*.php 2>/dev/null | wc -l"))),
"docker" => intval(trim(shell_exec("docker ps | tail -n+2 | wc -l"))),
"crons" => intval(trim(shell_exec("ls /etc/cron.d/weval-* 2>/dev/null | wc -l"))),
]);
break;
default: echo json_encode(["modules" => $modules]);
}