feat(tui): inline detail panel below monitors table
Press i to toggle a compact detail panel below the monitors+logs split. Shows status, latency, uptime, state changes, sparkline, and key hints in ~6 lines. Auto-updates when cursor moves between monitors. h/s/e keys work from the inline detail for history, SLA, and edit. Escape closes the panel. No more full-screen detail takeover for the common case. The old stateDetail path remains for h/s sub-views which still go full-screen.
This commit is contained in:
@@ -162,10 +162,22 @@ func (m Model) viewDashboard() string {
|
||||
left := lipgloss.NewStyle().Width(leftW).Render(monitors)
|
||||
sidebar := m.viewLogsSidebar(rightW)
|
||||
right := lipgloss.NewStyle().Width(rightW).Render(sidebar)
|
||||
content = lipgloss.JoinHorizontal(lipgloss.Top, left, right)
|
||||
top := lipgloss.JoinHorizontal(lipgloss.Top, left, right)
|
||||
if m.detailOpen {
|
||||
detail := m.viewDetailInline(availW)
|
||||
content = top + "\n" + detail
|
||||
} else {
|
||||
content = top
|
||||
}
|
||||
} else {
|
||||
m.contentWidth = m.termWidth
|
||||
content = m.viewSitesTab()
|
||||
monitors := m.viewSitesTab()
|
||||
if m.detailOpen {
|
||||
detail := m.viewDetailInline(m.termWidth - chromePadH)
|
||||
content = monitors + "\n" + detail
|
||||
} else {
|
||||
content = monitors
|
||||
}
|
||||
}
|
||||
case tabMaint:
|
||||
m.contentWidth = m.termWidth
|
||||
|
||||
Reference in New Issue
Block a user