tui

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 33 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")
	ActionClearLog         = ActionName("clear_log")
	ActionMarkLog          = ActionName("mark_log")
	ActionEditProcess      = ActionName("edit_process")
	ActionReloadConfig     = ActionName("reload_config")
)
View Source
const (
	LogFull     scrSplitState = 0
	ProcFull    scrSplitState = 1
	LogProcHalf scrSplitState = 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 RunTUI added in v1.27.0

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

func RunTUIAsync added in v1.27.0

func RunTUIAsync(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
	ProcessStateMem       ColumnID = 7
	ProcessStateCPU       ColumnID = 8
	ProcessStateRestarts  ColumnID = 9
	ProcessStateExit      ColumnID = 10
)

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) AddMark added in v1.24.0

func (l *LogView) AddMark()

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 WithDisabledExitConfirm added in v1.40.0

func WithDisabledExitConfirm(isDisabled bool) Option

func WithDisabledHidden added in v1.18.0

func WithDisabledHidden(isHidden bool) Option

func WithFullScreen added in v1.18.0

func WithFullScreen(isFullScreen bool) Option

func WithReadOnlyMode added in v1.5.0

func WithReadOnlyMode(isReadOnly bool) Option

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 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