module

Swarmy::Views

Instance methods

columns
Source
filter_badge(filter : String | Nil, hint_color : String) : String

Renders the "· filter: x" badge shown next to the service count when a filter is active, or "" when there is none.

Source
header(table : Tui::Table) : String
Source
row_cells(svc : Service) : Array(String)
Source
scroll_window(total : Int32, cursor : Int32, visible : Int32) : Tuple(Int32, Int32)

Computes the [first, last) row range to render so that cursor stays visible within a window of visible rows out of total, scrolling only as needed (keeps the cursor centered once it outgrows the top or bottom edge) rather than jumping straight to either end.

Source
search_prompt(buffer : String, key_color : String, hint_color : String) : String

Renders the inline "/query any key applies esc cancels" prompt shown while editing the filter.

Source
server_columns
Source
server_row(table : Tui::Table, name : String, hint : String, active : Bool, selected : Bool) : String
Source
server_table(rows : Array(Array(String)), term_width : Int32) : Tui::Table
Source
service_detail(svc : Service, tasks : Array(Task), running : Array(Task), task_cursor : Int32, width : Int32 = 60) : String
Source
service_row(table : Tui::Table, svc : Service, selected : Bool) : String
Source
table(services : Array(Service), term_width : Int32) : Tui::Table
Source