UI Modules
Display Module
User interface rendering management.
- class sshmenuc.ui.display.MenuDisplay[source]
Bases:
objectManages menu display and rendering.
- print_breadcrumb(breadcrumb: str) → None[source]
Print current navigation path above the table.
- Parameters:
breadcrumb – Path string, e.g. “HDP > Prod > Admin”
- print_header(headers: List[str]) → None[source]
Print table header.
- Parameters:
headers – List of header column names
- print_instructions(sync_label: str = '', context_label: str = '') → None[source]
Print usage instructions.
- Parameters:
sync_label – Optional sync status label shown at the end of the line.
context_label – Optional active context name (shown when multi-context is active).
- print_row(infos: tuple, is_selected: bool, is_host: bool, is_marked: bool = False) → None[source]
Print a table row.
- Parameters:
infos – Tuple of (index, data) for the row
is_selected – Whether this row is currently selected
is_host – Whether this row represents a host entry
is_marked – Whether this row is marked for multi-selection
- print_table(data: Dict[str, Any] | List[Any], selected_target: int, marked_indices: set, level: int) → None[source]
Print complete table with data.
- Parameters:
data – Dictionary or list of items to display
selected_target – Index of currently selected item
marked_indices – Set of indices marked for multi-selection
level – Current navigation depth level
Colors Module
Color definitions for the user interface.
- class sshmenuc.ui.colors.Colors[source]
Bases:
objectTerminal color management class with ANSI escape sequences.
- BOLD = '\x1b[1m'
- ENDC = '\x1b[0m'
- FAIL = '\x1b[91m'
- HEADER = '\x1b[95m'
- OKBLUE = '\x1b[94m'
- OKCYAN = '\x1b[96m'
- OKGREEN = '\x1b[92m'
- UNDERLINE = '\x1b[4m'
- WARNING = '\x1b[93m'