mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 07:11:01 +00:00
28 lines
621 B
Go
28 lines
621 B
Go
package presentation
|
|
|
|
import (
|
|
"github.com/fatih/color"
|
|
"github.com/jesseduffield/lazydocker/pkg/commands"
|
|
"github.com/jesseduffield/lazydocker/pkg/utils"
|
|
)
|
|
|
|
func GetServiceDisplayStrings(service *commands.Service) []string {
|
|
if service.Container == nil {
|
|
return []string{
|
|
utils.ColoredString("none", color.FgBlue),
|
|
"",
|
|
service.Name,
|
|
"",
|
|
"",
|
|
}
|
|
}
|
|
|
|
container := service.Container
|
|
return []string{
|
|
getContainerDisplayStatus(container),
|
|
getContainerDisplaySubstatus(container),
|
|
service.Name,
|
|
getDisplayCPUPerc(container),
|
|
utils.ColoredString(displayPorts(container), color.FgYellow),
|
|
}
|
|
}
|