From 949dfa50283d38c15dd4824c102fc626c4e0eb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Wed, 22 Jan 2025 08:23:13 +0100 Subject: [PATCH] cluster: Show 'Dashboard URL' or 'Dashboard URLs', but not both --- pkg/cluster/manager/display.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/manager/display.go b/pkg/cluster/manager/display.go index a1f184f46a..9dc5613472 100644 --- a/pkg/cluster/manager/display.go +++ b/pkg/cluster/manager/display.go @@ -832,7 +832,7 @@ func (m *Manager) displayDashboards(ctx context.Context, t *spec.Specification, } if m.logger.GetDisplayMode() == logprinter.DisplayModeJSON && j != nil { j.ClusterMetaInfo.DashboardURL = fmt.Sprintf("%s://%s/dashboard", scheme, addr) - } else { + } else if len(dashboardAddrs) == 1 { fmt.Printf("Dashboard URL: %s\n", color.CyanString("%s://%s/dashboard", scheme, addr)) } } @@ -845,7 +845,9 @@ func (m *Manager) displayDashboards(ctx context.Context, t *spec.Specification, } if m.logger.GetDisplayMode() != logprinter.DisplayModeJSON || j == nil { - fmt.Printf("Dashboard URLs: %s\n", strings.Join(dashboardAddrs, ",")) + if len(dashboardAddrs) > 1 { + fmt.Printf("Dashboard URLs: %s\n", strings.Join(dashboardAddrs, ",")) + } } return nil