Documentation
¶
Overview ¶
Package editor provides modal editing components for hosts, triggers, and macros.
Index ¶
- type Field
- type MacroDeleteMsg
- type MacroEditedMsg
- type MacroItem
- type Model
- func (m Model) ConfirmAction() string
- func (m *Model) Hide()
- func (m Model) Host() *zabbix.Host
- func (m Model) Init() tea.Cmd
- func (m Model) IsConfirming() bool
- func (m Model) SelectedMacro() *zabbix.HostMacro
- func (m Model) SelectedTrigger() *zabbix.Trigger
- func (m *Model) SetScreenSize(width, height int)
- func (m *Model) SetStyles(styles *theme.Styles)
- func (m *Model) ShowHostMacros(host *zabbix.Host, macros []zabbix.HostMacro)
- func (m *Model) ShowHostTriggers(host *zabbix.Host, triggers []zabbix.Trigger, selectTriggerID string)
- func (m Model) Type() Type
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- func (m Model) Visible() bool
- type TriggerItem
- type TriggerToggleMsg
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MacroDeleteMsg ¶
MacroDeleteMsg is sent when a macro should be deleted.
type MacroEditedMsg ¶
MacroEditedMsg is sent when a macro value is edited.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the editor modal component.
func (Model) ConfirmAction ¶
ConfirmAction returns the pending confirmation action.
func (Model) IsConfirming ¶
IsConfirming returns true if a confirmation is pending.
func (Model) SelectedMacro ¶
SelectedMacro returns the currently selected macro.
func (Model) SelectedTrigger ¶
SelectedTrigger returns the currently selected trigger.
func (*Model) SetScreenSize ¶
SetScreenSize sets the screen dimensions for centering.
func (*Model) SetStyles ¶ added in v0.5.0
SetStyles updates the component's styles (for runtime theme changes).
func (*Model) ShowHostMacros ¶
ShowHostMacros opens the host macros editor.
func (*Model) ShowHostTriggers ¶
func (m *Model) ShowHostTriggers(host *zabbix.Host, triggers []zabbix.Trigger, selectTriggerID string)
ShowHostTriggers opens the host triggers editor. If selectTriggerID is non-empty, the cursor will be positioned on that trigger.
type TriggerItem ¶
TriggerItem represents a trigger in the trigger list.
type TriggerToggleMsg ¶
TriggerToggleMsg is sent when a trigger should be enabled/disabled.