Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Keys = KeyMap{ Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "down"), ), Left: key.NewBinding( key.WithKeys("left", "h"), key.WithHelp("←/h", "previous tab"), ), Right: key.NewBinding( key.WithKeys("right", "l"), key.WithHelp("→/l", "next tab"), ), Enter: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "select"), ), Back: key.NewBinding( key.WithKeys("esc"), key.WithHelp("esc", "back"), ), Quit: key.NewBinding( key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit"), ), Tab: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "switch tab"), ), Refresh: key.NewBinding( key.WithKeys("r"), key.WithHelp("r", "refresh"), ), AddSite: key.NewBinding( key.WithKeys("a"), key.WithHelp("a", "add site"), ), }
Keys is the default keymap
Functions ¶
This section is empty.
Types ¶
type ClearStatusMsg ¶
type ClearStatusMsg struct{}
ClearStatusMsg is sent to clear the status message
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
Left key.Binding
Right key.Binding
Enter key.Binding
Back key.Binding
Quit key.Binding
Tab key.Binding
Refresh key.Binding
AddSite key.Binding
}
KeyMap defines the keybindings for the application
type Model ¶
type Model struct {
Sites []Site
Table *table.Table
Cursor int
Selected int
MenuMode bool
ActiveTab TabType
Quitting bool
Err error
StatusMsg string
ShowStatus bool
IsError bool
Spinner spinner.Model
Loading bool
Width int
Height int
Viewport viewport.Model
CPUHistory []float64
MemHistory []float64
NetHistory []float64
RequestHistory []float64
Progress progress.Model
LastUpdate time.Time
MetricsHistory interface{} // Will store *nginx.MetricsHistory
LastNetworkIn float64 // Track last network in for rate calculation
LastNetworkOut float64 // Track last network out for rate calculation
// Form state
ShowAddSiteForm bool
AddSiteForm interface{} // Will store *huh.Form
AddSiteConfig interface{} // Will store *forms.SiteConfig
}
Model represents the application state
type SiteCreatedMsg ¶
SiteCreatedMsg is sent when a new site is successfully created
Click to show internal directories.
Click to hide internal directories.