refactor: massive UX and beginner refactoring (Cookbook, Dashboard, Layout, Wording)
This commit is contained in:
+8
-3
@@ -25,14 +25,19 @@ function applyStatus(s) {
|
||||
dot.className = "dot off";
|
||||
label.textContent = "Backend nicht erreichbar";
|
||||
$("#top-models").textContent = "–";
|
||||
showAlert("Backend nicht erreichbar — läuft uvicorn?", false);
|
||||
$("#top-active").textContent = "–";
|
||||
showAlert("Backend nicht erreichbar – läuft uvicorn?", false);
|
||||
} else {
|
||||
const host = s.swap_url.replace(/^https?:\/\//, "");
|
||||
dot.className = "dot " + (s.swap_ok ? "on" : "off");
|
||||
label.textContent = (s.swap_ok ? "llama-swap online · " : "llama-swap offline · ") + host;
|
||||
label.textContent = (s.swap_ok ? "LLM-Engine: Online – " : "LLM-Engine: Offline – ") + host;
|
||||
$("#top-models").textContent = (s.models || []).length;
|
||||
|
||||
const active = (s.models || []).find(m => m.state === "running");
|
||||
$("#top-active").textContent = active ? active.name : "–";
|
||||
|
||||
if (s.swap_ok) hideAlert();
|
||||
else showAlert(`llama-swap nicht erreichbar unter <b>${host}</b> — läuft der Dienst?`, true);
|
||||
else showAlert(`LLM-Engine nicht erreichbar unter <b>${host}</b> – läuft der llama-swap Dienst?`, true);
|
||||
}
|
||||
for (const p of panels) p.onStatus?.(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user