mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 15:11:02 +00:00
Changed FgBlue to FgCyan in multiple locations to improve text visibility on terminals with dark blue ANSI colors. This affects image history display, service status indicators, container states, keyboard shortcuts, and command output. Fixes #685
43 lines
1 KiB
Go
43 lines
1 KiB
Go
package presentation
|
|
|
|
import (
|
|
"github.com/fatih/color"
|
|
"github.com/jesseduffield/lazydocker/pkg/commands"
|
|
"github.com/jesseduffield/lazydocker/pkg/config"
|
|
"github.com/jesseduffield/lazydocker/pkg/utils"
|
|
)
|
|
|
|
func GetServiceDisplayStrings(guiConfig *config.GuiConfig, service *commands.Service) []string {
|
|
if service.Container == nil {
|
|
var containerState string
|
|
switch guiConfig.ContainerStatusHealthStyle {
|
|
case "short":
|
|
containerState = "n"
|
|
case "icon":
|
|
containerState = "."
|
|
case "long":
|
|
fallthrough
|
|
default:
|
|
containerState = "none"
|
|
}
|
|
|
|
return []string{
|
|
utils.ColoredString(containerState, color.FgCyan),
|
|
"",
|
|
service.Name,
|
|
"",
|
|
"",
|
|
"",
|
|
}
|
|
}
|
|
|
|
container := service.Container
|
|
return []string{
|
|
getContainerDisplayStatus(guiConfig, container),
|
|
getContainerDisplaySubstatus(guiConfig, container),
|
|
service.Name,
|
|
getDisplayCPUPerc(container),
|
|
utils.ColoredString(displayPorts(container), color.FgYellow),
|
|
utils.ColoredString(displayContainerImage(container), color.FgMagenta),
|
|
}
|
|
}
|