Implemented list command + task. colorjson output disabled for this command (bug detected)
parent
a2492ef59c
commit
9eb47f3248
|
@ -95,6 +95,16 @@ func main() {
|
||||||
Aliases: []string{"a"},
|
Aliases: []string{"a"},
|
||||||
Usage: "options for edgeapp management",
|
Usage: "options for edgeapp management",
|
||||||
Subcommands: []*cli.Command{
|
Subcommands: []*cli.Command{
|
||||||
|
{
|
||||||
|
Name: "list",
|
||||||
|
Aliases: []string{"i"},
|
||||||
|
Usage: "list currently installed apps and their status",
|
||||||
|
Action: func(c *cli.Context) error {
|
||||||
|
task := getCommandTask("list_edgeapps", "", true)
|
||||||
|
// return cli.Exit(utils.ColorJsonString(task.Result.String), 0)
|
||||||
|
return cli.Exit(task.Result.String, 0)
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "install",
|
Name: "install",
|
||||||
Aliases: []string{"i"},
|
Aliases: []string{"i"},
|
||||||
|
|
|
@ -161,6 +161,12 @@ func ExecuteTask(task Task) Task {
|
||||||
task.Result = sql.NullString{String: taskResult, Valid: true}
|
task.Result = sql.NullString{String: taskResult, Valid: true}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "list_edgeapps":
|
||||||
|
|
||||||
|
log.Println("Fetching current status on Edgeapps...")
|
||||||
|
taskResult := taskGetEdgeApps()
|
||||||
|
task.Result = sql.NullString{String: taskResult, Valid: true}
|
||||||
|
|
||||||
case "install_edgeapp":
|
case "install_edgeapp":
|
||||||
|
|
||||||
log.Println("Installing EdgeApp...")
|
log.Println("Installing EdgeApp...")
|
||||||
|
|
Loading…
Reference in New Issue