add health check
This commit is contained in:
@@ -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(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user