From be9afed3b7f13979a4237099478312e53f4aa142 Mon Sep 17 00:00:00 2001 From: "R.I.Pienaar" Date: Thu, 26 Sep 2024 16:42:20 +0200 Subject: [PATCH] Indicate the leader in js watch Signed-off-by: R.I.Pienaar --- cli/server_watch_js_command.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/server_watch_js_command.go b/cli/server_watch_js_command.go index d0b7d6db..7cc99784 100644 --- a/cli/server_watch_js_command.go +++ b/cli/server_watch_js_command.go @@ -229,12 +229,18 @@ func (c *SrvWatchJSCmd) redraw(drawPending bool) error { for _, srv := range matched { js := srv.Stats.JetStream.Stats + name := srv.Server.Name + pending := 0 if srv.Stats.JetStream.Meta != nil { pending = srv.Stats.JetStream.Meta.Pending + if srv.Stats.JetStream.Meta.Leader == name { + name = name + "*" + } } - row := []any{srv.Server.Name, + row := []any{ + name, f(js.HAAssets), fiBytes(js.Memory), fiBytes(js.Store),