Skip to content

Commit

Permalink
Merge bbef5fb into fe0832b
Browse files Browse the repository at this point in the history
  • Loading branch information
valaparthvi authored Sep 6, 2022
2 parents fe0832b + bbef5fb commit 7589124
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions pkg/odo/cli/list/component/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,13 @@ func HumanReadableOutput(list api.ResourcesList) {
// If we find our local unpushed component, let's change the output appropriately.
if list.ComponentInDevfile == comp.Name {
name = fmt.Sprintf("* %s", name)

if comp.ManagedBy == "" {
managedBy = "odo"
}
}

if comp.ManagedByVersion != "" {
managedBy += fmt.Sprintf(" (%s)", comp.ManagedByVersion)
}
// If we are managing that component, output it as blue (our logo colour) to indicate it's used by odo
if managedBy == "odo" {
managedBy = text.Colors{text.FgBlue}.Sprintf("odo (%s)", comp.ManagedByVersion)
} else if managedBy != "" && comp.ManagedByVersion != "" {
// this is done to maintain the color of the output
managedBy += fmt.Sprintf("(%s)", comp.ManagedByVersion)
if comp.ManagedBy == "odo" {
managedBy = text.Colors{text.FgBlue}.Sprintf(managedBy)
}

t.AppendRow(table.Row{name, componentType, mode, managedBy})
Expand Down

0 comments on commit 7589124

Please sign in to comment.