fix/feat: UX polish, security fixes, groups #2

Merged
lerko merged 3 commits from fix/polish-ux-safety into develop 2026-05-15 01:17:59 +00:00
3 changed files with 6 additions and 6 deletions
Showing only changes of commit cfcd71dabe - Show all commits
+2 -2
View File
@@ -108,7 +108,7 @@ func (m Model) viewAlertsTab() string {
for i := m.tableOffset; i < end; i++ { for i := m.tableOffset; i < end; i++ {
alert := m.alerts[i] alert := m.alerts[i]
rows = append(rows, []string{ 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)), m.zones.Mark(fmt.Sprintf("alert-%d", i), limitStr(alert.Name, 15)),
fmtAlertType(alert.Type), fmtAlertType(alert.Type),
fmtAlertConfig(struct { fmtAlertConfig(struct {
@@ -127,7 +127,7 @@ func (m Model) viewAlertsTab() string {
Border(lipgloss.RoundedBorder()). Border(lipgloss.RoundedBorder()).
BorderStyle(alertBorderStyle). BorderStyle(alertBorderStyle).
Width(tableWidth). Width(tableWidth).
Headers("ID", "NAME", "TYPE", "CONFIG"). Headers("#", "NAME", "TYPE", "CONFIG").
Rows(rows...). Rows(rows...).
StyleFunc(func(row, col int) lipgloss.Style { StyleFunc(func(row, col int) lipgloss.Style {
if row == table.HeaderRow { if row == table.HeaderRow {
+2 -2
View File
@@ -234,7 +234,7 @@ func (m Model) viewSitesTab() string {
} }
rows = append(rows, []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)), m.zones.Mark(fmt.Sprintf("site-%d", i), limitStr(site.Name, 13)),
site.Type, site.Type,
fmtStatus(site.Status, site.Paused), fmtStatus(site.Status, site.Paused),
@@ -255,7 +255,7 @@ func (m Model) viewSitesTab() string {
Border(lipgloss.RoundedBorder()). Border(lipgloss.RoundedBorder()).
BorderStyle(siteBorderStyle). BorderStyle(siteBorderStyle).
Width(tableWidth). Width(tableWidth).
Headers("ID", "NAME", "TYPE", "STATUS", "LATENCY", "UPTIME", "HISTORY", "SSL", "RETRY"). Headers("#", "NAME", "TYPE", "STATUS", "LATENCY", "UPTIME", "HISTORY", "SSL", "RETRY").
Rows(rows...). Rows(rows...).
StyleFunc(func(row, col int) lipgloss.Style { StyleFunc(func(row, col int) lipgloss.Style {
if row == table.HeaderRow { if row == table.HeaderRow {
+2 -2
View File
@@ -64,7 +64,7 @@ func (m Model) viewUsersTab() string {
for i := m.tableOffset; i < end; i++ { for i := m.tableOffset; i < end; i++ {
u := m.users[i] u := m.users[i]
rows = append(rows, []string{ 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)), m.zones.Mark(fmt.Sprintf("user-%d", i), limitStr(u.Username, 15)),
fmtRole(u.Role), fmtRole(u.Role),
fmtKey(u.PublicKey), fmtKey(u.PublicKey),
@@ -80,7 +80,7 @@ func (m Model) viewUsersTab() string {
Border(lipgloss.RoundedBorder()). Border(lipgloss.RoundedBorder()).
BorderStyle(userBorderStyle). BorderStyle(userBorderStyle).
Width(tableWidth). Width(tableWidth).
Headers("ID", "USERNAME", "ROLE", "PUBLIC KEY"). Headers("#", "USERNAME", "ROLE", "PUBLIC KEY").
Rows(rows...). Rows(rows...).
StyleFunc(func(row, col int) lipgloss.Style { StyleFunc(func(row, col int) lipgloss.Style {
if row == table.HeaderRow { if row == table.HeaderRow {