From f08f214085474cbffd30d9f165e0d9244921078b Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Mon, 7 Feb 2022 09:53:50 -0800 Subject: [PATCH 1/2] Add toggle for raw bytes Signed-off-by: Waldemar Quevedo --- nats-top.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nats-top.go b/nats-top.go index 40fd2c6..ca75af5 100644 --- a/nats-top.go +++ b/nats-top.go @@ -543,6 +543,15 @@ func StartUI(engine *top.Engine) { } } + if e.Type == ui.EventKey && (e.Ch == 'b') && !(waitingSortOption || waitingLimitOption) { + switch *displayRawBytes { + case true: + *displayRawBytes = false + case false: + *displayRawBytes = true + } + } + if e.Type == ui.EventResize { ui.Body.Width = ui.TermWidth() ui.Body.Align() @@ -577,6 +586,8 @@ s Toggle displaying connection subscriptions. d Toggle activating DNS address lookup for clients. +b Toggle displaying raw bytes. + q Quit nats-top. Press any key to continue... From 28dee0778f83caf1ab9426c59ae908ad69730a84 Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Mon, 7 Feb 2022 13:06:46 -0800 Subject: [PATCH 2/2] Bump version Signed-off-by: Waldemar Quevedo --- nats-top.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nats-top.go b/nats-top.go index ca75af5..a06a70a 100644 --- a/nats-top.go +++ b/nats-top.go @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2021 The NATS Authors +// Copyright (c) 2015-2022 The NATS Authors package main import ( @@ -15,7 +15,7 @@ import ( ui "gopkg.in/gizak/termui.v1" ) -const version = "0.4.0" +const version = "0.5.0" var ( host = flag.String("s", "127.0.0.1", "The nats server host.")