mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Feature: show container names in Services panel
Display container name alongside service name in the Services panel. If a container has a different name than the service, it will be shown in parentheses, e.g., 'frontend (web_app)'. Fixes #40
This commit is contained in:
parent
577797d9ed
commit
bbd3ad31d5
1 changed files with 5 additions and 1 deletions
|
|
@ -32,10 +32,14 @@ func GetServiceDisplayStrings(guiConfig *config.GuiConfig, service *commands.Ser
|
|||
}
|
||||
|
||||
container := service.Container
|
||||
displayName := service.Name
|
||||
if container.Name != "" && container.Name != service.Name {
|
||||
displayName = service.Name + " (" + container.Name + ")"
|
||||
}
|
||||
return []string{
|
||||
getContainerDisplayStatus(guiConfig, container),
|
||||
getContainerDisplaySubstatus(guiConfig, container),
|
||||
service.Name,
|
||||
displayName,
|
||||
getDisplayCPUPerc(container),
|
||||
utils.ColoredString(displayPorts(container), color.FgYellow),
|
||||
utils.ColoredString(displayContainerImage(container), color.FgMagenta),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue