From 7b9fc41146dea79319128c77844eea0836f89930 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Fri, 12 Sep 2025 15:54:24 +0100 Subject: [PATCH] ui: display cloud connection status --- .../src/app/dashboard/InstanceDatasetsAccordion.tsx | 6 ++++++ cognee-frontend/src/utils/fetch.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx b/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx index cfb0db2e8..e35ebaa75 100644 --- a/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx +++ b/cognee-frontend/src/app/dashboard/InstanceDatasetsAccordion.tsx @@ -35,7 +35,13 @@ export default function InstanceDatasetsAccordion({ onDatasetsChange }: Instance .then(setLocalCogneeConnected) }; + const checkConnectionToCloudCognee = () => { + fetch.checkCloudHealth() + .then(setCloudCogneeConnected) + }; + checkConnectionToLocalCognee(); + checkConnectionToCloudCognee(); }, [checkConnectionToCloudCognee, setCloudCogneeConnected, setLocalCogneeConnected]); const { diff --git a/cognee-frontend/src/utils/fetch.ts b/cognee-frontend/src/utils/fetch.ts index 9d3d24ebd..1cda2ca48 100644 --- a/cognee-frontend/src/utils/fetch.ts +++ b/cognee-frontend/src/utils/fetch.ts @@ -68,6 +68,10 @@ fetch.checkHealth = () => { return global.fetch(`${backendApiUrl.replace("/api", "")}/health`); }; +fetch.checkCloudHealth = () => { + return global.fetch(`${cloudApiUrl.replace("/api", "")}/health/cloud`); +}; + fetch.setApiKey = (newApiKey: string) => { apiKey = newApiKey; };