Skip to content

Commit

Permalink
Link to the appropriate explore page when starting explore
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidS-ovm committed Sep 20, 2024
1 parent 765928a commit e469f1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/explore.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ func Explore(cmd *cobra.Command, args []string) error {
multi := pterm.DefaultMultiPrinter

_, _ = multi.Start()
defer func() {
_, _ = multi.Stop()
}()

ctx, oi, token, err := login(ctx, cmd, []string{"request:receive"}, multi.NewWriter())
if err != nil {
Expand All @@ -145,7 +142,12 @@ func Explore(cmd *cobra.Command, args []string) error {
}
defer cleanup()

pterm.Fprinto(multi.NewWriter(), pterm.Success.Sprint("Press any key to stop the sources"))
_, _ = multi.Stop()

pterm.Println()
pterm.Println(fmt.Sprintf("Explore your infrastructure graph at %v/explore", oi.FrontendUrl))
pterm.Println()
pterm.Success.Println("Press any key to stop the sources")
err = keyboard.Listen(func(keyInfo keys.Key) (stop bool, err error) {
return true, nil
})
Expand Down

0 comments on commit e469f1d

Please sign in to comment.