feat: GPU-Name und CUDA-Version, Auswertung als Seite, Engines-Seite überarbeitet (#1087, #1088, #1091)
- #1087: nvidia-smi liefert den Produktnamen; CUDA-Kompatibilitätsversion aus dem Kopf von nvidia-smi. - #1088: Seite /ui/auswertung mit Zeitraum und Gruppierung; Ladevorgänge in lade_log (Migration 0006, Schema-Änderung, ältere Versionen öffnen die Datenbank danach nicht mehr). - #1091: Engines-Seite mit Hinweis zur Anmeldung der Engine-Oberfläche; Startkommando nur für Admins. Statuszeile fehlt (wartet auf #1086), Link zur Engine-Oberfläche fehlt noch. Geprüft: cargo fmt --check, clippy -D warnings, cargo test --workspace (258 bestanden). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -10,11 +10,13 @@ use std::path::Path;
|
||||
use nexus_core::{Error, Result};
|
||||
use rusqlite::Connection;
|
||||
|
||||
mod auswertung;
|
||||
mod keys;
|
||||
mod logs;
|
||||
mod registry;
|
||||
mod users;
|
||||
|
||||
pub use auswertung::{RequestSummary, SummaryGroup};
|
||||
pub use keys::{ApiKeyRecord, RemoveKeyOutcome, Rights};
|
||||
pub use logs::{AuditRow, RequestLogEntry, RequestLogRow, RequestView};
|
||||
pub use registry::{ModelDetails, ModelEntry, NewLlm, RemoveOutcome, StartPlan};
|
||||
@ -27,6 +29,7 @@ const MIGRATIONS: &[&str] = &[
|
||||
include_str!("../migrations/0003_metrikproben.sql"),
|
||||
include_str!("../migrations/0004_scheduler.sql"),
|
||||
include_str!("../migrations/0005_benutzer.sql"),
|
||||
include_str!("../migrations/0006_auswertung.sql"),
|
||||
];
|
||||
|
||||
/// Schema-Version, die dieses Crate erzeugt.
|
||||
@ -181,6 +184,26 @@ mod tests {
|
||||
store.connection().last_insert_rowid()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn schema_5_migriert_und_behaelt_alte_anfragen_ohne_erfundene_ladezahlen() {
|
||||
let conn = Connection::open_in_memory().unwrap();
|
||||
for sql in &MIGRATIONS[..5] {
|
||||
conn.execute_batch(sql).unwrap();
|
||||
}
|
||||
conn.pragma_update(None, "user_version", 5).unwrap();
|
||||
conn.execute("INSERT INTO anfrage_log (zeit, korrelation, status) VALUES ('2026-11-16T10:00:00Z', 'alt', 200)", []).unwrap();
|
||||
let store = Store::prepare(conn).unwrap();
|
||||
assert_eq!(store.schema_version().unwrap(), LATEST_SCHEMA_VERSION);
|
||||
assert_eq!(store.recent_requests(10).unwrap().len(), 1);
|
||||
assert!(!store.load_recording_since().unwrap().is_empty());
|
||||
let count: i64 = store
|
||||
.connection()
|
||||
.query_row("SELECT COUNT(*) FROM lade_log", [], |r| r.get(0))
|
||||
.unwrap();
|
||||
assert_eq!(count, 0);
|
||||
store.integrity_check().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn neue_datenbank_hat_neueste_version() {
|
||||
let store = Store::open_in_memory().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user