Documentation
¶
Index ¶
- Constants
- Variables
- func ColorFg(text string, c color.Color) string
- func InitStyles()
- func PadLine(line string, targetWidth int, style lipgloss.Style) string
- func RenderWidgetHeader(o WidgetHeaderOpts) string
- func RotateColorTheme()
- type CloseOverlayMsg
- type Column
- type ContainerMenuCommandMsg
- type ContainerMenuModel
- type ContainersModel
- func (m ContainersModel) FilterActive() bool
- func (m *ContainersModel) RefreshTableStyles()
- func (m ContainersModel) SelectedContainer() *docker.Container
- func (m *ContainersModel) SetContainers(containers []*docker.Container)
- func (m *ContainersModel) SetDaemon(d docker.ContainerDaemon)
- func (m *ContainersModel) SetSize(w, h int)
- func (m ContainersModel) ShowAll() bool
- func (m ContainersModel) SortMode() docker.SortMode
- func (m ContainersModel) Update(msg tea.Msg) (ContainersModel, tea.Cmd)
- func (m ContainersModel) View() string
- type DiskUsageLoadedMsg
- type DiskUsageModel
- type FilterInputModel
- func (m *FilterInputModel) Activate() tea.Cmd
- func (m FilterInputModel) Active() bool
- func (m *FilterInputModel) Clear()
- func (m *FilterInputModel) Deactivate() string
- func (m *FilterInputModel) SetWidth(w int)
- func (m FilterInputModel) Update(msg tea.Msg) (FilterInputModel, tea.Cmd)
- func (m FilterInputModel) Value() string
- func (m FilterInputModel) View() string
- type HeaderModel
- type ImagesLoadedMsg
- type ImagesModel
- func (m ImagesModel) FilterActive() bool
- func (m *ImagesModel) RefreshTableStyles()
- func (m ImagesModel) SelectedImage() *image.Summary
- func (m *ImagesModel) SetDaemon(d docker.ContainerDaemon)
- func (m *ImagesModel) SetImages(images []image.Summary)
- func (m *ImagesModel) SetSize(w, h int)
- func (m ImagesModel) Update(msg tea.Msg) (ImagesModel, tea.Cmd)
- func (m ImagesModel) View() string
- type InputPromptModel
- type InputPromptResultMsg
- type LessModel
- type MessageBarModel
- type MonitorErrorMsg
- type MonitorModel
- func (m MonitorModel) Active() bool
- func (m *MonitorModel) RefreshTableStyles()
- func (m *MonitorModel) RemoveContainer(cid string)
- func (m *MonitorModel) SetDaemon(d docker.ContainerDaemon)
- func (m *MonitorModel) SetSize(w, h int)
- func (m *MonitorModel) Start() []tea.Cmd
- func (m *MonitorModel) StopAll()
- func (m MonitorModel) Update(msg tea.Msg) (MonitorModel, tea.Cmd)
- func (m *MonitorModel) UpdateStats(cid string, stats *docker.Stats, ch <-chan *docker.Stats) tea.Cmd
- func (m MonitorModel) View() string
- type MonitorStatsMsg
- type NetworksLoadedMsg
- type NetworksModel
- func (m NetworksModel) FilterActive() bool
- func (m *NetworksModel) RefreshTableStyles()
- func (m NetworksModel) SelectedNetwork() *network.Inspect
- func (m *NetworksModel) SetDaemon(d docker.ContainerDaemon)
- func (m *NetworksModel) SetNetworks(networks []network.Inspect)
- func (m *NetworksModel) SetSize(w, h int)
- func (m NetworksModel) Update(msg tea.Msg) (NetworksModel, tea.Cmd)
- func (m NetworksModel) View() string
- type PromptModel
- type PromptResultMsg
- type TableModel
- func (m TableModel) Cursor() int
- func (m TableModel) FilterText() string
- func (m *TableModel) NextSort()
- func (m *TableModel) RefreshStyles()
- func (m TableModel) RowCount() int
- func (m TableModel) SelectedRow() TableRow
- func (m *TableModel) SetFilter(pattern string)
- func (m *TableModel) SetRows(rows []TableRow)
- func (m *TableModel) SetSize(w, h int)
- func (m *TableModel) SetSortField(col int)
- func (m TableModel) SortField() int
- func (m TableModel) TotalRowCount() int
- func (m TableModel) Update(msg tea.Msg) (TableModel, tea.Cmd)
- func (m TableModel) View() string
- func (m TableModel) Width() int
- type TableRow
- type VolumesLoadedMsg
- type VolumesModel
- func (m VolumesModel) FilterActive() bool
- func (m *VolumesModel) RefreshTableStyles()
- func (m VolumesModel) SelectedVolume() *volume.Volume
- func (m *VolumesModel) SetDaemon(d docker.ContainerDaemon)
- func (m *VolumesModel) SetSize(w, h int)
- func (m *VolumesModel) SetVolumes(volumes []*volume.Volume)
- func (m VolumesModel) Update(msg tea.Msg) (VolumesModel, tea.Cmd)
- func (m VolumesModel) View() string
- type WidgetHeaderOpts
Constants ¶
const ( //DownArrow character DownArrow = string('\U00002193') //MainScreenHeaderSize is the number of lines the header info rows use (excluding separator) MainScreenHeaderSize = 3 MainScreenFooterLength = 1 //DefaultColumnSpacing defines the minimum space between columns DefaultColumnSpacing = 1 //IDColumnWidth defines a fixed width for ID columns IDColumnWidth = docker.ShortLen )
Variables ¶
var ( HeaderStyle lipgloss.Style SelectedRowStyle lipgloss.Style TableHeaderStyle lipgloss.Style InfoStyle lipgloss.Style )
Styles derived from the active theme.
var ColorThemes = []*ui.Theme{CrushLight, CrushDark}
ColorThemes holds the list of dry color themes.
var CrushDark = &ui.Theme{
Fg: ash,
Bg: pepper,
DarkBg: pepper,
FgMuted: smoke,
FgSubtle: oyster,
Primary: charple,
Secondary: dolly,
Tertiary: bok,
Info: malibu,
Success: julep,
Error: sriracha,
Warning: zest,
Key: bok,
Prompt: dolly,
Border: charcoal,
Header: charcoal,
Footer: charcoal,
CursorLineBg: darkTeal,
}
CrushDark is the Crush-inspired dark theme.
var CrushLight = &ui.Theme{
Fg: inkBrown,
Bg: cream,
DarkBg: cream,
FgMuted: medBrown,
FgSubtle: ltBrown,
Primary: dkAmber,
Secondary: dkMagenta,
Tertiary: dkTeal,
Info: dkBlue,
Success: dkGreen,
Error: dkRed,
Warning: dkGold,
Key: dkTeal,
Prompt: dkMagenta,
Border: ltBorder,
Header: lightGrey,
Footer: lightGrey,
CursorLineBg: warmTan,
}
CrushLight is the warm light theme.
var DryTheme = CrushDark
DryTheme is the active theme for dry.
Functions ¶
func ColorFg ¶ added in v0.12.0
ColorFg applies a foreground color to text using targeted ANSI sequences that only reset the foreground (SGR 39), not the full SGR reset. This preserves any outer background color (e.g. the selected row highlight).
func InitStyles ¶ added in v0.12.0
func InitStyles()
InitStyles rebuilds all derived styles from DryTheme. Call after rotating the color theme.
func PadLine ¶ added in v0.12.0
PadLine pads or truncates a line to exactly targetWidth visual characters, using the given style for padding spaces. This ensures backgrounds extend across the full width.
func RenderWidgetHeader ¶ added in v0.12.0
func RenderWidgetHeader(o WidgetHeaderOpts) string
RenderWidgetHeader renders a full-width accent bar with icon, title, and count.
func RotateColorTheme ¶
func RotateColorTheme()
RotateColorTheme changes the color theme to the next one in the rotation order.
Types ¶
type CloseOverlayMsg ¶ added in v0.12.0
type CloseOverlayMsg struct{}
CloseOverlayMsg signals that an overlay should be closed.
type Column ¶ added in v0.12.0
type Column struct {
Title string
Width int // 0 means proportional (share remaining space)
Fixed bool // fixed-width column
}
Column defines a table column.
type ContainerMenuCommandMsg ¶ added in v0.12.0
ContainerMenuCommandMsg is sent when a menu command is selected.
type ContainerMenuModel ¶ added in v0.12.0
type ContainerMenuModel struct {
// contains filtered or unexported fields
}
ContainerMenuModel shows a command menu for a selected container.
func NewContainerMenuModel ¶ added in v0.12.0
func NewContainerMenuModel(c *docker.Container) ContainerMenuModel
NewContainerMenuModel creates a container menu for the given container.
func (*ContainerMenuModel) SetSize ¶ added in v0.12.0
func (m *ContainerMenuModel) SetSize(w, h int)
SetSize updates the menu dimensions.
func (ContainerMenuModel) Update ¶ added in v0.12.0
func (m ContainerMenuModel) Update(msg tea.Msg) (ContainerMenuModel, tea.Cmd)
Update handles key events for the menu.
func (ContainerMenuModel) View ¶ added in v0.12.0
func (m ContainerMenuModel) View() string
View renders the container menu.
type ContainersModel ¶ added in v0.12.0
type ContainersModel struct {
// contains filtered or unexported fields
}
ContainersModel is the container list view sub-model.
func NewContainersModel ¶ added in v0.12.0
func NewContainersModel() ContainersModel
NewContainersModel creates a container list model.
func (ContainersModel) FilterActive ¶ added in v0.12.0
func (m ContainersModel) FilterActive() bool
FilterActive returns true when the filter input is active.
func (*ContainersModel) RefreshTableStyles ¶ added in v0.12.0
func (m *ContainersModel) RefreshTableStyles()
RefreshTableStyles re-applies theme styles to the inner table.
func (ContainersModel) SelectedContainer ¶ added in v0.12.0
func (m ContainersModel) SelectedContainer() *docker.Container
SelectedContainer returns the container under the cursor, or nil.
func (*ContainersModel) SetContainers ¶ added in v0.12.0
func (m *ContainersModel) SetContainers(containers []*docker.Container)
SetContainers replaces the container list with new data.
func (*ContainersModel) SetDaemon ¶ added in v0.12.0
func (m *ContainersModel) SetDaemon(d docker.ContainerDaemon)
SetDaemon sets the Docker daemon reference.
func (*ContainersModel) SetSize ¶ added in v0.12.0
func (m *ContainersModel) SetSize(w, h int)
SetSize updates the table dimensions.
func (ContainersModel) ShowAll ¶ added in v0.12.0
func (m ContainersModel) ShowAll() bool
ShowAll returns the show-all state.
func (ContainersModel) SortMode ¶ added in v0.12.0
func (m ContainersModel) SortMode() docker.SortMode
SortMode returns the current sort mode.
func (ContainersModel) Update ¶ added in v0.12.0
func (m ContainersModel) Update(msg tea.Msg) (ContainersModel, tea.Cmd)
Update handles container-list-specific key events.
func (ContainersModel) View ¶ added in v0.12.0
func (m ContainersModel) View() string
View renders the container list.
type DiskUsageLoadedMsg ¶ added in v0.12.0
DiskUsageLoadedMsg carries the loaded disk usage data.
type DiskUsageModel ¶ added in v0.12.0
type DiskUsageModel struct {
// contains filtered or unexported fields
}
DiskUsageModel displays Docker disk usage information.
func NewDiskUsageModel ¶ added in v0.12.0
func NewDiskUsageModel() DiskUsageModel
NewDiskUsageModel creates a disk usage model.
func (*DiskUsageModel) SetDaemon ¶ added in v0.12.0
func (m *DiskUsageModel) SetDaemon(d docker.ContainerDaemon)
SetDaemon sets the Docker daemon reference.
func (*DiskUsageModel) SetSize ¶ added in v0.12.0
func (m *DiskUsageModel) SetSize(w, h int)
SetSize updates the dimensions.
func (*DiskUsageModel) SetUsage ¶ added in v0.12.0
func (m *DiskUsageModel) SetUsage(usage types.DiskUsage)
SetUsage replaces the disk usage data.
func (DiskUsageModel) Update ¶ added in v0.12.0
func (m DiskUsageModel) Update(msg tea.Msg) (DiskUsageModel, tea.Cmd)
Update handles key events.
func (DiskUsageModel) View ¶ added in v0.12.0
func (m DiskUsageModel) View() string
View renders the disk usage summary.
type FilterInputModel ¶ added in v0.12.0
type FilterInputModel struct {
// contains filtered or unexported fields
}
FilterInputModel is a text input for filtering table rows.
func NewFilterInputModel ¶ added in v0.12.0
func NewFilterInputModel() FilterInputModel
NewFilterInputModel creates a new filter input.
func (*FilterInputModel) Activate ¶ added in v0.12.0
func (m *FilterInputModel) Activate() tea.Cmd
Activate shows and focuses the filter input.
func (FilterInputModel) Active ¶ added in v0.12.0
func (m FilterInputModel) Active() bool
Active returns whether the filter input is showing.
func (*FilterInputModel) Clear ¶ added in v0.12.0
func (m *FilterInputModel) Clear()
Clear resets and hides the filter input.
func (*FilterInputModel) Deactivate ¶ added in v0.12.0
func (m *FilterInputModel) Deactivate() string
Deactivate hides the filter input and returns the final value.
func (*FilterInputModel) SetWidth ¶ added in v0.12.0
func (m *FilterInputModel) SetWidth(w int)
SetWidth sets the input width.
func (FilterInputModel) Update ¶ added in v0.12.0
func (m FilterInputModel) Update(msg tea.Msg) (FilterInputModel, tea.Cmd)
Update handles input events when active.
func (FilterInputModel) Value ¶ added in v0.12.0
func (m FilterInputModel) Value() string
Value returns the current filter text.
func (FilterInputModel) View ¶ added in v0.12.0
func (m FilterInputModel) View() string
View renders the filter input bar.
type HeaderModel ¶ added in v0.12.0
type HeaderModel struct {
// contains filtered or unexported fields
}
HeaderModel displays Docker daemon information at the top of the screen.
func NewHeaderModel ¶ added in v0.12.0
func NewHeaderModel(daemon docker.ContainerDaemon, width int) HeaderModel
NewHeaderModel creates a new header model.
func (*HeaderModel) Refresh ¶ added in v0.12.0
func (m *HeaderModel) Refresh()
Refresh re-fetches Docker info and version from the daemon.
func (HeaderModel) SeparatorLine ¶ added in v0.12.0
func (m HeaderModel) SeparatorLine(message string) string
SeparatorLine renders the header separator. When message is non-empty it displays the message text; otherwise it renders a plain colored line.
func (*HeaderModel) SetWidth ¶ added in v0.12.0
func (m *HeaderModel) SetWidth(w int)
SetWidth updates the header width.
func (HeaderModel) View ¶ added in v0.12.0
func (m HeaderModel) View() string
View renders the Docker daemon info header.
type ImagesLoadedMsg ¶ added in v0.12.0
ImagesLoadedMsg carries the loaded images.
type ImagesModel ¶ added in v0.12.0
type ImagesModel struct {
// contains filtered or unexported fields
}
ImagesModel is the images list view sub-model.
func NewImagesModel ¶ added in v0.12.0
func NewImagesModel() ImagesModel
NewImagesModel creates an images list model.
func (ImagesModel) FilterActive ¶ added in v0.12.0
func (m ImagesModel) FilterActive() bool
FilterActive returns true when the filter input is active.
func (*ImagesModel) RefreshTableStyles ¶ added in v0.12.0
func (m *ImagesModel) RefreshTableStyles()
RefreshTableStyles re-applies theme styles to the inner table.
func (ImagesModel) SelectedImage ¶ added in v0.12.0
func (m ImagesModel) SelectedImage() *image.Summary
SelectedImage returns the image under the cursor, or nil.
func (*ImagesModel) SetDaemon ¶ added in v0.12.0
func (m *ImagesModel) SetDaemon(d docker.ContainerDaemon)
SetDaemon sets the Docker daemon reference.
func (*ImagesModel) SetImages ¶ added in v0.12.0
func (m *ImagesModel) SetImages(images []image.Summary)
SetImages replaces the image list.
func (*ImagesModel) SetSize ¶ added in v0.12.0
func (m *ImagesModel) SetSize(w, h int)
SetSize updates the table dimensions.
func (ImagesModel) Update ¶ added in v0.12.0
func (m ImagesModel) Update(msg tea.Msg) (ImagesModel, tea.Cmd)
Update handles image-list-specific key events.
func (ImagesModel) View ¶ added in v0.12.0
func (m ImagesModel) View() string
View renders the images list.
type InputPromptModel ¶ added in v0.12.0
type InputPromptModel struct {
// contains filtered or unexported fields
}
InputPromptModel is a text input prompt overlay.
func NewInputPromptModel ¶ added in v0.12.0
func NewInputPromptModel(message, placeholder, tag, id string) (InputPromptModel, tea.Cmd)
NewInputPromptModel creates a new input prompt.
func (*InputPromptModel) SetWidth ¶ added in v0.12.0
func (m *InputPromptModel) SetWidth(w int)
SetWidth sets the prompt width.
func (InputPromptModel) Update ¶ added in v0.12.0
func (m InputPromptModel) Update(msg tea.Msg) (InputPromptModel, tea.Cmd)
Update handles key events for the input prompt.
func (InputPromptModel) View ¶ added in v0.12.0
func (m InputPromptModel) View() string
View renders the input prompt.
type InputPromptResultMsg ¶ added in v0.12.0
type InputPromptResultMsg struct {
Value string
Cancelled bool
Tag string // identifies which operation was being prompted
ID string // the resource ID being operated on
}
InputPromptResultMsg carries the result of an input prompt.
type LessModel ¶ added in v0.12.0
type LessModel struct {
// contains filtered or unexported fields
}
LessModel is a scrollable text viewer with search and filter support.
func NewLessModel ¶ added in v0.12.0
func NewLessModel() LessModel
NewLessModel creates a new less viewer.
func (*LessModel) AppendContent ¶ added in v0.12.0
AppendContent adds content (for streaming).
func (*LessModel) SetContent ¶ added in v0.12.0
SetContent sets the text content to display.
func (*LessModel) SetFollowing ¶ added in v0.12.0
SetFollowing enables or disables follow mode (auto-scroll to bottom).
type MessageBarModel ¶ added in v0.12.0
type MessageBarModel struct {
// contains filtered or unexported fields
}
MessageBarModel holds timed status messages displayed in the header separator.
func (MessageBarModel) Message ¶ added in v0.12.0
func (m MessageBarModel) Message() string
Message returns the active message text, or "" if expired/unset.
func (*MessageBarModel) SetMessage ¶ added in v0.12.0
func (m *MessageBarModel) SetMessage(text string, duration time.Duration)
SetMessage sets a status message that auto-clears after the given duration.
type MonitorErrorMsg ¶ added in v0.12.0
MonitorErrorMsg carries a stats error.
type MonitorModel ¶ added in v0.12.0
type MonitorModel struct {
// contains filtered or unexported fields
}
MonitorModel shows live container stats.
func NewMonitorModel ¶ added in v0.12.0
func NewMonitorModel() MonitorModel
NewMonitorModel creates a monitor model.
func (MonitorModel) Active ¶ added in v0.12.0
func (m MonitorModel) Active() bool
Active returns whether monitoring is active.
func (*MonitorModel) RefreshTableStyles ¶ added in v0.12.0
func (m *MonitorModel) RefreshTableStyles()
RefreshTableStyles re-applies theme styles to the inner table.
func (*MonitorModel) RemoveContainer ¶ added in v0.12.0
func (m *MonitorModel) RemoveContainer(cid string)
RemoveContainer removes a container from monitoring.
func (*MonitorModel) SetDaemon ¶ added in v0.12.0
func (m *MonitorModel) SetDaemon(d docker.ContainerDaemon)
SetDaemon sets the Docker daemon reference.
func (*MonitorModel) SetSize ¶ added in v0.12.0
func (m *MonitorModel) SetSize(w, h int)
SetSize updates the table dimensions.
func (*MonitorModel) Start ¶ added in v0.12.0
func (m *MonitorModel) Start() []tea.Cmd
Start begins monitoring all running containers. Returns commands that will stream stats.
func (*MonitorModel) StopAll ¶ added in v0.12.0
func (m *MonitorModel) StopAll()
StopAll stops monitoring all containers.
func (MonitorModel) Update ¶ added in v0.12.0
func (m MonitorModel) Update(msg tea.Msg) (MonitorModel, tea.Cmd)
Update handles key events.
func (*MonitorModel) UpdateStats ¶ added in v0.12.0
func (m *MonitorModel) UpdateStats(cid string, stats *docker.Stats, ch <-chan *docker.Stats) tea.Cmd
UpdateStats updates stats for a container and refreshes the table. Returns a command to continue listening on the same channel.
func (MonitorModel) View ¶ added in v0.12.0
func (m MonitorModel) View() string
View renders the monitor.
type MonitorStatsMsg ¶ added in v0.12.0
type MonitorStatsMsg struct {
CID string
Stats *docker.Stats
StatsCh <-chan *docker.Stats // channel to re-subscribe
}
MonitorStatsMsg carries stats update for a container.
type NetworksLoadedMsg ¶ added in v0.12.0
NetworksLoadedMsg carries the loaded networks.
type NetworksModel ¶ added in v0.12.0
type NetworksModel struct {
// contains filtered or unexported fields
}
NetworksModel is the networks list view sub-model.
func NewNetworksModel ¶ added in v0.12.0
func NewNetworksModel() NetworksModel
NewNetworksModel creates a networks list model.
func (NetworksModel) FilterActive ¶ added in v0.12.0
func (m NetworksModel) FilterActive() bool
FilterActive returns true when the filter input is active.
func (*NetworksModel) RefreshTableStyles ¶ added in v0.12.0
func (m *NetworksModel) RefreshTableStyles()
RefreshTableStyles re-applies theme styles to the inner table.
func (NetworksModel) SelectedNetwork ¶ added in v0.12.0
func (m NetworksModel) SelectedNetwork() *network.Inspect
SelectedNetwork returns the network under the cursor, or nil.
func (*NetworksModel) SetDaemon ¶ added in v0.12.0
func (m *NetworksModel) SetDaemon(d docker.ContainerDaemon)
SetDaemon sets the Docker daemon reference.
func (*NetworksModel) SetNetworks ¶ added in v0.12.0
func (m *NetworksModel) SetNetworks(networks []network.Inspect)
SetNetworks replaces the network list.
func (*NetworksModel) SetSize ¶ added in v0.12.0
func (m *NetworksModel) SetSize(w, h int)
SetSize updates the table dimensions.
func (NetworksModel) Update ¶ added in v0.12.0
func (m NetworksModel) Update(msg tea.Msg) (NetworksModel, tea.Cmd)
Update handles network-list-specific key events.
func (NetworksModel) View ¶ added in v0.12.0
func (m NetworksModel) View() string
View renders the networks list.
type PromptModel ¶ added in v0.12.0
type PromptModel struct {
// contains filtered or unexported fields
}
PromptModel is a y/N confirmation prompt overlay.
func NewPromptModel ¶ added in v0.12.0
func NewPromptModel(message, tag, id string) PromptModel
NewPromptModel creates a new prompt.
func (*PromptModel) SetWidth ¶ added in v0.12.0
func (m *PromptModel) SetWidth(w int)
SetWidth sets the prompt width.
func (PromptModel) Update ¶ added in v0.12.0
func (m PromptModel) Update(msg tea.Msg) (PromptModel, tea.Cmd)
Update handles key events for the prompt.
func (PromptModel) View ¶ added in v0.12.0
func (m PromptModel) View() string
View renders the prompt.
type PromptResultMsg ¶ added in v0.12.0
type PromptResultMsg struct {
Confirmed bool
Tag string // identifies which operation was being prompted
ID string // the resource ID being operated on
}
PromptResultMsg carries the result of a prompt confirmation.
type TableModel ¶ added in v0.12.0
type TableModel struct {
// contains filtered or unexported fields
}
TableModel is a shared table component with navigation, sorting, and filtering. It wraps bubbles/table for rendering and keyboard navigation while keeping sort, filter, and column-width logic locally.
func NewTableModel ¶ added in v0.12.0
func NewTableModel(columns []Column) TableModel
NewTableModel creates a table with the given column definitions.
func (TableModel) Cursor ¶ added in v0.12.0
func (m TableModel) Cursor() int
Cursor returns the current cursor position.
func (TableModel) FilterText ¶ added in v0.12.0
func (m TableModel) FilterText() string
FilterText returns the active filter string.
func (*TableModel) NextSort ¶ added in v0.12.0
func (m *TableModel) NextSort()
NextSort cycles to the next sort field and re-sorts the rows.
func (*TableModel) RefreshStyles ¶ added in v0.12.0
func (m *TableModel) RefreshStyles()
RefreshStyles re-applies the current theme styles to the inner table. Call after InitStyles() to pick up theme changes.
func (TableModel) RowCount ¶ added in v0.12.0
func (m TableModel) RowCount() int
RowCount returns the number of visible (filtered) rows.
func (TableModel) SelectedRow ¶ added in v0.12.0
func (m TableModel) SelectedRow() TableRow
SelectedRow returns the row under the cursor, or nil.
func (*TableModel) SetFilter ¶ added in v0.12.0
func (m *TableModel) SetFilter(pattern string)
SetFilter sets the filter text and reapplies it.
func (*TableModel) SetRows ¶ added in v0.12.0
func (m *TableModel) SetRows(rows []TableRow)
SetRows replaces all rows and reapplies the filter.
func (*TableModel) SetSize ¶ added in v0.12.0
func (m *TableModel) SetSize(w, h int)
SetSize updates the table dimensions. Table height is reduced by 1 to leave space for the blank line after the table.
func (*TableModel) SetSortField ¶ added in v0.12.0
func (m *TableModel) SetSortField(col int)
SetSortField sets the sort field to a specific column index and updates the column header indicator without performing a local sort. Use this when sorting is handled externally (e.g., server-side Docker sort).
func (TableModel) SortField ¶ added in v0.12.0
func (m TableModel) SortField() int
SortField returns the current sort field index.
func (TableModel) TotalRowCount ¶ added in v0.12.0
func (m TableModel) TotalRowCount() int
TotalRowCount returns the total number of unfiltered rows.
func (TableModel) Update ¶ added in v0.12.0
func (m TableModel) Update(msg tea.Msg) (TableModel, tea.Cmd)
Update handles keyboard navigation via the inner bubbles table.
func (TableModel) View ¶ added in v0.12.0
func (m TableModel) View() string
View renders the table as a string.
func (TableModel) Width ¶ added in v0.12.0
func (m TableModel) Width() int
Width returns the table's current width.
type VolumesLoadedMsg ¶ added in v0.12.0
VolumesLoadedMsg carries the loaded volumes.
type VolumesModel ¶ added in v0.12.0
type VolumesModel struct {
// contains filtered or unexported fields
}
VolumesModel is the volumes list view sub-model.
func NewVolumesModel ¶ added in v0.12.0
func NewVolumesModel() VolumesModel
NewVolumesModel creates a volumes list model.
func (VolumesModel) FilterActive ¶ added in v0.12.0
func (m VolumesModel) FilterActive() bool
FilterActive returns true when the filter input is active.
func (*VolumesModel) RefreshTableStyles ¶ added in v0.12.0
func (m *VolumesModel) RefreshTableStyles()
RefreshTableStyles re-applies theme styles to the inner table.
func (VolumesModel) SelectedVolume ¶ added in v0.12.0
func (m VolumesModel) SelectedVolume() *volume.Volume
SelectedVolume returns the volume under the cursor, or nil.
func (*VolumesModel) SetDaemon ¶ added in v0.12.0
func (m *VolumesModel) SetDaemon(d docker.ContainerDaemon)
SetDaemon sets the Docker daemon reference.
func (*VolumesModel) SetSize ¶ added in v0.12.0
func (m *VolumesModel) SetSize(w, h int)
SetSize updates the table dimensions.
func (*VolumesModel) SetVolumes ¶ added in v0.12.0
func (m *VolumesModel) SetVolumes(volumes []*volume.Volume)
SetVolumes replaces the volume list.
func (VolumesModel) Update ¶ added in v0.12.0
func (m VolumesModel) Update(msg tea.Msg) (VolumesModel, tea.Cmd)
Update handles volume-list-specific key events.
func (VolumesModel) View ¶ added in v0.12.0
func (m VolumesModel) View() string
View renders the volumes list.
type WidgetHeaderOpts ¶ added in v0.12.0
type WidgetHeaderOpts struct {
Icon string // e.g. "🐳"
Title string // e.g. "Containers"
Total int // total row count
Filtered int // visible (filtered) row count; same as Total when no filter
Filter string // active filter text, empty if none
Width int // full terminal width for padding
Accent color.Color // icon/filter accent color
}
WidgetHeaderOpts configures the widget header bar.