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
10 changes: 5 additions & 5 deletions internal/util/tree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ func newRowDescriptor(obj ctrlclient.Object) rowDescriptor {

if available := tree.GetAvailableCondition(obj); available != nil {
availableColor, availableStatus, availableAge, availableReason, availableMessage := conditionInfo(*available, true)
v.status = availableColor.Sprintf("Available: %s", availableStatus)
v.status = availableColor.Sprintf("%s", availableStatus)
v.reason = availableReason
v.age = availableAge
v.message = availableMessage
Expand All @@ -574,7 +574,7 @@ func newRowDescriptor(obj ctrlclient.Object) rowDescriptor {

if available := tree.GetAvailableCondition(obj); available != nil {
availableColor, availableStatus, availableAge, availableReason, availableMessage := conditionInfo(*available, true)
v.status = availableColor.Sprintf("Available: %s", availableStatus)
v.status = availableColor.Sprintf("%s", availableStatus)
v.reason = availableReason
v.age = availableAge
v.message = availableMessage
Expand Down Expand Up @@ -611,7 +611,7 @@ func newRowDescriptor(obj ctrlclient.Object) rowDescriptor {
v.readyCounters = "0"
if ready := tree.GetReadyCondition(obj); ready != nil {
readyColor, readyStatus, readyAge, readyReason, readyMessage := conditionInfo(*ready, true)
v.status = readyColor.Sprintf("Ready: %s", readyStatus)
v.status = readyColor.Sprintf("%s", readyStatus)
v.reason = readyReason
v.age = readyAge
v.message = readyMessage
Expand All @@ -634,7 +634,7 @@ func newRowDescriptor(obj ctrlclient.Object) rowDescriptor {
// corresponding replica counters.
if ready := tree.GetReadyCondition(obj); ready != nil {
readyColor, readyStatus, readyAge, readyReason, readyMessage := conditionInfo(*ready, true)
v.status = readyColor.Sprintf("Ready: %s", readyStatus)
v.status = readyColor.Sprintf("%s", readyStatus)
v.reason = readyReason
v.age = readyAge
v.message = readyMessage
Expand Down Expand Up @@ -671,7 +671,7 @@ func newRowDescriptor(obj ctrlclient.Object) rowDescriptor {

if ready := tree.GetReadyCondition(obj); ready != nil {
readyColor, readyStatus, readyAge, readyReason, readyMessage := conditionInfo(*ready, true)
v.status = readyColor.Sprintf("Ready: %s", readyStatus)
v.status = readyColor.Sprintf("%s", readyStatus)
v.reason = readyReason
v.age = readyAge
v.message = readyMessage
Expand Down
76 changes: 38 additions & 38 deletions internal/util/tree/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,12 @@ func Test_TreePrefix(t *testing.T) {
return objectTree
}(),
expectPrefix: []string{
"Object/root Available: False NotAvailable",
"│ second line",
"├─Object/child1 Available: False NotAvailable",
"│ second line",
"└─Object/child2 Available: False NotAvailable",
" second line",
"Object/root False NotAvailable",
"│ second line",
"├─Object/child1 False NotAvailable",
"│ second line",
"└─Object/child2 False NotAvailable",
" second line",
},
},
{
Expand Down Expand Up @@ -362,10 +362,10 @@ func Test_TreePrefix(t *testing.T) {
return obectjTree
}(),
expectPrefix: []string{
"Object/root Available: True Available",
"├─Object/child1 Available: True Available",
"└─Object/child2 Available: False NotAvailable",
" │ second line",
"Object/root True Available",
"├─Object/child1 True Available",
"└─Object/child2 False NotAvailable",
" │ second line",
" └─Object/child2.1",
},
},
Expand Down Expand Up @@ -404,16 +404,16 @@ func Test_TreePrefix(t *testing.T) {
return obectjTree
}(),
expectPrefix: []string{
"Object/root Available: True Available",
"├─Object/child1 Available: True Available",
"│ └─Object/child2 Available: False NotAvailable",
"│ │ second line",
"│ └─Object/child3 Available: False NotAvailable",
"│ │ second line",
"│ └─Object/child4 Available: False NotAvailable",
"│ second line",
"└─Object/child5 Available: False NotAvailable",
" second line",
"Object/root True Available",
"├─Object/child1 True Available",
"│ └─Object/child2 False NotAvailable",
"│ │ second line",
"│ └─Object/child3 False NotAvailable",
"│ │ second line",
"│ └─Object/child4 False NotAvailable",
"│ second line",
"└─Object/child5 False NotAvailable",
" second line",
},
},
{
Expand Down Expand Up @@ -447,14 +447,14 @@ func Test_TreePrefix(t *testing.T) {
return obectjTree
}(),
expectPrefix: []string{
"Object/root Available: True Available",
"└─Object/child1 Available: True Available",
" └─Object/child2 Available: False NotAvailable",
" │ second line",
" └─Object/child3 Available: False NotAvailable",
" │ second line",
" └─Object/child4 Available: False NotAvailable",
" second line",
"Object/root True Available",
"└─Object/child1 True Available",
" └─Object/child2 False NotAvailable",
" │ second line",
" └─Object/child3 False NotAvailable",
" │ second line",
" └─Object/child4 False NotAvailable",
" second line",
},
},
{
Expand Down Expand Up @@ -493,16 +493,16 @@ func Test_TreePrefix(t *testing.T) {
return obectjTree
}(),
expectPrefix: []string{
"Object/root Available: True Available",
"├─Object/child1 Available: True Available",
"├─Object/child2 Available: False NotAvailable",
"│ │ second line",
"│ └─Object/child2.1 Available: False NotAvailable",
"│ second line",
"└─Object/child3 Available: False NotAvailable",
" │ second line",
" └─Object/child3.1 Available: False NotAvailable",
" second line",
"Object/root True Available",
"├─Object/child1 True Available",
"├─Object/child2 False NotAvailable",
"│ │ second line",
"│ └─Object/child2.1 False NotAvailable",
"│ second line",
"└─Object/child3 False NotAvailable",
" │ second line",
" └─Object/child3.1 False NotAvailable",
" second line",
},
},
}
Expand Down