feat(tui): single-dashboard layout with sidebar and overlay
Replace 3-tab navigation with a single monitoring dashboard. - Replace tab bar with minimal status line (pulse + counts + version) - Maintenance becomes a toggleable left sidebar (m key) - Compact list: active (●) and scheduled (○) windows - Enter opens full-screen detail with end/delete actions - Settings becomes a centered floating overlay (S key) - Alerts/Nodes/Users sub-sections with left/right navigation - Full CRUD support inside overlay with returnState tracking - Remove currentTab, switchTab, tab constants, tab click zones - Replace deleteTab with deleteKind string for cleaner dispatch - Separate settingsCursor/settingsOffset from main cursor - Panel focus: maint → monitors → logs → detail - Context-sensitive footer key hints per focused panel
This commit was merged in pull request #162.
This commit is contained in:
+12
-9
@@ -84,12 +84,6 @@ const (
|
||||
detailSparkWidth = 40
|
||||
)
|
||||
|
||||
const (
|
||||
tabMonitors = 0
|
||||
tabMaint = 1
|
||||
tabSettings = 2
|
||||
)
|
||||
|
||||
const (
|
||||
sectionAlerts = 0
|
||||
sectionNodes = 1
|
||||
@@ -100,6 +94,7 @@ const (
|
||||
panelMonitors = 0
|
||||
panelLogs = 1
|
||||
panelDetail = 2
|
||||
panelMaint = 3
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -114,7 +109,6 @@ type sessionState int
|
||||
const (
|
||||
stateDashboard sessionState = iota
|
||||
stateLogs
|
||||
stateUsers
|
||||
stateDetail
|
||||
stateAlertDetail
|
||||
stateFormSite
|
||||
@@ -124,12 +118,16 @@ const (
|
||||
stateFormMaint
|
||||
stateHistory
|
||||
stateSLA
|
||||
stateSettings
|
||||
stateMaintDetail
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
state sessionState
|
||||
currentTab int
|
||||
returnState sessionState
|
||||
settingsSection int
|
||||
settingsCursor int
|
||||
settingsOffset int
|
||||
cursor int
|
||||
selectedID int
|
||||
sortColumn int
|
||||
@@ -173,7 +171,9 @@ type Model struct {
|
||||
|
||||
deleteID int
|
||||
deleteName string
|
||||
deleteTab int
|
||||
deleteKind string
|
||||
|
||||
maintDetailID int
|
||||
|
||||
ctx context.Context
|
||||
collapsed map[int]bool
|
||||
@@ -199,6 +199,9 @@ type Model struct {
|
||||
|
||||
logsOpen bool
|
||||
detailOpen bool
|
||||
maintOpen bool
|
||||
maintCursor int
|
||||
maintOffset int
|
||||
detailChanges []models.StateChange
|
||||
detailChangesSiteID int
|
||||
detailDailyDays []monitor.DayReport
|
||||
|
||||
Reference in New Issue
Block a user