Includes core prod + GREEN/BLUE subsystems: - prod/ (BLUE harness, configs, scripts, docs) - nautilus_dolphin/ (GREEN Nautilus-native impl + dvae/ preserved) - adaptive_exit/ (AEM engine + models/bucket_assignments.pkl) - Observability/ (EsoF advisor, TUI, dashboards) - external_factors/ (EsoF producer) - mc_forewarning_qlabs_fork/ (MC regime/envelope) Excludes runtime caches, logs, backups, and reproducible artifacts per .gitignore.
64 lines
1.9 KiB
Python
Executable File
64 lines
1.9 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Minimal Textual proof-of-concept.
|
|
Run: python3 textual_poc.py
|
|
Press q to quit.
|
|
"""
|
|
from textual.app import App, ComposeResult
|
|
from textual.widgets import Static, Header, Footer
|
|
from textual.containers import Horizontal
|
|
import time
|
|
|
|
|
|
class Box(Static):
|
|
def on_mount(self) -> None:
|
|
self.update(self.id or "box")
|
|
|
|
|
|
class PocApp(App):
|
|
CSS = """
|
|
Screen { background: #111; }
|
|
Box {
|
|
border: solid green;
|
|
height: 8;
|
|
content-align: center middle;
|
|
color: white;
|
|
}
|
|
#clock { border: solid cyan; height: 3; }
|
|
"""
|
|
|
|
BINDINGS = [("q", "quit", "Quit")]
|
|
|
|
def compose(self) -> ComposeResult:
|
|
yield Static(id="clock")
|
|
with Horizontal():
|
|
yield Box("PANEL A\nstatic text", id="panel_a")
|
|
yield Box("PANEL B\nstatic text", id="panel_b")
|
|
yield Box("PANEL C\nstatic text", id="panel_c")
|
|
yield Static("[green]q=quit[/green] | Textual POC running OK")
|
|
|
|
def on_mount(self) -> None:
|
|
self.set_interval(1, self._tick)
|
|
self._tick()
|
|
|
|
def _tick(self) -> None:
|
|
t = time.strftime("%Y-%m-%d %H:%M:%S UTC", time.gmtime())
|
|
self.query_one("#clock", Static).update(
|
|
f"[bold cyan]🐬 DOLPHIN TUI POC[/bold cyan] | {t} | Textual is working"
|
|
)
|
|
# Update panels with incrementing counter
|
|
n = int(time.time()) % 100
|
|
self.query_one("#panel_a", Box).update(
|
|
f"[green]PANEL A[/green]\nvalue = {n}\nstatus = OK"
|
|
)
|
|
self.query_one("#panel_b", Box).update(
|
|
f"[yellow]PANEL B[/yellow]\nvalue = {n*2}\nstatus = WARN"
|
|
)
|
|
self.query_one("#panel_c", Box).update(
|
|
f"[red]PANEL C[/red]\nvalue = {n*3}\nstatus = CRIT"
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
PocApp().run()
|