refactor: "service name" -> "service"
This commit is contained in:
parent
ef108d63e1
commit
050a479df7
@ -112,29 +112,29 @@ func showPSOutput(app appPkg.App, cl *dockerClient.Client) {
|
||||
var containerStats map[string]string
|
||||
if len(containers) == 0 {
|
||||
containerStats = map[string]string{
|
||||
"service name": service.Name,
|
||||
"image": "unknown",
|
||||
"created": "unknown",
|
||||
"status": "unknown",
|
||||
"state": "unknown",
|
||||
"ports": "unknown",
|
||||
"service": service.Name,
|
||||
"image": "unknown",
|
||||
"created": "unknown",
|
||||
"status": "unknown",
|
||||
"state": "unknown",
|
||||
"ports": "unknown",
|
||||
}
|
||||
} else {
|
||||
container := containers[0]
|
||||
containerStats = map[string]string{
|
||||
"service name": abraService.ContainerToServiceName(container.Names, app.StackName()),
|
||||
"image": formatter.RemoveSha(container.Image),
|
||||
"created": formatter.HumanDuration(container.Created),
|
||||
"status": container.Status,
|
||||
"state": container.State,
|
||||
"ports": dockerFormatter.DisplayablePorts(container.Ports),
|
||||
"service": abraService.ContainerToServiceName(container.Names, app.StackName()),
|
||||
"image": formatter.RemoveSha(container.Image),
|
||||
"created": formatter.HumanDuration(container.Created),
|
||||
"status": container.Status,
|
||||
"state": container.State,
|
||||
"ports": dockerFormatter.DisplayablePorts(container.Ports),
|
||||
}
|
||||
}
|
||||
|
||||
allContainerStats[containerStats["service name"]] = containerStats
|
||||
allContainerStats[containerStats["service"]] = containerStats
|
||||
|
||||
tablerow := []string{
|
||||
containerStats["service name"],
|
||||
containerStats["service"],
|
||||
containerStats["image"],
|
||||
containerStats["created"],
|
||||
containerStats["status"],
|
||||
@ -156,7 +156,7 @@ func showPSOutput(app appPkg.App, cl *dockerClient.Client) {
|
||||
return
|
||||
}
|
||||
|
||||
tableCol := []string{"service name", "image", "created", "status", "state", "ports"}
|
||||
tableCol := []string{"service", "image", "created", "status", "state", "ports"}
|
||||
table := formatter.CreateTable(tableCol)
|
||||
for _, row := range tablerows {
|
||||
table.Append(row)
|
||||
|
Loading…
Reference in New Issue
Block a user