widgets

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugView

type DebugView struct {
	*widgets.List
	// contains filtered or unexported fields
}

func NewDebugView

func NewDebugView() *DebugView

func (*DebugView) HandleScroll

func (d *DebugView) HandleScroll(e termui.Event)

func (*DebugView) Printf

func (d *DebugView) Printf(format string, args ...interface{})

type DetailsPanel

type DetailsPanel struct {
	Container *termui.Block
	URLView   *widgets.Paragraph
	Chart     *ResponseChart
	Stats     *StatsTable
	sync.Mutex
}

func NewDetailsPanel

func NewDetailsPanel() *DetailsPanel

func (*DetailsPanel) Draw

func (d *DetailsPanel) Draw(buf *termui.Buffer)

func (*DetailsPanel) GetRect

func (d *DetailsPanel) GetRect() image.Rectangle

func (*DetailsPanel) InitializeChart

func (d *DetailsPanel) InitializeChart(stats []types.HistoricalStat, debug *DebugView)

func (*DetailsPanel) SetRect

func (d *DetailsPanel) SetRect(x1, y1, x2, y2 int)

func (*DetailsPanel) Update

func (d *DetailsPanel) Update(status types.ServiceStatus)

type HelpBar

type HelpBar struct {
	*widgets.Paragraph
}

func NewHelpBar

func NewHelpBar() *HelpBar

func (*HelpBar) UpdateHelp

func (h *HelpBar) UpdateHelp(hasDebug bool, isPaused bool)

type ResponseChart

type ResponseChart struct {
	*widgets.BarChart
	// contains filtered or unexported fields
}

func NewResponseChart

func NewResponseChart() *ResponseChart

func (*ResponseChart) CalculateMaxBars

func (c *ResponseChart) CalculateMaxBars(containerWidth int) int

func (*ResponseChart) InitializeHistory

func (c *ResponseChart) InitializeHistory(stats []types.HistoricalStat, containerWidth int, debug *DebugView)

func (*ResponseChart) InitializeWithCurrentWidth

func (c *ResponseChart) InitializeWithCurrentWidth()

func (*ResponseChart) StoreHistoricalStats

func (c *ResponseChart) StoreHistoricalStats(stats []types.HistoricalStat)

func (*ResponseChart) Update

func (c *ResponseChart) Update(status types.ServiceStatus)

type ServiceList

type ServiceList struct {
	*widgets.List
	// contains filtered or unexported fields
}

func NewServiceList

func NewServiceList() *ServiceList

func (*ServiceList) GetPausedMonitors

func (s *ServiceList) GetPausedMonitors() map[string]bool

func (*ServiceList) GetSelectedIndex

func (s *ServiceList) GetSelectedIndex() int

func (*ServiceList) IsPaused

func (s *ServiceList) IsPaused(serviceName string) bool

func (*ServiceList) MoveSelection

func (s *ServiceList) MoveSelection(delta int, maxIndex int)

func (*ServiceList) TogglePause

func (s *ServiceList) TogglePause(serviceName string)

func (*ServiceList) Update

func (s *ServiceList) Update(services []types.Monitor, currentStatus map[string]types.ServiceStatus)

type StatsTable

type StatsTable struct {
	*widgets.Table
}

func NewStatsTable

func NewStatsTable() *StatsTable

func (*StatsTable) Update

func (s *StatsTable) Update(status types.ServiceStatus)

Jump to

Keyboard shortcuts

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