forked from coop-cloud/abra
fix: more meta for listing recipes
This commit is contained in:
parent
d66c558b5c
commit
c0caf14d74
|
@ -3,6 +3,7 @@ package recipe
|
|||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
"coopcloud.tech/abra/cli/formatter"
|
||||
"coopcloud.tech/abra/pkg/catalogue"
|
||||
|
@ -23,15 +24,23 @@ var recipeListCommand = &cli.Command{
|
|||
recipes := catl.Flatten()
|
||||
sort.Sort(catalogue.ByRecipeName(recipes))
|
||||
|
||||
tableCol := []string{"name", "category", "status"}
|
||||
tableCol := []string{"name", "category", "status", "healthcheck", "backups", "email", "SSO"}
|
||||
table := formatter.CreateTable(tableCol)
|
||||
|
||||
for _, recipe := range recipes {
|
||||
status := fmt.Sprintf("%v", recipe.Features.Status)
|
||||
tableRow := []string{recipe.Name, recipe.Category, status}
|
||||
tableRow := []string{
|
||||
recipe.Name,
|
||||
recipe.Category,
|
||||
strconv.Itoa(recipe.Features.Status),
|
||||
recipe.Features.Healthcheck,
|
||||
recipe.Features.Backups,
|
||||
recipe.Features.Email,
|
||||
recipe.Features.SSO,
|
||||
}
|
||||
table.Append(tableRow)
|
||||
}
|
||||
|
||||
table.SetCaption(true, fmt.Sprintf("total recipes: %v", len(recipes)))
|
||||
table.Render()
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue