Skip to content

Commit

Permalink
chore(tui): Skip context row if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed May 1, 2024
1 parent b171d1a commit e2aa7af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/actions/dump/dump.go
Expand Up @@ -219,7 +219,7 @@ func (action Dump) summary(err error, took time.Duration, size *util.SizeWriter,
}

t := tui.MinimalTable(r).
Row("Context", action.Context).
RowIfNotEmpty("Context", action.Context).
Row("Namespace", action.Namespace).
Row("Pod", action.DBPod.Name).
RowIfNotEmpty("Username", action.Username).
Expand Down
2 changes: 1 addition & 1 deletion internal/actions/portforward/portforward.go
Expand Up @@ -79,7 +79,7 @@ func (a PortForward) printTable() {
Msg("port forward is ready")

info := tui.MinimalTable(nil).
Row("Context", a.Context).
RowIfNotEmpty("Context", a.Context).
Row("Namespace", a.Namespace).
Row("Pod", a.DBPod.Name)

Expand Down
2 changes: 1 addition & 1 deletion internal/actions/restore/restore.go
Expand Up @@ -227,7 +227,7 @@ func (action Restore) runInDatabasePod(ctx context.Context, r *io.PipeReader, st

func (action Restore) Table() *tui.Table {
return tui.MinimalTable(nil).
Row("Context", action.Context).
RowIfNotEmpty("Context", action.Context).
Row("Namespace", action.Namespace).
Row("Pod", action.DBPod.Name).
RowIfNotEmpty("Username", action.Username).
Expand Down

0 comments on commit e2aa7af

Please sign in to comment.