release: 2026.05.1 — distributed probing, config-as-code, TUI polish #15

Merged
lerko merged 47 commits from develop into main 2026-05-16 20:03:54 +00:00
Showing only changes of commit 3bc8e31b89 - Show all commits
+18 -4
View File
@@ -598,13 +598,21 @@ func (m Model) viewDashboard() string {
} }
} }
sitesLabel := "Sites" var sitesLabel string
if downCount > 0 { if downCount > 0 {
sitesLabel = fmt.Sprintf("Sites (%d↓)", downCount) sitesLabel = fmt.Sprintf("Sites (%d↓)", downCount)
} else if len(m.sites) > 0 {
sitesLabel = fmt.Sprintf("Sites (%d)", len(m.sites))
} else {
sitesLabel = "Sites"
} }
nodesLabel := "Nodes" var nodesLabel string
if offlineNodes > 0 { if offlineNodes > 0 {
nodesLabel = fmt.Sprintf("Nodes (%d!)", offlineNodes) nodesLabel = fmt.Sprintf("Nodes (%d!)", offlineNodes)
} else if len(m.nodes) > 0 {
nodesLabel = fmt.Sprintf("Nodes (%d)", len(m.nodes))
} else {
nodesLabel = "Nodes"
} }
tabs := []string{sitesLabel, "Alerts", "Logs", nodesLabel} tabs := []string{sitesLabel, "Alerts", "Logs", nodesLabel}
@@ -643,7 +651,13 @@ func (m Model) viewDashboard() string {
} }
upCount := len(m.sites) - downCount upCount := len(m.sites) - downCount
statusParts := []string{fmt.Sprintf("%d/%d UP", upCount, len(m.sites))} var upStr string
if downCount > 0 {
upStr = dangerStyle.Render(fmt.Sprintf("%d/%d UP", upCount, len(m.sites)))
} else {
upStr = specialStyle.Render(fmt.Sprintf("%d/%d UP", upCount, len(m.sites)))
}
statusParts := []string{upStr}
if len(m.nodes) > 0 { if len(m.nodes) > 0 {
online := 0 online := 0
for _, n := range m.nodes { for _, n := range m.nodes {
@@ -653,7 +667,7 @@ func (m Model) viewDashboard() string {
} }
statusParts = append(statusParts, fmt.Sprintf("%d probes", online)) statusParts = append(statusParts, fmt.Sprintf("%d probes", online))
} }
statusLine := subtleStyle.Render(strings.Join(statusParts, " · ")) statusLine := strings.Join(statusParts, subtleStyle.Render(" · "))
var keys string var keys string
switch m.currentTab { switch m.currentTab {