fix(ui): breite Tabellen der Übersicht scrollen in der Karte, Leistung ohne Warnfarbe, Testhilfe gegen 'Text file busy' (#1197)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg7qE8FdhchzsBrwgjZ
This commit is contained in:
@ -1087,6 +1087,16 @@ mod gpu_tests {
|
||||
let pfad = dir.join("nvidia-smi");
|
||||
std::fs::write(&pfad, format!("#!/bin/sh\n{inhalt}\n")).unwrap();
|
||||
std::fs::set_permissions(&pfad, std::fs::Permissions::from_mode(0o755)).unwrap();
|
||||
// Frisch geschriebene Programme können kurz „Text file busy“ (26) melden, wenn ein
|
||||
// anderer Test-Thread gleichzeitig einen Prozess startet; erst warten, bis es läuft.
|
||||
for _ in 0..100 {
|
||||
match std::process::Command::new(&pfad).arg("--probe").output() {
|
||||
Err(e) if e.raw_os_error() == Some(26) => {
|
||||
std::thread::sleep(std::time::Duration::from_millis(20))
|
||||
}
|
||||
_ => break,
|
||||
}
|
||||
}
|
||||
pfad
|
||||
}
|
||||
|
||||
|
||||
@ -1200,6 +1200,7 @@ td.zeit{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);
|
||||
.kacheln span{display:block;font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
|
||||
.kacheln b{display:block;font-size:1.6rem;line-height:1.2;font-variant-numeric:tabular-nums;margin-top:.15rem}
|
||||
.speicher{display:flex;align-items:center;gap:.7rem;font-variant-numeric:tabular-nums;white-space:nowrap}
|
||||
.card h3{margin:1rem 0 .4rem}
|
||||
.ueb-kopf{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}
|
||||
.ueb-gruende{flex-basis:100%;margin:.4rem 0 0;padding-left:1.1rem;color:var(--muted)}
|
||||
.dq{display:block;font-size:.72rem;color:var(--muted)}
|
||||
|
||||
@ -118,7 +118,7 @@ fn engine_tabelle(statuses: &[EngineStatus]) -> String {
|
||||
})
|
||||
.collect();
|
||||
format!(
|
||||
"<table><thead><tr><th>Engine</th><th>Zustand</th></tr></thead><tbody>{rows}</tbody></table>"
|
||||
"<div class=\"breit\"><table><thead><tr><th>Engine</th><th>Zustand</th></tr></thead><tbody>{rows}</tbody></table></div>"
|
||||
)
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ pub(super) async fn html(state: &AppState) -> String {
|
||||
}),
|
||||
kachel("GPU-Leistung", &leistung_wert, {
|
||||
let text = if summe.as_ref().is_some_and(|s| s.leistung_w.is_none()) {
|
||||
("dq-fehlt", "nicht von jeder Karte geliefert".to_string())
|
||||
("dq-ok", "nicht von jeder Karte geliefert".to_string())
|
||||
} else {
|
||||
let (k, t) = qualitaet(gpu_alter, intervall, gpu_fehler);
|
||||
(k, t)
|
||||
@ -326,7 +326,7 @@ pub(super) async fn html(state: &AppState) -> String {
|
||||
.collect::<String>();
|
||||
let host_html = if !host_zeilen.is_empty() {
|
||||
format!(
|
||||
"<table><thead><tr><th>Host</th><th>Auslastung</th></tr></thead><tbody>{host_zeilen}</tbody></table>"
|
||||
"<div class=\"breit\"><table><thead><tr><th>Host</th><th>Auslastung</th></tr></thead><tbody>{host_zeilen}</tbody></table></div>"
|
||||
)
|
||||
} else if let Some(f) = host_fehler {
|
||||
format!(
|
||||
@ -339,7 +339,7 @@ pub(super) async fn html(state: &AppState) -> String {
|
||||
let gpu_html = if gpus.is_empty() {
|
||||
gpu_leer(&gpu_status, intervall)
|
||||
} else {
|
||||
gpu_table(&gpus)
|
||||
format!("<div class=\"breit\">{}</div>", gpu_table(&gpus))
|
||||
};
|
||||
|
||||
// Modelle und Ladephasen wie bisher.
|
||||
@ -400,7 +400,7 @@ pub(super) async fn html(state: &AppState) -> String {
|
||||
<p class=\"klein\">CPU und RAM: Sicht des Rechners (/proc). Zähler und Stundenfenster seit dem Start des Gateways (maximal letzte Stunde). Stand {now} UTC, wird alle 5 s erneuert.</p>",
|
||||
kopf = kopf(&gesundheit, &node, &nexus_core::now_iso8601()),
|
||||
engines = engine_tabelle(&statuses),
|
||||
inst = instance_table(&instances),
|
||||
inst = format!("<div class=\"breit\">{}</div>", instance_table(&instances)),
|
||||
uptime = uptime(state.started.elapsed().as_secs()),
|
||||
req = t.requests,
|
||||
waiting = t.waiting,
|
||||
|
||||
Reference in New Issue
Block a user