Skip to content

Commit

Permalink
bcicen#191 Show compose service in single view mode
Browse files Browse the repository at this point in the history
  • Loading branch information
stokito committed Nov 16, 2020
1 parent 040f53f commit bd494d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions connector/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ func (cm *Docker) initContainerProject(c *container.Container, labels map[string
c.Project.WorkDir = labels["com.docker.compose.project.working_dir"]
c.Project.Config = labels["com.docker.compose.project.config_files"]
cm.projects[projectName] = c.Project
// set compose service for the container
composeService := labels["com.docker.compose.service"]
if composeService != "" {
c.SetMeta("service", composeService)
}
}
}
c.Project.Count++
Expand Down
2 changes: 1 addition & 1 deletion cwidgets/single/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
ui "github.com/gizak/termui"
)

var displayInfo = []string{"id", "name", "image", "ports", "IPs", "state", "created", "health"}
var displayInfo = []string{"id", "service", "name", "image", "ports", "IPs", "state", "created", "health"}

type Info struct {
*ui.Table
Expand Down

0 comments on commit bd494d0

Please sign in to comment.