ui: display cloud connection status

This commit is contained in:
Daulet Amirkhanov 2025-09-12 15:54:24 +01:00
parent 8012d3071f
commit 7b9fc41146
2 changed files with 10 additions and 0 deletions

View file

@ -35,7 +35,13 @@ export default function InstanceDatasetsAccordion({ onDatasetsChange }: Instance
.then(setLocalCogneeConnected)
};
const checkConnectionToCloudCognee = () => {
fetch.checkCloudHealth()
.then(setCloudCogneeConnected)
};
checkConnectionToLocalCognee();
checkConnectionToCloudCognee();
}, [checkConnectionToCloudCognee, setCloudCogneeConnected, setLocalCogneeConnected]);
const {

View file

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