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)
|
.then(setLocalCogneeConnected)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const checkConnectionToCloudCognee = () => {
|
||||||
|
fetch.checkCloudHealth()
|
||||||
|
.then(setCloudCogneeConnected)
|
||||||
|
};
|
||||||
|
|
||||||
checkConnectionToLocalCognee();
|
checkConnectionToLocalCognee();
|
||||||
|
checkConnectionToCloudCognee();
|
||||||
}, [checkConnectionToCloudCognee, setCloudCogneeConnected, setLocalCogneeConnected]);
|
}, [checkConnectionToCloudCognee, setCloudCogneeConnected, setLocalCogneeConnected]);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@ fetch.checkHealth = () => {
|
||||||
return global.fetch(`${backendApiUrl.replace("/api", "")}/health`);
|
return global.fetch(`${backendApiUrl.replace("/api", "")}/health`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fetch.checkCloudHealth = () => {
|
||||||
|
return global.fetch(`${cloudApiUrl.replace("/api", "")}/health/cloud`);
|
||||||
|
};
|
||||||
|
|
||||||
fetch.setApiKey = (newApiKey: string) => {
|
fetch.setApiKey = (newApiKey: string) => {
|
||||||
apiKey = newApiKey;
|
apiKey = newApiKey;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue