From a33b11ef5499c9de69dff4cc930f8675ea3269ed Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:14:32 +0200 Subject: [PATCH] Add headers to output when using logs tail --- internal/display/display.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/display/display.go b/internal/display/display.go index 3e059fa4a..b748219f1 100644 --- a/internal/display/display.go +++ b/internal/display/display.go @@ -148,6 +148,17 @@ func (r *Renderer) Stream(data []View, ch <-chan View) { } } + if len(data) > 0 { + header := []string{ + truncate("TYPE", 23), + truncate("DESCRIPTION", 54), + truncate("DATE", 20), + truncate("CONNECTION", 20), + truncate("CLIENT", 20), + } + displayRow(header) + } + for _, v := range data { displayView(v) }