Skip to content

header

header

System summary header bar for the Marianne Monitor TUI.

Displays conductor status, memory bar, CPU bar, GPU indicator, pressure level, and job/sheet counts in a compact single-line format.

Classes

HeaderPanel

HeaderPanel(*, name=None, id=None, classes=None)

Bases: Static

Renders the system summary header with Rich markup.

Layout matches the htop style: Conductor: UP 2h15m CPU [|||| ] 12.0% Mem [|||||||| ] 45.0% Pressure: LOW Jobs: 2 Sheets: 3 active

Source code in src/marianne/tui/panels/header.py
def __init__(
    self,
    *,
    name: str | None = None,
    id: str | None = None,
    classes: str | None = None,
) -> None:
    super().__init__(name=name, id=id, classes=classes)
    self._snapshot: SystemSnapshot | None = None
    self._conductor_up: bool = False
    self._uptime_seconds: float = 0.0
    self._anomaly_count: int = 0
Functions
update_data
update_data(snapshot, conductor_up=False, uptime_seconds=0.0, anomaly_count=0)

Update the header with new snapshot data and refresh display.

Source code in src/marianne/tui/panels/header.py
def update_data(
    self,
    snapshot: SystemSnapshot | None,
    conductor_up: bool = False,
    uptime_seconds: float = 0.0,
    anomaly_count: int = 0,
) -> None:
    """Update the header with new snapshot data and refresh display."""
    self._snapshot = snapshot
    self._conductor_up = conductor_up
    self._uptime_seconds = uptime_seconds
    self._anomaly_count = anomaly_count
    self._render_header()