refactor(tui): replace database ID column with row counter

Display sequential # instead of internal database IDs in sites, alerts,
and users tables for a cleaner view without gaps from deleted records.
This commit is contained in:
2026-05-14 20:57:03 -04:00
parent e97780ad38
commit cfcd71dabe
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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 {