forked from toolshed/abra
feat: service name in ps output
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/service"
|
||||
stack "coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"github.com/buger/goterm"
|
||||
dockerFormatter "github.com/docker/cli/cli/command/formatter"
|
||||
@ -70,7 +71,7 @@ func showPSOutput(c *cli.Context, app config.App, cl *dockerClient.Client) {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
tableCol := []string{"image", "created", "status", "state", "ports"}
|
||||
tableCol := []string{"service name", "image", "created", "status", "state", "ports"}
|
||||
table := formatter.CreateTable(tableCol)
|
||||
|
||||
for _, container := range containers {
|
||||
@ -81,6 +82,7 @@ func showPSOutput(c *cli.Context, app config.App, cl *dockerClient.Client) {
|
||||
}
|
||||
|
||||
tableRow := []string{
|
||||
service.ContainerToServiceName(container.Names, app.StackName()),
|
||||
formatter.RemoveSha(container.Image),
|
||||
formatter.HumanDuration(container.Created),
|
||||
container.Status,
|
||||
|
Reference in New Issue
Block a user