forked from toolshed/abra
refactor(recipe): remove remaining usage of old recipe struct
This commit is contained in:
@ -16,28 +16,34 @@ import (
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
var status bool
|
||||
var statusFlag = &cli.BoolFlag{
|
||||
Name: "status, S",
|
||||
Usage: "Show app deployment status",
|
||||
Destination: &status,
|
||||
}
|
||||
var (
|
||||
status bool
|
||||
statusFlag = &cli.BoolFlag{
|
||||
Name: "status, S",
|
||||
Usage: "Show app deployment status",
|
||||
Destination: &status,
|
||||
}
|
||||
)
|
||||
|
||||
var recipeFilter string
|
||||
var recipeFlag = &cli.StringFlag{
|
||||
Name: "recipe, r",
|
||||
Value: "",
|
||||
Usage: "Show apps of a specific recipe",
|
||||
Destination: &recipeFilter,
|
||||
}
|
||||
var (
|
||||
recipeFilter string
|
||||
recipeFlag = &cli.StringFlag{
|
||||
Name: "recipe, r",
|
||||
Value: "",
|
||||
Usage: "Show apps of a specific recipe",
|
||||
Destination: &recipeFilter,
|
||||
}
|
||||
)
|
||||
|
||||
var listAppServer string
|
||||
var listAppServerFlag = &cli.StringFlag{
|
||||
Name: "server, s",
|
||||
Value: "",
|
||||
Usage: "Show apps of a specific server",
|
||||
Destination: &listAppServer,
|
||||
}
|
||||
var (
|
||||
listAppServer string
|
||||
listAppServerFlag = &cli.StringFlag{
|
||||
Name: "server, s",
|
||||
Value: "",
|
||||
Usage: "Show apps of a specific server",
|
||||
Destination: &listAppServer,
|
||||
}
|
||||
)
|
||||
|
||||
type appStatus struct {
|
||||
Server string `json:"server"`
|
||||
@ -130,7 +136,7 @@ can take some time.
|
||||
}
|
||||
}
|
||||
|
||||
if app.Recipe == recipeFilter || recipeFilter == "" {
|
||||
if app.Recipe.Name == recipeFilter || recipeFilter == "" {
|
||||
if recipeFilter != "" {
|
||||
// only count server if matches filter
|
||||
totalServersCount++
|
||||
@ -177,7 +183,7 @@ can take some time.
|
||||
|
||||
var newUpdates []string
|
||||
if version != "unknown" {
|
||||
updates, err := recipe.GetRecipeCatalogueVersions(app.Recipe, catl)
|
||||
updates, err := recipe.GetRecipeCatalogueVersions(app.Recipe.Name, catl)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@ -214,7 +220,7 @@ can take some time.
|
||||
}
|
||||
|
||||
appStats.Server = app.Server
|
||||
appStats.Recipe = app.Recipe
|
||||
appStats.Recipe = app.Recipe.Name
|
||||
appStats.AppName = app.Name
|
||||
appStats.Domain = app.Domain
|
||||
|
||||
|
Reference in New Issue
Block a user