Documentation
¶
Overview ¶
Package app contains the main application logic and UI model.
Index ¶
- Constants
- type AcknowledgeResultMsg
- type ClearErrorMsg
- type CloseResultMsg
- type ConnectedMsg
- type DisconnectedMsg
- type ErrorMsg
- type EventsLoadedMsg
- type HostCountsLoadedMsg
- type HostHistoryLoadedMsg
- type HostMacrosLoadedMsg
- type HostTriggersLoadedMsg
- type HostUpdateResultMsg
- type HostsLoadedMsg
- type IgnoreResultMsg
- type ItemsLoadedMsg
- type KeyMap
- type MacroUpdateResultMsg
- type Mode
- type Model
- type Pane
- type ProblemsLoadedMsg
- type RefreshTickMsg
- type TriggerUpdateResultMsg
Constants ¶
const ( TabAlerts = 0 TabHosts = 1 TabEvents = 2 TabGraphs = 3 TabCount = 4 )
Tab constants.
const ( LogoutTimeout = 5 // Seconds to wait for logout on shutdown MinTerminalWidth = 60 // Minimum terminal width for usable UI MinTerminalHeight = 12 // Minimum terminal height for usable UI // Adaptive pane width thresholds NarrowTerminalWidth = 80 // Below this, use narrow proportions StandardTerminalWidth = 120 // Above this, use wide proportions )
Layout constants for UI rendering.
const (
ObjectTypeTrigger = "0" // Trigger-based problem
)
Zabbix object type constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcknowledgeResultMsg ¶
AcknowledgeResultMsg is sent after acknowledging a problem.
type CloseResultMsg ¶ added in v0.6.0
CloseResultMsg is sent after closing a problem.
type ConnectedMsg ¶
ConnectedMsg is sent when successfully connected to Zabbix.
type DisconnectedMsg ¶
type DisconnectedMsg struct {
Err error
}
DisconnectedMsg is sent when disconnected from Zabbix.
type EventsLoadedMsg ¶
EventsLoadedMsg is sent when events are loaded from Zabbix.
type HostCountsLoadedMsg ¶
type HostCountsLoadedMsg struct {
Counts *zabbix.HostCounts
Err error
}
HostCountsLoadedMsg is sent when host counts are loaded from Zabbix.
type HostHistoryLoadedMsg ¶
HostHistoryLoadedMsg is sent when history for a specific host is loaded.
type HostMacrosLoadedMsg ¶
HostMacrosLoadedMsg is sent when macros for a host are loaded.
type HostTriggersLoadedMsg ¶
type HostTriggersLoadedMsg struct {
HostID string
Triggers []zabbix.Trigger
SelectTriggerID string // Optional: pre-select this trigger
Err error
}
HostTriggersLoadedMsg is sent when triggers for a host are loaded.
type HostUpdateResultMsg ¶
type HostUpdateResultMsg struct {
HostID string
Action string // "enable", "disable", "update"
Success bool
Err error
}
HostUpdateResultMsg is sent after a host update operation.
type HostsLoadedMsg ¶
HostsLoadedMsg is sent when hosts are loaded from Zabbix.
type IgnoreResultMsg ¶ added in v0.4.1
type IgnoreResultMsg struct {
Added bool // true if added, false if removed
Message string // status message to display
Err error
}
IgnoreResultMsg is sent after an ignore operation completes.
type ItemsLoadedMsg ¶
ItemsLoadedMsg is sent when items are loaded from Zabbix.
type KeyMap ¶
type KeyMap struct {
// Navigation
Up key.Binding
Down key.Binding
Left key.Binding
Right key.Binding
PageUp key.Binding
PageDown key.Binding
Home key.Binding
End key.Binding
// Tab navigation
NextTab key.Binding
PrevTab key.Binding
Tab1 key.Binding
Tab2 key.Binding
Tab3 key.Binding
Tab4 key.Binding
// Pane navigation
NextPane key.Binding
PrevPane key.Binding
// Actions
Select key.Binding
Acknowledge key.Binding
AckMessage key.Binding
Refresh key.Binding
// Host editing
EditTriggers key.Binding
EditMacros key.Binding
ToggleMonitor key.Binding
// Alert ignoring
Ignore key.Binding
ListIgnores key.Binding
// Alert closing
CloseAlert key.Binding
// Filtering
Filter key.Binding
ClearFilter key.Binding
SeverityFilter key.Binding
// Modes
Command key.Binding
Help key.Binding
Escape key.Binding
Quit key.Binding
}
KeyMap defines all key bindings for the application.
type MacroUpdateResultMsg ¶
type MacroUpdateResultMsg struct {
MacroID string
Action string // "create", "update", "delete"
Success bool
Err error
}
MacroUpdateResultMsg is sent after a macro update operation.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main application model.
type ProblemsLoadedMsg ¶
ProblemsLoadedMsg is sent when problems are loaded from Zabbix.
type RefreshTickMsg ¶
type RefreshTickMsg struct{}
RefreshTickMsg is sent periodically to trigger data refresh.