Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions cmd/hatchet-cli/cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ func runServerStart(cmd *cobra.Command) {
cli.Logger.Fatalf("%v", err)
}

fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, ""))
fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, disableAuth, ""))

if disableAuth && result.Token != "" {
fmt.Println()
fmt.Println(styles.Muted.Render("Worker API token (set HATCHET_CLIENT_TOKEN to this value):"))
fmt.Println(result.Token)
}
}

var stopCmd = &cobra.Command{
Expand Down Expand Up @@ -182,7 +188,7 @@ func startLocalServer(cmd *cobra.Command, profileName string, opts ...docker.Hat
}

// serverStartedView renders the server started message
func serverStartedView(profileName string, dashboardPort, grpcPort int, additionalMessage string) string {
func serverStartedView(profileName string, dashboardPort, grpcPort int, disableAuth bool, additionalMessage string) string {
var lines []string

lines = append(lines, styles.SuccessMessage("Hatchet server started successfully!"))
Expand All @@ -193,7 +199,11 @@ func serverStartedView(profileName string, dashboardPort, grpcPort int, addition
lines = append(lines, styles.KeyValue("gRPC Port", fmt.Sprintf("%d", grpcPort)))
lines = append(lines, "")
lines = append(lines, styles.Success.Render(fmt.Sprintf("Visit the dashboard at http://localhost:%d to get started!", dashboardPort)))
lines = append(lines, styles.Muted.Render("Admin credentials: email 'admin@example.com', password 'Admin123!!'"))
if disableAuth {
lines = append(lines, styles.Muted.Render("Authentication is disabled — no credentials required."))
} else {
lines = append(lines, styles.Muted.Render("Admin credentials: email 'admin@example.com', password 'Admin123!!'"))
}
Comment thread
mnafees marked this conversation as resolved.

if additionalMessage != "" {
lines = append(lines, "")
Expand Down
2 changes: 1 addition & 1 deletion cmd/hatchet-cli/cli/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func startLocalServerAndCreateProfile(cmd *cobra.Command) string {
}

// Show success message
fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, "Starting worker..."))
fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, false, "Starting worker..."))
Comment thread
mnafees marked this conversation as resolved.

return result.ProfileName
}
Expand Down
Loading