better_launch.tui.better_tui module

class better_launch.tui.better_tui.AppMode(*values)

Bases: IntEnum

States of our TUI. The TUI decides what to display based on the active state.

CONFIRM_EXIT = 2
CONFIRM_NODE_KILL = 9
CONFIRM_NODE_RESTART = 8
CONFIRM_NODE_TAKEOVER = 7
LOG_LEVEL = 10
NODE_INFO = 5
NODE_LIFECYCLE = 6
NODE_LOG_LEVEL = 11
NODE_MENU = 4
SEARCH_NODE = 3
STANDARD = 1
class better_launch.tui.better_tui.BetterTui(launch_func: Callable[[], None], *, manage_foreign_nodes: bool = False, keep_alive: bool = False, color_depth: Literal[1, 4, 8, 24] = 8)

Bases: object

footer_menu: FooterMenu
footer_text: str
footer_window: prompt_toolkit.layout.containers.Window
nodes_snapshot: list[AbstractNode]
quit(reason: str) None

Shutdown better_launch if it is still running, then exit the TUI.

Parameters

reasonstr

A reason for the shutdown that will be shown to the user.

run()

Initialize the TUI app, then run the launch function before starting the TUI.

search_buffer: prompt_toolkit.buffer.Buffer
search_field: prompt_toolkit.widgets.TextArea
selected_node: AbstractNode
title: prompt_toolkit.layout.controls.FormattedTextControl
class better_launch.tui.better_tui.LogLevel(name: str, level: int, style: str)

Bases: object

level: int
name: str
style: str
class better_launch.tui.better_tui.NodeLogFilter(name: str = '')

Bases: Filter

clear() None
filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

hermit: str
mute(node: str) None
muted: set[str]
set_hermit(node: str) None
unmute(node: str) None