Documentation
¶
Index ¶
- func RenderHelpBar(width int, hasSelection, isLoading, isIncidentsTab bool, ...) string
- type APIKeyValidatedMsg
- type AboutModel
- type AlertsModel
- func (m *AlertsModel) ClearDetailLoading()
- func (m AlertsModel) CurrentPage() int
- func (m AlertsModel) GetDetailPlainText() string
- 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) SetLayout(layout string)
- func (m *AlertsModel) SetLoading(loading bool)
- func (m *AlertsModel) SetSpinner(spinner string)
- func (m AlertsModel) TotalCount() int
- func (m AlertsModel) TotalPages() int
- 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 ConfigField
- type ConfigSavedMsg
- type ConnectionField
- type ConnectionSavedMsg
- type HelpModel
- type IncidentsModel
- func (m *IncidentsModel) ClearDetailLoading()
- func (m IncidentsModel) CurrentPage() int
- func (m IncidentsModel) GetDetailPlainText() string
- func (m IncidentsModel) GetSortInfo() string
- func (m IncidentsModel) GetSortParam() string
- func (m *IncidentsModel) HandleSortMenuKey(key string) bool
- 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) IsSortMenuVisible() bool
- func (m *IncidentsModel) NextPage()
- func (m *IncidentsModel) PrevPage()
- func (m IncidentsModel) RenderSortMenu() string
- 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) SetLayout(layout string)
- func (m *IncidentsModel) SetLoading(loading bool)
- func (m *IncidentsModel) SetSort(field SortField) bool
- func (m *IncidentsModel) SetSpinner(spinner string)
- func (m *IncidentsModel) ToggleSortMenu()
- func (m IncidentsModel) TotalCount() int
- func (m IncidentsModel) TotalPages() int
- 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 Panel
- type PreferencesSavedMsg
- type SetupField
- type SetupModel
- func (m SetupModel) ActivePanel() Panel
- func (m SetupModel) ButtonIndex() int
- func (m SetupModel) FocusIndex() SetupField
- func (m *SetupModel) HandleConnectionSaved(msg ConnectionSavedMsg)
- func (m *SetupModel) HandlePreferencesSaved(msg PreferencesSavedMsg)
- func (m *SetupModel) HandleValidationResult(msg APIKeyValidatedMsg)
- func (m SetupModel) Init() tea.Cmd
- func (m SetupModel) IsConfigSaved() bool
- func (m SetupModel) IsConnectionSaved() bool
- func (m SetupModel) IsTesting() bool
- func (m SetupModel) LanguageIndex() int
- func (m SetupModel) LayoutIndex() int
- func (m *SetupModel) SetDimensions(width, height int)
- func (m *SetupModel) SetTesting(testing bool)
- func (m SetupModel) TimezoneIndex() int
- func (m SetupModel) Update(msg tea.Msg) (SetupModel, tea.Cmd)
- func (m SetupModel) View() string
- type SortField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderHelpBar ¶
func RenderHelpBar(width int, hasSelection, isLoading, isIncidentsTab bool, currentPage, totalPages, totalCount int) string
RenderHelpBar renders the bottom help bar hasSelection indicates whether an incident or alert is currently selected isLoading indicates whether data is currently being loaded isIncidentsTab indicates whether we're on the incidents tab (for sorting hints) currentPage, totalPages, totalCount are for pagination display
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) GetDetailPlainText ¶ added in v0.2.0
func (m AlertsModel) GetDetailPlainText() string
GetDetailPlainText returns the detail panel content as plain text for clipboard
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) SetLayout ¶ added in v0.2.0
func (m *AlertsModel) SetLayout(layout string)
SetLayout sets the layout direction (horizontal or vertical)
func (*AlertsModel) SetLoading ¶
func (m *AlertsModel) SetLoading(loading bool)
func (*AlertsModel) SetSpinner ¶
func (m *AlertsModel) SetSpinner(spinner string)
func (AlertsModel) TotalCount ¶ added in v0.2.0
func (m AlertsModel) TotalCount() int
func (AlertsModel) TotalPages ¶ added in v0.2.0
func (m AlertsModel) TotalPages() int
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 ConfigField ¶ added in v0.2.0
type ConfigField int
Config panel fields
const ( ConfigFieldTimezone ConfigField = iota ConfigFieldLanguage ConfigFieldLayout ConfigFieldButton )
type ConfigSavedMsg ¶
type ConnectionField ¶ added in v0.2.0
type ConnectionField int
Connection panel fields
const ( ConnFieldEndpoint ConnectionField = iota ConnFieldAPIKey ConnFieldButtons )
type ConnectionSavedMsg ¶ added in v0.2.0
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) GetDetailPlainText ¶ added in v0.2.0
func (m IncidentsModel) GetDetailPlainText() string
GetDetailPlainText returns the detail panel content as plain text for clipboard
func (IncidentsModel) GetSortInfo ¶ added in v0.2.0
func (m IncidentsModel) GetSortInfo() string
GetSortInfo returns a string describing the current sort
func (IncidentsModel) GetSortParam ¶ added in v0.2.0
func (m IncidentsModel) GetSortParam() string
GetSortParam returns the API sort parameter string based on current sort state Returns empty string if sorting is disabled
func (*IncidentsModel) HandleSortMenuKey ¶ added in v0.2.0
func (m *IncidentsModel) HandleSortMenuKey(key string) bool
HandleSortMenuKey handles keyboard input for the sort menu Returns true if sorting changed and a reload is needed
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) IsSortMenuVisible ¶ added in v0.2.0
func (m IncidentsModel) IsSortMenuVisible() bool
IsSortMenuVisible returns whether the sort menu is visible
func (*IncidentsModel) NextPage ¶
func (m *IncidentsModel) NextPage()
func (*IncidentsModel) PrevPage ¶
func (m *IncidentsModel) PrevPage()
func (IncidentsModel) RenderSortMenu ¶ added in v0.2.0
func (m IncidentsModel) RenderSortMenu() string
RenderSortMenu renders the sort menu overlay
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) SetLayout ¶ added in v0.2.0
func (m *IncidentsModel) SetLayout(layout string)
SetLayout sets the layout direction (horizontal or vertical)
func (*IncidentsModel) SetLoading ¶
func (m *IncidentsModel) SetLoading(loading bool)
func (*IncidentsModel) SetSort ¶ added in v0.2.0
func (m *IncidentsModel) SetSort(field SortField) bool
SetSort sets the sort field and direction Returns true if the field changed (requiring a reload from API)
func (*IncidentsModel) SetSpinner ¶
func (m *IncidentsModel) SetSpinner(spinner string)
func (*IncidentsModel) ToggleSortMenu ¶ added in v0.2.0
func (m *IncidentsModel) ToggleSortMenu()
ToggleSortMenu toggles the visibility of the sort menu
func (IncidentsModel) TotalCount ¶ added in v0.2.0
func (m IncidentsModel) TotalCount() int
func (IncidentsModel) TotalPages ¶ added in v0.2.0
func (m IncidentsModel) TotalPages() int
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 PreferencesSavedMsg ¶ added in v0.2.0
type SetupField ¶
type SetupField int
SetupField is kept for backward compatibility with tests
const ( FieldEndpoint SetupField = iota FieldAPIKey FieldTimezone FieldLanguage FieldLayout 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) ActivePanel ¶ added in v0.2.0
func (m SetupModel) ActivePanel() Panel
func (SetupModel) ButtonIndex ¶ added in v0.2.0
func (m SetupModel) ButtonIndex() int
func (SetupModel) FocusIndex ¶ added in v0.2.0
func (m SetupModel) FocusIndex() SetupField
Backward compatibility methods for tests
func (*SetupModel) HandleConnectionSaved ¶ added in v0.2.0
func (m *SetupModel) HandleConnectionSaved(msg ConnectionSavedMsg)
func (*SetupModel) HandlePreferencesSaved ¶ added in v0.2.0
func (m *SetupModel) HandlePreferencesSaved(msg PreferencesSavedMsg)
func (*SetupModel) HandleValidationResult ¶
func (m *SetupModel) HandleValidationResult(msg APIKeyValidatedMsg)
func (SetupModel) Init ¶
func (m SetupModel) Init() tea.Cmd
func (SetupModel) IsConfigSaved ¶ added in v0.2.0
func (m SetupModel) IsConfigSaved() bool
func (SetupModel) IsConnectionSaved ¶ added in v0.2.0
func (m SetupModel) IsConnectionSaved() bool
func (SetupModel) IsTesting ¶
func (m SetupModel) IsTesting() bool
func (SetupModel) LanguageIndex ¶ added in v0.2.0
func (m SetupModel) LanguageIndex() int
func (SetupModel) LayoutIndex ¶ added in v0.2.0
func (m SetupModel) LayoutIndex() int
func (*SetupModel) SetDimensions ¶
func (m *SetupModel) SetDimensions(width, height int)
func (*SetupModel) SetTesting ¶
func (m *SetupModel) SetTesting(testing bool)
func (SetupModel) TimezoneIndex ¶ added in v0.2.0
func (m SetupModel) TimezoneIndex() int
func (SetupModel) Update ¶
func (m SetupModel) Update(msg tea.Msg) (SetupModel, tea.Cmd)
func (SetupModel) View ¶
func (m SetupModel) View() string