DATEI 1: public/runbook/runbook-tower-notfall.md (statisch, Anker #deadman/#spool/#deadletter/#health)
DATEI 2: /runbook-Route (Server Component, Mini-MD-Renderer, CSP-konform, force-static)
DATEI 3: runbookHints.ts (LAMP_HINTS/buildView/renderHintHtml 1:1 aus runbook_hints.py)
+ RunbookHint.tsx eingebunden an 4 Alarm-Flaechen:
- EscalationHistory (Deadman, Szenario A)
- TaskBrowser Spool-Tab (Szenario B) + Dead-Letter-Tab (B3)
- TaskBrowser/OpsPanels Degraded/Error (Health, Szenario C)
Keine Ampelfarben/Deadman-Logik/Degraded-Banner/Datenpfade angefasst (CHO-NICHT ANFASSEN erfuellt).
Build verifiziert: tsc --noEmit clean, next build gruen (/runbook static).
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
"use client"
|
|
|
|
/**
|
|
* RunbookHint.tsx — statischer Inline-Hint an den Alarm-Flaechen des Towers.
|
|
* Portierung der render_hint_html()-Semantik als React-Komponente
|
|
* (Karte tower-notfall-runbook, DATEI 3). Rein statisch: kein Polling,
|
|
* kein Egress, keine Secrets — nur interner Deep-Link auf /runbook#<anker>.
|
|
*/
|
|
|
|
import type { LampHint } from "@/app/lib/fleet/runbookHints"
|
|
|
|
export default function RunbookHint({ hint }: { hint: LampHint }) {
|
|
return (
|
|
<div
|
|
id={`hint-${hint.key}`}
|
|
className="lamp-hint text-xs leading-snug text-[var(--foreground-dim)]"
|
|
data-component={hint.component}
|
|
data-testid={`runbook-hint-${hint.key}`}
|
|
>
|
|
<span className="lh-title block font-semibold text-[var(--foreground)]">
|
|
Notfall {hint.scenario} — {hint.title}
|
|
</span>
|
|
<ol className="lh-steps my-0.5 ml-4 list-decimal">
|
|
{hint.kurzschritte.map((s: string) => (
|
|
<li key={s}>{s}</li>
|
|
))}
|
|
</ol>
|
|
<div className="lh-esc mt-0.5">
|
|
<strong>Eskalation:</strong> {hint.eskalation}
|
|
</div>
|
|
<a
|
|
className="lh-link text-[#93c5fd] underline hover:text-[#a5ccff]"
|
|
href={`/runbook${hint.anchor}`}
|
|
>
|
|
Vollständiges Runbook →
|
|
</a>
|
|
</div>
|
|
)
|
|
}
|