From 78092c0e7be5dfb210991f5cbc69b0184f79a2df Mon Sep 17 00:00:00 2001 From: xhe Date: Fri, 25 Aug 2023 18:32:06 +0800 Subject: [PATCH] playground: refine ready message (#2262) --- components/playground/main.go | 2 +- components/playground/playground.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/playground/main.go b/components/playground/main.go index c94b06b596..2bae3ecc1e 100644 --- a/components/playground/main.go +++ b/components/playground/main.go @@ -310,7 +310,7 @@ If you'd like to use a TiDB version other than %s, cancel and retry with the fol rootCmd.Flags().StringVar(&options.TiCDC.Host, "ticdc.host", "", "Playground TiCDC host. If not provided, TiDB will still use `host` flag as its host") rootCmd.Flags().IntVar(&options.TiCDC.Port, "ticdc.port", 0, "Playground TiCDC port. If not provided, TiCDC will use 8300 as its port") rootCmd.Flags().StringVar(&options.TiProxy.Host, "tiproxy.host", "", "Playground TiProxy host. If not provided, TiProxy will still use `host` flag as its host") - rootCmd.Flags().IntVar(&options.TiProxy.Port, "tiproxy.port", 0, "Playground TiProxy port. If not provided, TiProxy will use 4000 as its port") + rootCmd.Flags().IntVar(&options.TiProxy.Port, "tiproxy.port", 0, "Playground TiProxy port. If not provided, TiProxy will use 6000 as its port") rootCmd.Flags().StringVar(&options.TiDB.ConfigPath, "db.config", "", "TiDB instance configuration file") rootCmd.Flags().StringVar(&options.TiKV.ConfigPath, "kv.config", "", "TiKV instance configuration file") diff --git a/components/playground/playground.go b/components/playground/playground.go index 5401918c13..d814422a81 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -746,7 +746,12 @@ func (p *Playground) waitAllDBUp() ([]string, []string) { if len(p.tidbs) > 0 { var wg sync.WaitGroup var tidbMu, tiproxyMu sync.Mutex - bars := progress.NewMultiBar(color.YellowString("Waiting for tidb and tiproxy instances ready")) + var bars *progress.MultiBar + if len(p.tiproxys) > 0 { + bars = progress.NewMultiBar(color.YellowString("Waiting for tidb and tiproxy instances ready")) + } else { + bars = progress.NewMultiBar(color.YellowString("Waiting for tidb instances ready")) + } for _, db := range p.tidbs { wg.Add(1) prefix := color.YellowString(db.Addr())