views

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderHelpBar

func RenderHelpBar(width int, hasSelection, isLoading bool) 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

Types

type APIKeyValidatedMsg

type APIKeyValidatedMsg struct {
	Valid bool
	Error string
}

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) CurrentPage

func (m AlertsModel) CurrentPage() int

Pagination methods

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 ConfigSavedMsg struct {
	Success bool
	Error   string
}

type HelpModel

type HelpModel struct {
	Visible bool
}

func NewHelpModel

func NewHelpModel() HelpModel

func (*HelpModel) Hide

func (m *HelpModel) Hide()

func (*HelpModel) Show

func (m *HelpModel) Show()

func (*HelpModel) Toggle

func (m *HelpModel) Toggle()

func (HelpModel) View

func (m HelpModel) View() string

type IncidentsModel

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

func NewIncidentsModel

func NewIncidentsModel() IncidentsModel

func (*IncidentsModel) ClearDetailLoading

func (m *IncidentsModel) ClearDetailLoading()

func (IncidentsModel) CurrentPage

func (m IncidentsModel) CurrentPage() int

Pagination methods

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) Hide

func (m *LogsModel) Hide()

func (LogsModel) Init

func (m LogsModel) Init() tea.Cmd

func (*LogsModel) Refresh

func (m *LogsModel) Refresh()

func (*LogsModel) SetDimensions

func (m *LogsModel) SetDimensions(width, height int)

func (*LogsModel) Show

func (m *LogsModel) Show()

func (LogsModel) StartAutoRefresh

func (m LogsModel) StartAutoRefresh() tea.Cmd

StartAutoRefresh returns a command to start the auto-refresh ticker

func (*LogsModel) Toggle

func (m *LogsModel) Toggle()

func (LogsModel) Update

func (m LogsModel) Update(msg tea.Msg) (LogsModel, tea.Cmd)

func (LogsModel) View

func (m LogsModel) View() string

type LogsRefreshMsg

type LogsRefreshMsg struct{}

LogsRefreshMsg triggers a log refresh

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

Jump to

Keyboard shortcuts

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