mirror of
https://github.com/Jeuners/Logpy-AgentOne.git
synced 2026-09-09 15:02:33 +02:00
feat: aktives Branchen-Profil im Leitstand/Dashboard sichtbar machen
Welches Profil (PROFIL) gerade aktiv ist, stand bisher nur in der .env - im laufenden Leitstand war es unsichtbar, obwohl Kategorien und Ansage sich je nach Profil komplett unterscheiden (Praxis vs. Aufzug-Notdienst). kategorien.json bekommt ein "profil_name"-Feld (Anzeigename), neues kategorien.PROFIL_NAME laedt es. Browsertab-Titel und Header-Untertitel im Leitstand sowie Titel/Ueberschrift im Dashboard-Export zeigen es jetzt an. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbdWYnDtyMgxsq4eN1WnrQ
This commit is contained in:
parent
8e54a58f13
commit
8621691054
5 changed files with 12 additions and 5 deletions
|
|
@ -61,7 +61,7 @@ def baue(ausgabe: Path) -> Path:
|
|||
karten = "\n".join(_karte(d) for d in anrufe)
|
||||
doc = f"""<!doctype html><html lang="de"><head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Anruf-Übersicht</title>
|
||||
<title>Anruf-Übersicht · {html.escape(kategorien.PROFIL_NAME)}</title>
|
||||
<style>
|
||||
:root{{--bg:#f6f7f9;--fg:#1a2230;--karte:#fff;--rand:#e4e8ee;--muted:#6b7688}}
|
||||
@media(prefers-color-scheme:dark){{:root{{--bg:#12151b;--fg:#e7ecf3;--karte:#1b2029;--rand:#2a313d;--muted:#93a0b4}}}}
|
||||
|
|
@ -82,7 +82,7 @@ padding:1px 7px;font-size:12px;color:var(--muted);margin:2px 4px 2px 0}}
|
|||
details{{margin-top:6px}}summary{{cursor:pointer;color:var(--muted);font-size:13px}}
|
||||
.tr{{color:var(--muted);font-size:13px;margin:6px 0 0}}
|
||||
</style></head><body><div class="wrap">
|
||||
<h1>Anruf-Übersicht</h1>
|
||||
<h1>Anruf-Übersicht · {html.escape(kategorien.PROFIL_NAME)}</h1>
|
||||
<p class="sub">{len(anrufe)} Anrufe · {zusammenfassung or '—'} · lokal erzeugt aus der Ablage</p>
|
||||
{karten}
|
||||
</div></body></html>"""
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ def _daten() -> dict:
|
|||
|
||||
KATEGORIEN = _daten()["kategorien"]
|
||||
KATEGORIE_LABEL = _daten().get("kategorie_labels", {})
|
||||
# Anzeigename des aktiven Profils (Leitstand-Header, Dashboard) - Fallback auf
|
||||
# den rohen Ordnernamen, falls ein Profil das Feld nicht setzt.
|
||||
PROFIL_NAME = _daten().get("profil_name", config.PROFIL)
|
||||
# Kategorie, auf die das deterministische Sicherheitsnetz eskaliert (siehe
|
||||
# categorize._notfall_sicherheitsnetz) - bei "praxis" ist das "notfall", bei
|
||||
# anderen Profilen ggf. ein anderer Name (z. B. "eingeschlossen").
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue