Documentation
¶
Index ¶
- type TreeView
- func (v *TreeView) ApplyTheme(palette theme.Palette)
- func (v *TreeView) Init() tea.Cmd
- func (v *TreeView) Render() string
- func (v *TreeView) SelectedIndex() int
- func (v *TreeView) SelectedLineIndex() int
- func (v *TreeView) SetAppMeta(name, health, sync string)
- func (v *TreeView) SetData(tree *api.ResourceTree)
- func (v *TreeView) SetSize(width, height int)
- func (v *TreeView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *TreeView) UpsertAppTree(appName string, tree *api.ResourceTree)
- func (v *TreeView) View() tea.View
- func (v *TreeView) VisibleCount() int
- func (v *TreeView) VisibleLineCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeView ¶
type TreeView struct {
Model tea.Model // kept to satisfy requested shape; this instance is itself a tea.Model
SelectedUID string
// contains filtered or unexported fields
}
TreeView wraps a simple interactive tree for displaying ArgoCD resource trees. It intentionally keeps state minimal and integrates with Bubble Tea.
func NewTreeView ¶
NewTreeView creates a new tree view instance
func (*TreeView) ApplyTheme ¶
ApplyTheme updates the tree view's color palette
func (*TreeView) SelectedIndex ¶
Expose selected index for integration (optional)
func (*TreeView) SelectedLineIndex ¶
SelectedLineIndex returns the index of the selected line in the rendered output, accounting for the blank separator lines inserted between app roots in View().
func (*TreeView) SetAppMeta ¶
SetAppMeta sets the application metadata used for the synthetic top-level node
func (*TreeView) SetData ¶
func (v *TreeView) SetData(tree *api.ResourceTree)
SetData converts api.ResourceTree to internal nodes and builds adjacency
func (*TreeView) UpsertAppTree ¶
func (v *TreeView) UpsertAppTree(appName string, tree *api.ResourceTree)
UpsertAppTree replaces/adds a single application's tree under a synthetic root
func (*TreeView) VisibleCount ¶
VisibleCount returns the number of currently visible nodes in DFS order.
func (*TreeView) VisibleLineCount ¶
VisibleLineCount returns the number of lines produced by View(), which is the number of visible nodes plus the number of blank separators (roots-1).