Skip to content

Commit

Permalink
fix: format running context ui
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Jul 10, 2024
1 parent b1b25cc commit 235dfb7
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,29 @@ func printPrettyOutput(ui *ui.UI, execution testkube.TestWorkflowExecution) {
for _, ctx := range execution.RunningContext {
ui.Warn("Running context: ")
if ctx.Interface_ != nil {
ui.Warn("Type: ", string(*ctx.Interface_))
ui.Warn("Interface: ", string(*ctx.Interface_))
}
if ctx.Actor != nil {
ui.Warn("Context: ", string(*ctx.Actor))
ui.Warn("Actor: ", string(*ctx.Actor))
}
if ctx.Caller != nil {
ui.Warn("Caller: ")
if ctx.Caller.CallerResourceType != nil {
ui.Warn("Resource type: ", string(*ctx.Caller.CallerResourceType))
ui.Warn("Resource type: ", string(*ctx.Caller.CallerResourceType))
}
ui.Warn("Resource name: ", ctx.Caller.CallerResourceName)
if ctx.Caller.CallerResourceExecutionID != "" {
ui.Warn("Execution ID: ", ctx.Caller.CallerResourceExecutionID)
}
if ctx.Caller.FullExecutionPath != "" {
ui.Warn("Full execution path: ", ctx.Caller.FullExecutionPath)
}
ui.Warn("Resource name: ", string(ctx.Caller.CallerResourceName))
ui.Warn("Resource execution ID: ", string(ctx.Caller.CallerResourceExecutionID))
ui.Warn("Full execution path: ", string(ctx.Caller.FullExecutionPath))
}
}
if execution.Result != nil && execution.Result.Status != nil {
ui.Warn("Status: ", string(*execution.Result.Status))
if !execution.Result.QueuedAt.IsZero() {
ui.Warn("Queued at: ", execution.Result.QueuedAt.String())
ui.Warn("Queued at: ", execution.Result.QueuedAt.String())
}
if !execution.Result.StartedAt.IsZero() {
ui.Warn("Started at: ", execution.Result.StartedAt.String())
Expand Down

0 comments on commit 235dfb7

Please sign in to comment.