Documentation
¶
Index ¶
- func RenderGradientText(text string, startHex string, endHex string) string
- func RenderHeader(title string, containerWidth int, totalHorizontalPadding int, pattern string) string
- func RenderHeaderActive(title string, containerWidth int, totalHorizontalPadding int, pattern string) string
- func RenderNetwork(name, driver string, highlight bool) string
- func RenderSimple(key, value string) string
- func RenderThemeGradient(text string) string
- func RenderVolume(name, mountPath, detail string, highlight bool) string
- type LogsPager
- type StackItem
- type StacksDelegate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderGradientText ¶
RenderGradientText colors each character of text with a gradient transitioning from startHex to endHex (e.g., "#5EC6F6" to "#376FE9"). The gradient spans the full rune-length of the input text.
func RenderHeader ¶
func RenderHeader(title string, containerWidth int, totalHorizontalPadding int, pattern string) string
RenderHeader renders a single-line header like "◇ Title /////" that fills the full content width of the parent container, never wrapping. It clamps to the given width. The containerWidth should be the container's content width; the function accounts for horizontal padding via the totalHorizontalPadding value passed by the caller.
func RenderHeaderActive ¶
func RenderHeaderActive(title string, containerWidth int, totalHorizontalPadding int, pattern string) string
RenderHeaderActive renders the same header but highlights the title section with the primary color to denote focus/selection.
func RenderNetwork ¶
RenderNetwork renders a single-line network entry formatted as:
name - driver
Styling follows the Simple component: - the prefix ("name - ") uses theme.FgHalfMuted - the driver uses theme.FgMuted and is italic
func RenderSimple ¶
RenderSimple renders a single line in the format "key: value" with styles: - the "key: " part uses theme.FgHalfMuted - the value uses theme.FgMuted and is italic It returns the styled string; callers decide placement and width concerns.
func RenderThemeGradient ¶
RenderThemeGradient colors each character using the dashboard gradient colors.
func RenderVolume ¶
RenderVolume renders a simple volume block with the following format:
name ├ /mnt/path └ local
Colors follow the same pattern used in stack list items: title and tree in theme.FgBase; secondary text in theme.FgHalfMuted; the final line is italic.
Types ¶
type LogsPager ¶
type LogsPager struct {
// contains filtered or unexported fields
}
LogsPager is a thin wrapper around a viewport pager that we can embed inside the dashboard center column.
func NewLogsPager ¶
func NewLogsPager() LogsPager
func (*LogsPager) SetContent ¶
type StackItem ¶
type StackItem struct {
TitleText string
Service string
ContainerName string
Containers []string
Status string
StatusKind string // success | warning | error | unknown
FilterText string
}
StackItem represents an item in the stacks list (formerly projectItem).
func (StackItem) Description ¶
func (StackItem) FilterValue ¶
type StacksDelegate ¶
type StacksDelegate struct{}
StacksDelegate renders stack items with tree-like formatting.
func (StacksDelegate) Height ¶
func (d StacksDelegate) Height() int
func (StacksDelegate) Spacing ¶
func (d StacksDelegate) Spacing() int