ui: display cloud connection status
This commit is contained in:
parent
8012d3071f
commit
7b9fc41146
2 changed files with 10 additions and 0 deletions
|
|
@ -35,7 +35,13 @@ export default function InstanceDatasetsAccordion({ onDatasetsChange }: Instance
|
|||
.then(setLocalCogneeConnected)
|
||||
};
|
||||
|
||||
const checkConnectionToCloudCognee = () => {
|
||||
fetch.checkCloudHealth()
|
||||
.then(setCloudCogneeConnected)
|
||||
};
|
||||
|
||||
checkConnectionToLocalCognee();
|
||||
checkConnectionToCloudCognee();
|
||||
}, [checkConnectionToCloudCognee, setCloudCogneeConnected, setLocalCogneeConnected]);
|
||||
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue