further table streamlining: work with new table api everywhere

This commit is contained in:
2026-08-09 21:48:03 +02:00
parent b49153bd38
commit 2841a94fe5
27 changed files with 271 additions and 249 deletions

View File

@@ -104,8 +104,8 @@ func NodeShow(conf *cfg.Config, nodename string) error {
for id, info := range res.Nodes {
stat := stats.Nodes[id]
table := printer.NewTable(conf).WithSize(2, 0)
table.Addheaders(nodename+" property", "value")
table := printer.NewTable(conf).WithSize(2, 0).
WithHeaders(nodename+" property", "value")
roles := make([]string, len(info.Roles))
for idx, role := range info.Roles {
@@ -197,8 +197,8 @@ func NodeClients(conf *cfg.Config, nodename string) error {
slog.Debug("ES result", "stat", stats)
table := printer.NewTable(conf).WithSize(5, 0)
table.Addheaders("agent", "id", "when", "from host", "url")
table := printer.NewTable(conf).WithSize(5, 0).
WithHeaders("agent", "id", "when", "from host", "url")
for _, stat := range stats.Nodes {
for _, client := range stat.Http.Clients {