Skip to content

Commit

Permalink
Merge pull request #11071 from MUzairS15/MUzairS15/design-view
Browse files Browse the repository at this point in the history
generate view link for the deployed design
  • Loading branch information
leecalcote committed May 31, 2024
2 parents 6c15f97 + 965b07e commit bacc546
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server/handlers/design_engine_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ func (h *Handler) PatternFileHandler(
"summary": response,
}

event := eventBuilder.WithSeverity(events.Informational).WithDescription(description).WithMetadata(metadata).Build()
serverURL, _ := r.Context().Value(models.MesheryServerURL).(string)

if action == "deploy" {
viewLink := fmt.Sprintf("%s/extension/meshmap?mode=visualize&design=%s", serverURL, patternID)
description = fmt.Sprintf("%s. View deployed design %s", description, viewLink)
}

event := eventBuilder.WithSeverity(events.Success).WithDescription(description).WithMetadata(metadata).Build()
_ = provider.PersistEvent(event)
go func() {
h.config.EventBroadcaster.Publish(userID, event)
Expand Down

0 comments on commit bacc546

Please sign in to comment.