new server info panel

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2026-03-18 15:37:57 +01:00
parent c187aa706a
commit fb2f9ea650
11 changed files with 139 additions and 43 deletions
+2 -2
View File
@@ -24,9 +24,9 @@ async function authFetch(url, options = {}) {
let res;
try {
res = await fetch(url, options);
if (!res.ok) error('fetch', { status: res.status, url, user, token });
if (!res.ok) error('fetch', { status: res?.status || 503, url, user, token });
} catch (err) {
error('fetch', { status: res.status, url, user, token, error: err });
error('fetch', { status: res?.status || 503, url, user, token, error: err });
}
return res;
}
+1 -1
View File
@@ -30,7 +30,7 @@ async function updateGPU() {
const gpuEl = document.getElementById('gpu');
const gpuTable = document.getElementById('gpu-table');
try {
const res = await authFetch(`${window.api}/gpu`);
const res = await authFetch(`${window.api}/gpu-smi`);
if (!res.ok) {
clearInterval(gpuInterval);
gpuEl.style.display = 'none';