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; };