forked from coop-cloud/abra
fix(app): fix app list chaos field
show only the chaos version if the app is a chaos deploy
This commit is contained in:
parent
31ec322c55
commit
27cac81830
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
@ -249,11 +250,15 @@ can take some time.
|
||||
for _, appStat := range serverStat.Apps {
|
||||
tableRow := []string{appStat.Recipe, appStat.Domain}
|
||||
if status {
|
||||
chaosStatus := "unknown"
|
||||
if appStat.ChaosVersion != "unknown" {
|
||||
chaosStatus := appStat.Chaos
|
||||
if chaosStatus != "unknown" {
|
||||
chaosEnabled, err := strconv.ParseBool(chaosStatus)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if chaosEnabled && appStat.ChaosVersion != "unknown" {
|
||||
chaosStatus = appStat.ChaosVersion
|
||||
} else {
|
||||
chaosStatus = appStat.Chaos
|
||||
}
|
||||
}
|
||||
tableRow = append(tableRow, []string{appStat.Status, chaosStatus, appStat.Version, appStat.Upgrade, appStat.AutoUpdate}...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user