component

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigContext

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

ConfigContext table selecting and deleting contexts (configurations)

func NewConfigContext

func NewConfigContext(
	current string,
	confs []*config.Config,
	onSelect func(id string),
	onDelete func(name string, id string),
) *ConfigContext

NewConfigContext returns a new instance of NewConfigContext

func (*ConfigContext) Primitive

func (c *ConfigContext) Primitive() tview.Primitive

Primitive returns the root primitive for ConfigContext

func (*ConfigContext) UpdateConfigs

func (c *ConfigContext) UpdateConfigs(current string, confs []*config.Config)

UpdateConfigs updates the table with a new list of contexts

type ConfigureForm

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

ConfigureForm component for updating and creating configurations

func NewConfigureForm

func NewConfigureForm(
	conf config.Config,
	onUpdate func(conf config.Config),
	onCreate func(conf config.Config),
	onDismiss func(),
) *ConfigureForm

NewConfigureForm returns a new instance of ConfigureForm

func (*ConfigureForm) Primitive

func (f *ConfigureForm) Primitive() tview.Primitive

Primitive return the root primitive for ConfigureForm

func (*ConfigureForm) UpdateConfig added in v1.2.0

func (f *ConfigureForm) UpdateConfig(conf config.Config)

UpdateConfig updates the config for this component

type EventTable

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

EventTable table for viewing all incoming events in realtime

func NewEventTable

func NewEventTable() *EventTable

NewEventTable returns a new instance of EventTable

func (*EventTable) Primitive

func (t *EventTable) Primitive() tview.Primitive

Primitive returns the root primitive for EventTable

func (*EventTable) UpdateTable

func (t *EventTable) UpdateTable(evt event.Event)

UpdateTable adds a new event to the table and removes oldest row if we've reached configured maximum for events to display

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

Header shown above all views. Includes app title and dynamic key legend

func NewHeader

func NewHeader(
	networkInfo network.Network,
	conf config.Config,
	onViewSwitch func(text string),
) *Header

NewHeader returns a new instance of Header

func (*Header) AddLegendKey

func (h *Header) AddLegendKey(key, description string)

AddLegendKey adds a new key and description to the legend

func (*Header) Primitive

func (h *Header) Primitive() tview.Primitive

Primitive returns the root primitive for Header

func (*Header) RemoveAllExtraLegendKeys

func (h *Header) RemoveAllExtraLegendKeys()

RemoveAllExtraLegendKeys removes all non-default keys and descriptions from legend

func (*Header) RemoveLegendKey

func (h *Header) RemoveLegendKey(key string)

RemoveLegendKey removes key and description from legend

func (*Header) SwitchViewInput

func (h *Header) SwitchViewInput() *SwitchViewInput

SwitchViewInput returns access to the Header's SwitchViewInput component

func (*Header) UpdateConfAndNetworkInfo added in v1.2.0

func (h *Header) UpdateConfAndNetworkInfo(conf config.Config, netInfo network.Network)

UpdateConfAndNetworkInfo updates config and network info for this component

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

Modal generic structure for displaying modals

func NewModal

func NewModal(message string, buttons []ModalButton) *Modal

NewModal returns a new instance of Modal

func (*Modal) Primitive

func (m *Modal) Primitive() tview.Primitive

Primitive returns the root primitive for Modal

type ModalButton

type ModalButton struct {
	Label   string
	OnClick func()
}

ModalButton represents a button added to a modal

type ServerTable

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

ServerTable table displaying all servers for the active context

func NewServerTable

func NewServerTable(hostHostname, hostIP string, OnSSH func(ip string)) *ServerTable

NewServerTable returns a new instance of ServerTable

func (*ServerTable) Primitive

func (t *ServerTable) Primitive() tview.Primitive

Primitive returns the root primitive for ServerTable

func (*ServerTable) UpdateTable

func (t *ServerTable) UpdateTable(evt event.Event)

UpdateTable updates the table with the incoming server from the event

type SwitchViewInput

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

SwitchViewInput toggle-able input for switching views

func NewSwitchViewInput

func NewSwitchViewInput(onSubmit func(text string)) *SwitchViewInput

NewSwitchViewInput returns a new instance of SwitchViewInput

func (*SwitchViewInput) Primitive

func (i *SwitchViewInput) Primitive() tview.Primitive

Primitive returns the root primitive for SwitchViewInput

Jump to

Keyboard shortcuts

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