Skip to content

Commit

Permalink
Merge pull request #1163 from ripienaar/watch_jsz_leader
Browse files Browse the repository at this point in the history
Indicate the leader in js watch
  • Loading branch information
ripienaar authored Sep 26, 2024
2 parents db5dbae + be9afed commit bb1a8f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/server_watch_js_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit bb1a8f2

Please sign in to comment.