tui

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionHelp             = ActionName("help")
	ActionLogScreen        = ActionName("log_screen")
	ActionFollowLog        = ActionName("log_follow")
	ActionWrapLog          = ActionName("log_wrap")
	ActionLogSelection     = ActionName("log_select")
	ActionProcessStart     = ActionName("process_start")
	ActionProcessScale     = ActionName("process_scale")
	ActionProcessInfo      = ActionName("process_info")
	ActionProcessStop      = ActionName("process_stop")
	ActionProcessRestart   = ActionName("process_restart")
	ActionProcessScreen    = ActionName("process_screen")
	ActionQuit             = ActionName("quit")
	ActionLogFind          = ActionName("find")
	ActionLogFindNext      = ActionName("find_next")
	ActionLogFindPrev      = ActionName("find_prev")
	ActionLogFindExit      = ActionName("find_exit")
	ActionNsFilter         = ActionName("ns_filter")
	ActionHideDisabled     = ActionName("hide_disabled")
	ActionProcFilter       = ActionName("proc_filter")
	ActionThemeSelector    = ActionName("theme_selector")
	ActionSendToBackground = ActionName("send_to_background")
	ActionFullScreen       = ActionName("full_screen")
	ActionFocusChange      = ActionName("focus_change")
)
View Source
const (
	LogFull     ScrSplitState = 0
	ProcFull                  = 1
	LogProcHalf               = 2
)
View Source
const (
	PageMain   = "main"
	PageDialog = "dialog"
	AllNS      = "PC_ALL_NS_FILTER"
)

Variables

This section is empty.

Functions

func ColumnNames added in v0.69.0

func ColumnNames() []string

func SetupTui

func SetupTui(project app.IProject, options ...Option)

func Stop added in v0.21.0

func Stop()

func Wait added in v0.81.4

func Wait()

Types

type Action added in v0.24.0

type Action struct {
	ShortCut string `yaml:"shortcut"`

	Description       string          //`yaml:"description,omitempty"`
	ToggleDescription map[bool]string //`yaml:"toggle_description,omitempty"`
	// contains filtered or unexported fields
}

type ActionName added in v0.24.0

type ActionName string

type ColumnID added in v0.50.0

type ColumnID int
const (
	ProcessStateUndefined ColumnID = -1
	ProcessStateIcon      ColumnID = 0
	ProcessStatePid       ColumnID = 1
	ProcessStateName      ColumnID = 2
	ProcessStateNamespace ColumnID = 3
	ProcessStateStatus    ColumnID = 4
	ProcessStateAge       ColumnID = 5
	ProcessStateHealth    ColumnID = 6
	ProcessStateRestarts  ColumnID = 7
	ProcessStateExit      ColumnID = 8
)

func StringToColumnID added in v0.69.0

func StringToColumnID(s string) (ColumnID, error)

func (ColumnID) String added in v0.69.0

func (c ColumnID) String() string

type LogView added in v0.10.0

type LogView struct {
	tview.TextView
	// contains filtered or unexported fields
}

func NewLogView added in v0.10.0

func NewLogView(maxLines int) *LogView

func (*LogView) AddLines added in v0.10.0

func (l *LogView) AddLines(lines []string)

func (*LogView) Flush added in v0.10.0

func (l *LogView) Flush()

func (*LogView) GetTailLength added in v0.43.1

func (l *LogView) GetTailLength() int

func (*LogView) GetUniqueID added in v0.43.1

func (l *LogView) GetUniqueID() string

func (*LogView) IsWrapOn added in v0.10.0

func (l *LogView) IsWrapOn() bool

func (*LogView) SearchNext added in v0.45.0

func (l *LogView) SearchNext()

func (*LogView) SearchPrev added in v0.45.0

func (l *LogView) SearchPrev()

func (*LogView) SetLines added in v0.10.0

func (l *LogView) SetLines(lines []string)

func (*LogView) ToggleWrap added in v0.10.0

func (l *LogView) ToggleWrap()

func (*LogView) WriteString added in v0.50.0

func (l *LogView) WriteString(line string) (n int, err error)

type Option added in v0.69.0

type Option func(view *pcView) error

func WithRefreshRate added in v0.69.0

func WithRefreshRate(rate time.Duration) Option

func WithStateSorter added in v0.69.0

func WithStateSorter(column ColumnID, isAscending bool) Option

func WithTheme added in v1.0.0

func WithTheme(theme string) Option

type ScrSplitState added in v1.0.0

type ScrSplitState int

type ShortCuts added in v0.24.0

type ShortCuts struct {
	ShortCutKeys map[ActionName]*Action `yaml:"shortcuts"`
	// contains filtered or unexported fields
}

func (*ShortCuts) StylesChanged added in v1.0.0

func (s *ShortCuts) StylesChanged(style *config.Styles)

type StateSorter added in v0.50.0

type StateSorter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL