ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Styles = Theme{
	PanelTitleColor:                      tcell.ColorLightGray,
	PanelBorderColor:                     tcell.ColorDimGray,
	PanelTitleSelectedColor:              tcell.ColorGoldenrod,
	PanelBorderSelectedColor:             tcell.ColorLightGoldenrodYellow,
	PanelSelectedBackgroundColor:         tcell.ColorMidnightBlue,
	PanelSelectedBackgroundInactiveColor: tcell.Color236,
}

Styles defines theme defaults.

Functions

func NewPanelBox

func NewPanelBox(title string) *tview.Box

Types

type App

type App struct {
	*tview.Application
	// contains filtered or unexported fields
}

App is a terminal UI app,

func NewApp

func NewApp(probectl client.API) *App

func (*App) Run

func (a *App) Run() error

func (*App) RunDiscovery

func (a *App) RunDiscovery(queryParams ...map[string]string)

func (*App) Stop

func (a *App) Stop()

type InfoPanel

type InfoPanel struct {
	*tview.TextView
}

func NewInfoPanel

func NewInfoPanel() *InfoPanel

func (*InfoPanel) SetInstance

func (v *InfoPanel) SetInstance(vpp *VPP)

type InstanceList

type InstanceList struct {
	*tview.List
}

func NewInstanceList

func NewInstanceList() *InstanceList

func (*InstanceList) SetInstances

func (l *InstanceList) SetInstances(instances []*VPP)

func (*InstanceList) UpdateInstance

func (l *InstanceList) UpdateInstance(index int, instance *VPP)

type InterfaceTable

type InterfaceTable struct {
	*tview.Table
}

func NewInterfaceTable

func NewInterfaceTable() *InterfaceTable

func (*InterfaceTable) SetInterfaces

func (t *InterfaceTable) SetInterfaces(interfaces []*api.Interface)

type KeyBind

type KeyBind struct {
	Key    string
	Action string
}

type LogPanel

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

func NewLogPanel

func NewLogPanel() *LogPanel

func (*LogPanel) SetLogs

func (l *LogPanel) SetLogs(lines []string)
type Navbar struct {
	*tview.TextView
}

func NewNavbar

func NewNavbar() *Navbar

type PagesPanel

type PagesPanel struct {
	*tview.TabbedPanels
	// contains filtered or unexported fields
}

func NewPagesPanel

func NewPagesPanel() *PagesPanel

func (*PagesPanel) SetInstance

func (v *PagesPanel) SetInstance(instance *VPP)

type StatusBar

type StatusBar struct {
	*tview.TextView
}

func NewStatusBar

func NewStatusBar() *StatusBar

func (*StatusBar) SetKeyBinds

func (v *StatusBar) SetKeyBinds(binds []KeyBind)

type Theme

type Theme struct {
	PanelTitleColor                      tcell.Color
	PanelBorderColor                     tcell.Color
	PanelTitleSelectedColor              tcell.Color
	PanelBorderSelectedColor             tcell.Color
	PanelSelectedBackgroundColor         tcell.Color
	PanelSelectedBackgroundInactiveColor tcell.Color
}

type VPP

type VPP struct {
	*vpp.Instance

	ID         string
	Error      error
	Updating   bool
	LastUpdate time.Time

	Version string
	Pid     string
	Uptime  string

	Interfaces []*api.Interface
	Logs       []string
	Stats      []string
	Extra      []string
	CLIs       map[string]string
}

func (*VPP) String

func (i *VPP) String() string

Jump to

Keyboard shortcuts

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