b5ee62f145
Press enter on any alert to open a full-screen detail pane (viewport). Keybindings in detail mode: a/A acknowledge / unacknowledge (updates immediately) c compose a comment (text input at bottom) [/] cycle comment cursor up/down d delete selected comment (y/N confirmation) s assign placeholder — shows "not yet supported by server" S open stats view: top alerts + by-hour/by-day ASCII bar charts esc back to dashboard API additions: GetAlert, AcknowledgeAlert, UnacknowledgeAlert, GetComments, AddComment, DeleteComment, GetTopAlerts, GetStatsByHour, GetStatsByDay.
46 lines
1.2 KiB
Go
46 lines
1.2 KiB
Go
package tui
|
|
|
|
import "github.com/charmbracelet/lipgloss"
|
|
|
|
var (
|
|
colorPrimary = lipgloss.Color("69") // blue
|
|
colorMuted = lipgloss.Color("240") // gray
|
|
colorFiring = lipgloss.Color("196") // red
|
|
colorResolved = lipgloss.Color("70") // green
|
|
colorAccent = lipgloss.Color("214") // orange
|
|
|
|
styleHeader = lipgloss.NewStyle().
|
|
Bold(true).
|
|
Foreground(colorPrimary).
|
|
Padding(0, 1)
|
|
|
|
styleTabActive = lipgloss.NewStyle().
|
|
Bold(true).
|
|
Foreground(lipgloss.Color("0")).
|
|
Background(colorPrimary).
|
|
Padding(0, 2)
|
|
|
|
styleTabInactive = lipgloss.NewStyle().
|
|
Foreground(colorMuted).
|
|
Padding(0, 2)
|
|
|
|
styleFooter = lipgloss.NewStyle().
|
|
Foreground(colorMuted)
|
|
|
|
styleStatus = lipgloss.NewStyle().
|
|
Foreground(colorAccent).
|
|
Bold(true)
|
|
|
|
styleError = lipgloss.NewStyle().
|
|
Foreground(colorFiring).
|
|
Bold(true)
|
|
|
|
styleFiring = lipgloss.NewStyle().Foreground(colorFiring).Bold(true)
|
|
styleResolved = lipgloss.NewStyle().Foreground(colorResolved)
|
|
styleMuted = lipgloss.NewStyle().Foreground(colorMuted)
|
|
styleAlertName = lipgloss.NewStyle().Bold(true)
|
|
styleBold = lipgloss.NewStyle().Bold(true)
|
|
styleSelected = lipgloss.NewStyle().Foreground(colorPrimary).Bold(true)
|
|
styleAccent = lipgloss.NewStyle().Foreground(colorAccent)
|
|
)
|