mirror of
https://github.com/immich-app/immich.git
synced 2024-12-31 11:32:55 +02:00
Merge branch 'main' of github.com:immich-app/immich
This commit is contained in:
commit
1f25df308a
@ -10,6 +10,7 @@
|
|||||||
let isServerOk = true;
|
let isServerOk = true;
|
||||||
let serverVersion = '';
|
let serverVersion = '';
|
||||||
let serverInfo: ServerInfoResponseDto;
|
let serverInfo: ServerInfoResponseDto;
|
||||||
|
let pingServerInterval: NodeJS.Timer;
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
try {
|
try {
|
||||||
@ -24,23 +25,23 @@
|
|||||||
console.log('Error [StatusBox] [onMount]');
|
console.log('Error [StatusBox] [onMount]');
|
||||||
isServerOk = false;
|
isServerOk = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pingServerInterval = setInterval(async () => {
|
||||||
|
try {
|
||||||
|
const { data: pingReponse } = await api.serverInfoApi.pingServer();
|
||||||
|
|
||||||
|
if (pingReponse.res === 'pong') isServerOk = true;
|
||||||
|
else isServerOk = false;
|
||||||
|
|
||||||
|
const { data: serverInfoRes } = await api.serverInfoApi.getServerInfo();
|
||||||
|
serverInfo = serverInfoRes;
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Error [StatusBox] [pingServerInterval]', e);
|
||||||
|
isServerOk = false;
|
||||||
|
}
|
||||||
|
}, 10000);
|
||||||
});
|
});
|
||||||
|
|
||||||
const pingServerInterval = setInterval(async () => {
|
|
||||||
try {
|
|
||||||
const { data: pingReponse } = await api.serverInfoApi.pingServer();
|
|
||||||
|
|
||||||
if (pingReponse.res === 'pong') isServerOk = true;
|
|
||||||
else isServerOk = false;
|
|
||||||
|
|
||||||
const { data: serverInfoRes } = await api.serverInfoApi.getServerInfo();
|
|
||||||
serverInfo = serverInfoRes;
|
|
||||||
} catch (e) {
|
|
||||||
console.log('Error [StatusBox] [pingServerInterval]', e);
|
|
||||||
isServerOk = false;
|
|
||||||
}
|
|
||||||
}, 10000);
|
|
||||||
|
|
||||||
onDestroy(() => clearInterval(pingServerInterval));
|
onDestroy(() => clearInterval(pingServerInterval));
|
||||||
|
|
||||||
const getStorageUsagePercentage = () => {
|
const getStorageUsagePercentage = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user