From d5979436c189ebd171b6a51ecaa3e446b70cbb80 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 7 Mar 2023 12:49:59 +0100 Subject: [PATCH] review: merge chaos + chaos_version column --- cli/app/list.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cli/app/list.go b/cli/app/list.go index 55c89fbbe..e3abe77b3 100644 --- a/cli/app/list.go +++ b/cli/app/list.go @@ -241,7 +241,7 @@ can take some time. tableCol := []string{"recipe", "domain"} if status { - tableCol = append(tableCol, []string{"status", "chaos", "chaos version", "version", "upgrade", "autoupdate"}...) + tableCol = append(tableCol, []string{"status", "chaos", "version", "upgrade", "autoupdate"}...) } table := formatter.CreateTable(tableCol) @@ -249,7 +249,13 @@ can take some time. for _, appStat := range serverStat.Apps { tableRow := []string{appStat.Recipe, appStat.Domain} if status { - tableRow = append(tableRow, []string{appStat.Status, appStat.Chaos, appStat.ChaosVersion, appStat.Version, appStat.Upgrade, appStat.AutoUpdate}...) + chaosStatus := "unknown" + if appStat.ChaosVersion != "unknown" { + chaosStatus = appStat.Chaos + appStat.ChaosVersion + } else { + chaosStatus = appStat.Chaos + } + tableRow = append(tableRow, []string{appStat.Status, chaosStatus, appStat.Version, appStat.Upgrade, appStat.AutoUpdate}...) } table.Append(tableRow) }