add health check

This commit is contained in:
team 1
2026-02-18 10:26:44 +01:00
parent b1e1fe082e
commit 9aa2bbcda4
7 changed files with 323 additions and 108 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Controller\Admin;
use App\Index\IndexMetaManager;
use App\Ingest\IngestFlow;
use App\Vector\VectorIndexHealthService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
@@ -12,13 +13,15 @@ use Symfony\Component\Routing\Attribute\Route;
final class DashboardController extends AbstractController
{
#[Route('/admin', name: 'admin_dashboard')]
public function index(): Response
public function index(VectorIndexHealthService $health): Response
{
return $this->render('admin/dashboard/index.html.twig');
return $this->render('admin/dashboard/index.html.twig', [
'vectorHealth' => $health->check()
]);
}
#[Route('/admin/dashboard', name: 'admin_dashboard')]
public function dashboard(IndexMetaManager $metaManager): Response
public function dashboard(IndexMetaManager $metaManager,VectorIndexHealthService $health): Response
{
$chunkCount = $metaManager->getRuntimeChunkCount();
$limit = IngestFlow::CHUNK_LIMIT_HARD;
@@ -26,6 +29,7 @@ final class DashboardController extends AbstractController
return $this->render('admin/dashboard/index.html.twig', [
'chunkCount' => $chunkCount,
'chunkLimit' => $limit,
'vectorHealth' => $health->check(),
]);
}
}