Documentation
¶
Index ¶
- func RenderHelpBar(width int, hasSelection, isLoading bool) string
- type APIKeyValidatedMsg
- type AboutModel
- type AlertsModel
- func (m *AlertsModel) ClearDetailLoading()
- func (m AlertsModel) CurrentPage() int
- func (m AlertsModel) HasNextPage() bool
- func (m AlertsModel) HasPrevPage() bool
- func (m AlertsModel) Init() tea.Cmd
- func (m AlertsModel) IsDetailFocused() bool
- func (m AlertsModel) IsDetailLoading() bool
- func (m AlertsModel) IsLoadingAlert(id string) bool
- func (m *AlertsModel) NextPage()
- func (m *AlertsModel) PrevPage()
- func (m AlertsModel) SelectedAlert() *api.Alert
- func (m AlertsModel) SelectedIndex() int
- func (m *AlertsModel) SetAlerts(alerts []api.Alert, pagination api.PaginationInfo)
- func (m *AlertsModel) SetDetailFocused(focused bool)
- func (m *AlertsModel) SetDetailLoading(id string)
- func (m *AlertsModel) SetDimensions(width, height int)
- func (m *AlertsModel) SetError(err string)
- func (m *AlertsModel) SetLoading(loading bool)
- func (m *AlertsModel) SetSpinner(spinner string)
- func (m AlertsModel) Update(msg tea.Msg) (AlertsModel, tea.Cmd)
- func (m *AlertsModel) UpdateAlertDetail(index int, alert *api.Alert)
- func (m AlertsModel) View() string
- type ConfigSavedMsg
- type HelpModel
- type IncidentsModel
- func (m *IncidentsModel) ClearDetailLoading()
- func (m IncidentsModel) CurrentPage() int
- func (m IncidentsModel) HasNextPage() bool
- func (m IncidentsModel) HasPrevPage() bool
- func (m IncidentsModel) Init() tea.Cmd
- func (m IncidentsModel) IsDetailFocused() bool
- func (m IncidentsModel) IsDetailLoading() bool
- func (m IncidentsModel) IsLoadingIncident(id string) bool
- func (m *IncidentsModel) NextPage()
- func (m *IncidentsModel) PrevPage()
- func (m IncidentsModel) SelectedIncident() *api.Incident
- func (m IncidentsModel) SelectedIndex() int
- func (m *IncidentsModel) SetDetailFocused(focused bool)
- func (m *IncidentsModel) SetDetailLoading(id string)
- func (m *IncidentsModel) SetDimensions(width, height int)
- func (m *IncidentsModel) SetError(err string)
- func (m *IncidentsModel) SetIncidents(incidents []api.Incident, pagination api.PaginationInfo)
- func (m *IncidentsModel) SetLoading(loading bool)
- func (m *IncidentsModel) SetSpinner(spinner string)
- func (m IncidentsModel) Update(msg tea.Msg) (IncidentsModel, tea.Cmd)
- func (m *IncidentsModel) UpdateIncidentDetail(index int, incident *api.Incident)
- func (m IncidentsModel) View() string
- type LogsModel
- func (m *LogsModel) Hide()
- func (m LogsModel) Init() tea.Cmd
- func (m *LogsModel) Refresh()
- func (m *LogsModel) SetDimensions(width, height int)
- func (m *LogsModel) Show()
- func (m LogsModel) StartAutoRefresh() tea.Cmd
- func (m *LogsModel) Toggle()
- func (m LogsModel) Update(msg tea.Msg) (LogsModel, tea.Cmd)
- func (m LogsModel) View() string
- type LogsRefreshMsg
- type LogsStatusClearMsg
- type SetupField
- type SetupModel
- func (m *SetupModel) HandleValidationResult(msg APIKeyValidatedMsg)
- func (m SetupModel) Init() tea.Cmd
- func (m SetupModel) IsTesting() bool
- func (m *SetupModel) SetDimensions(width, height int)
- func (m *SetupModel) SetTesting(testing bool)
- func (m SetupModel) Update(msg tea.Msg) (SetupModel, tea.Cmd)
- func (m SetupModel) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderHelpBar ¶
RenderHelpBar renders the bottom help bar hasSelection indicates whether an incident or alert is currently selected isLoading indicates whether data is currently being loaded
Types ¶
type APIKeyValidatedMsg ¶
type AboutModel ¶
type AboutModel struct {
Visible bool
// contains filtered or unexported fields
}
func NewAboutModel ¶
func NewAboutModel(version string) AboutModel
func (*AboutModel) Hide ¶
func (m *AboutModel) Hide()
func (*AboutModel) Show ¶
func (m *AboutModel) Show()
func (*AboutModel) Toggle ¶
func (m *AboutModel) Toggle()
func (AboutModel) View ¶
func (m AboutModel) View() string
type AlertsModel ¶
type AlertsModel struct {
// contains filtered or unexported fields
}
func NewAlertsModel ¶
func NewAlertsModel() AlertsModel
func (*AlertsModel) ClearDetailLoading ¶
func (m *AlertsModel) ClearDetailLoading()
func (AlertsModel) HasNextPage ¶
func (m AlertsModel) HasNextPage() bool
func (AlertsModel) HasPrevPage ¶
func (m AlertsModel) HasPrevPage() bool
func (AlertsModel) Init ¶
func (m AlertsModel) Init() tea.Cmd
func (AlertsModel) IsDetailFocused ¶
func (m AlertsModel) IsDetailFocused() bool
IsDetailFocused returns whether the detail pane has focus
func (AlertsModel) IsDetailLoading ¶
func (m AlertsModel) IsDetailLoading() bool
func (AlertsModel) IsLoadingAlert ¶
func (m AlertsModel) IsLoadingAlert(id string) bool
IsLoadingAlert returns true if the specified alert ID is currently loading
func (*AlertsModel) NextPage ¶
func (m *AlertsModel) NextPage()
func (*AlertsModel) PrevPage ¶
func (m *AlertsModel) PrevPage()
func (AlertsModel) SelectedAlert ¶
func (m AlertsModel) SelectedAlert() *api.Alert
func (AlertsModel) SelectedIndex ¶
func (m AlertsModel) SelectedIndex() int
func (*AlertsModel) SetAlerts ¶
func (m *AlertsModel) SetAlerts(alerts []api.Alert, pagination api.PaginationInfo)
func (*AlertsModel) SetDetailFocused ¶
func (m *AlertsModel) SetDetailFocused(focused bool)
SetDetailFocused sets focus on the detail pane for scrolling
func (*AlertsModel) SetDetailLoading ¶
func (m *AlertsModel) SetDetailLoading(id string)
func (*AlertsModel) SetDimensions ¶
func (m *AlertsModel) SetDimensions(width, height int)
func (*AlertsModel) SetError ¶
func (m *AlertsModel) SetError(err string)
func (*AlertsModel) SetLoading ¶
func (m *AlertsModel) SetLoading(loading bool)
func (*AlertsModel) SetSpinner ¶
func (m *AlertsModel) SetSpinner(spinner string)
func (AlertsModel) Update ¶
func (m AlertsModel) Update(msg tea.Msg) (AlertsModel, tea.Cmd)
func (*AlertsModel) UpdateAlertDetail ¶
func (m *AlertsModel) UpdateAlertDetail(index int, alert *api.Alert)
func (AlertsModel) View ¶
func (m AlertsModel) View() string
type ConfigSavedMsg ¶
type HelpModel ¶
type HelpModel struct {
Visible bool
}
func NewHelpModel ¶
func NewHelpModel() HelpModel
type IncidentsModel ¶
type IncidentsModel struct {
// contains filtered or unexported fields
}
func NewIncidentsModel ¶
func NewIncidentsModel() IncidentsModel
func (*IncidentsModel) ClearDetailLoading ¶
func (m *IncidentsModel) ClearDetailLoading()
func (IncidentsModel) HasNextPage ¶
func (m IncidentsModel) HasNextPage() bool
func (IncidentsModel) HasPrevPage ¶
func (m IncidentsModel) HasPrevPage() bool
func (IncidentsModel) Init ¶
func (m IncidentsModel) Init() tea.Cmd
func (IncidentsModel) IsDetailFocused ¶
func (m IncidentsModel) IsDetailFocused() bool
IsDetailFocused returns whether the detail pane has focus
func (IncidentsModel) IsDetailLoading ¶
func (m IncidentsModel) IsDetailLoading() bool
func (IncidentsModel) IsLoadingIncident ¶
func (m IncidentsModel) IsLoadingIncident(id string) bool
IsLoadingIncident returns true if the specified incident ID is currently loading
func (*IncidentsModel) NextPage ¶
func (m *IncidentsModel) NextPage()
func (*IncidentsModel) PrevPage ¶
func (m *IncidentsModel) PrevPage()
func (IncidentsModel) SelectedIncident ¶
func (m IncidentsModel) SelectedIncident() *api.Incident
func (IncidentsModel) SelectedIndex ¶
func (m IncidentsModel) SelectedIndex() int
func (*IncidentsModel) SetDetailFocused ¶
func (m *IncidentsModel) SetDetailFocused(focused bool)
SetDetailFocused sets focus on the detail pane for scrolling
func (*IncidentsModel) SetDetailLoading ¶
func (m *IncidentsModel) SetDetailLoading(id string)
func (*IncidentsModel) SetDimensions ¶
func (m *IncidentsModel) SetDimensions(width, height int)
func (*IncidentsModel) SetError ¶
func (m *IncidentsModel) SetError(err string)
func (*IncidentsModel) SetIncidents ¶
func (m *IncidentsModel) SetIncidents(incidents []api.Incident, pagination api.PaginationInfo)
func (*IncidentsModel) SetLoading ¶
func (m *IncidentsModel) SetLoading(loading bool)
func (*IncidentsModel) SetSpinner ¶
func (m *IncidentsModel) SetSpinner(spinner string)
func (IncidentsModel) Update ¶
func (m IncidentsModel) Update(msg tea.Msg) (IncidentsModel, tea.Cmd)
func (*IncidentsModel) UpdateIncidentDetail ¶
func (m *IncidentsModel) UpdateIncidentDetail(index int, incident *api.Incident)
func (IncidentsModel) View ¶
func (m IncidentsModel) View() string
type LogsModel ¶
type LogsModel struct {
Visible bool
// contains filtered or unexported fields
}
func NewLogsModel ¶
func NewLogsModel() LogsModel
func (*LogsModel) SetDimensions ¶
func (LogsModel) StartAutoRefresh ¶
StartAutoRefresh returns a command to start the auto-refresh ticker
type LogsStatusClearMsg ¶
type LogsStatusClearMsg struct{}
LogsStatusClearMsg is sent to clear the status message
type SetupField ¶
type SetupField int
const ( FieldEndpoint SetupField = iota FieldAPIKey FieldTimezone FieldLanguage FieldButtons )
type SetupModel ¶
type SetupModel struct {
// contains filtered or unexported fields
}
func NewSetupModel ¶
func NewSetupModel() SetupModel
func NewSetupModelWithConfig ¶
func NewSetupModelWithConfig(cfg *config.Config) SetupModel
NewSetupModelWithConfig creates a setup model pre-populated with existing config values
func (*SetupModel) HandleValidationResult ¶
func (m *SetupModel) HandleValidationResult(msg APIKeyValidatedMsg)
func (SetupModel) Init ¶
func (m SetupModel) Init() tea.Cmd
func (SetupModel) IsTesting ¶
func (m SetupModel) IsTesting() bool
func (*SetupModel) SetDimensions ¶
func (m *SetupModel) SetDimensions(width, height int)
func (*SetupModel) SetTesting ¶
func (m *SetupModel) SetTesting(testing bool)
func (SetupModel) Update ¶
func (m SetupModel) Update(msg tea.Msg) (SetupModel, tea.Cmd)
func (SetupModel) View ¶
func (m SetupModel) View() string