Oberfläche nach Durchsicht: Kalender, Suchen, eigene Verwaltungsseiten, gemeinsame Gruppenkontingente

- Übersicht mit Anfragen diesen Monat; Aufzeichnungen mit Key-Name und Präfix
- Ollama-API zusätzlich unter /ollama; Endpunkte in der Oberfläche einheitlich
- Gruppen & Kontingente nur eigene; Alle Gruppen & Kontingente und Alle Keys
  für Administratoren, Keys meiner Kontingente für Lecturer, jeweils mit Suche
- Kontingentformular: Modelle alle oder ausgewählte (nach Schnittstelle, aus
  GET /omega/api/models), Wochentage zum Anklicken, Uhrzeit- und Datumsfelder,
  je Person oder für die Gruppe gemeinsam (Spalte quotas.shared)
- Auswahl beim Key-Anlegen zeigt, von wem ein Kontingent kommt
- Zeitplan als Wochenkalender wie in den Mockups
- Benutzer mit Suche und Ausblenden gesperrter Konten
- Audit-Log mit deutschen Bezeichnungen, verständlichen Details und Suche
- Gültigkeit um Mitternacht als "bis einschließlich"; start.sh wartet auf die Engines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Stephan RehfeldandClaude Opus 5.5 committed 2026-11-20 18:31:05 +01:00
1 parent d753fd9285
commit 11dbc1c781
18 files changed
+805 -164

No files matched your search

+34 -2
View File
@@ -40,6 +40,8 @@ pub fn router(state: AppState) -> Router {
let proxy = Router::new()
.route("/omega/status", get(status))
.route("/llamacpp/{*rest}", any(llamacpp))
.route("/ollama", any(ollama_prefixed))
.route("/ollama/{*rest}", any(ollama_prefixed))
.route("/vllm/{*rest}", any(vllm))
.fallback(ollama)
.layer(middleware::from_fn_with_state(state.clone(), auth));
@@ -73,7 +75,9 @@ pub fn engine_error(engine: Engine, status: StatusCode, message: &str) -> Respon
async fn auth(State(st): State<AppState>, mut req: Request, next: Next) -> Response {
// Ollama-Clients prüfen mit "/" und /api/version, ob der Server läuft.
let path = req.uri().path();
if matches!(*req.method(), Method::GET | Method::HEAD) && (path == "/" || path == "/api/version") {
if matches!(*req.method(), Method::GET | Method::HEAD)
&& matches!(path, "/" | "/api/version" | "/ollama" | "/ollama/" | "/ollama/api/version")
{
return next.run(req).await;
}
@@ -159,6 +163,34 @@ async fn ollama(
{
return axum::response::Redirect::temporary("/omega/").into_response();
}
ollama_at(st, caller, method, path, uri.query(), headers, body).await
}
/// Die Ollama-API unter /ollama, wie llama.cpp und vLLM unter ihren Pfaden. An der Wurzel bleibt
/// sie für bestehende Anwendungen erhalten.
async fn ollama_prefixed(
State(st): State<AppState>,
caller: Option<Extension<Caller>>,
method: Method,
uri: Uri,
headers: HeaderMap,
body: Bytes,
) -> Response {
let rest = uri.path().strip_prefix("/ollama").unwrap_or("");
let path = if rest.is_empty() { "/".to_string() } else { rest.to_string() };
ollama_at(st, caller, method, path, uri.query(), headers, body).await
}
#[allow(clippy::too_many_arguments)]
async fn ollama_at(
st: AppState,
caller: Option<Extension<Caller>>,
method: Method,
path: String,
query: Option<&str>,
headers: HeaderMap,
body: Bytes,
) -> Response {
if path.starts_with("/api/blobs")
|| matches!(path.as_str(), "/api/pull" | "/api/push" | "/api/delete" | "/api/copy" | "/api/create")
{
@@ -176,7 +208,7 @@ async fn ollama(
_ => {}
}
}
handle(st, caller.map(|c| c.0), Engine::Ollama, path, uri.query(), method, headers, body).await
handle(st, caller.map(|c| c.0), Engine::Ollama, path, query, method, headers, body).await
}
async fn llamacpp(