diff --git a/internal/tui/tab_alerts.go b/internal/tui/tab_alerts.go index 4aa9c54..8a0447b 100644 --- a/internal/tui/tab_alerts.go +++ b/internal/tui/tab_alerts.go @@ -108,7 +108,7 @@ func (m Model) viewAlertsTab() string { for i := m.tableOffset; i < end; i++ { alert := m.alerts[i] rows = append(rows, []string{ - fmt.Sprintf("%d", alert.ID), + fmt.Sprintf("%d", i+1), m.zones.Mark(fmt.Sprintf("alert-%d", i), limitStr(alert.Name, 15)), fmtAlertType(alert.Type), fmtAlertConfig(struct { @@ -127,7 +127,7 @@ func (m Model) viewAlertsTab() string { Border(lipgloss.RoundedBorder()). BorderStyle(alertBorderStyle). Width(tableWidth). - Headers("ID", "NAME", "TYPE", "CONFIG"). + Headers("#", "NAME", "TYPE", "CONFIG"). Rows(rows...). StyleFunc(func(row, col int) lipgloss.Style { if row == table.HeaderRow { diff --git a/internal/tui/tab_sites.go b/internal/tui/tab_sites.go index d09c184..fecd183 100644 --- a/internal/tui/tab_sites.go +++ b/internal/tui/tab_sites.go @@ -234,7 +234,7 @@ func (m Model) viewSitesTab() string { } rows = append(rows, []string{ - strconv.Itoa(site.ID), + strconv.Itoa(i + 1), m.zones.Mark(fmt.Sprintf("site-%d", i), limitStr(site.Name, 13)), site.Type, fmtStatus(site.Status, site.Paused), @@ -255,7 +255,7 @@ func (m Model) viewSitesTab() string { Border(lipgloss.RoundedBorder()). BorderStyle(siteBorderStyle). Width(tableWidth). - Headers("ID", "NAME", "TYPE", "STATUS", "LATENCY", "UPTIME", "HISTORY", "SSL", "RETRY"). + Headers("#", "NAME", "TYPE", "STATUS", "LATENCY", "UPTIME", "HISTORY", "SSL", "RETRY"). Rows(rows...). StyleFunc(func(row, col int) lipgloss.Style { if row == table.HeaderRow { diff --git a/internal/tui/tab_users.go b/internal/tui/tab_users.go index 14f9a93..4858b7c 100644 --- a/internal/tui/tab_users.go +++ b/internal/tui/tab_users.go @@ -64,7 +64,7 @@ func (m Model) viewUsersTab() string { for i := m.tableOffset; i < end; i++ { u := m.users[i] rows = append(rows, []string{ - fmt.Sprintf("%d", u.ID), + fmt.Sprintf("%d", i+1), m.zones.Mark(fmt.Sprintf("user-%d", i), limitStr(u.Username, 15)), fmtRole(u.Role), fmtKey(u.PublicKey), @@ -80,7 +80,7 @@ func (m Model) viewUsersTab() string { Border(lipgloss.RoundedBorder()). BorderStyle(userBorderStyle). Width(tableWidth). - Headers("ID", "USERNAME", "ROLE", "PUBLIC KEY"). + Headers("#", "USERNAME", "ROLE", "PUBLIC KEY"). Rows(rows...). StyleFunc(func(row, col int) lipgloss.Style { if row == table.HeaderRow {