forked from toolshed/abra
refactor(ps)!: remove -w, "watch ..." does it better
This commit is contained in:
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
appPkg "coopcloud.tech/abra/pkg/app"
|
||||
@ -15,7 +14,6 @@ import (
|
||||
"coopcloud.tech/abra/pkg/recipe"
|
||||
abraService "coopcloud.tech/abra/pkg/service"
|
||||
stack "coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"github.com/buger/goterm"
|
||||
dockerFormatter "github.com/docker/cli/cli/command/formatter"
|
||||
containerTypes "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
@ -31,7 +29,6 @@ var appPsCommand = cli.Command{
|
||||
Description: "Show status of a deployed app.",
|
||||
Flags: []cli.Flag{
|
||||
internal.MachineReadableFlag,
|
||||
internal.WatchFlag,
|
||||
internal.DebugFlag,
|
||||
},
|
||||
Before: internal.SubCommandBefore,
|
||||
@ -62,18 +59,9 @@ var appPsCommand = cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
if !internal.Watch {
|
||||
showPSOutput(app, cl)
|
||||
return nil
|
||||
}
|
||||
showPSOutput(app, cl)
|
||||
|
||||
goterm.Clear()
|
||||
for {
|
||||
goterm.MoveCursor(1, 1)
|
||||
showPSOutput(app, cl)
|
||||
goterm.Flush()
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user