mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
fix some glitchiness caused by indeterminate sorting
This commit is contained in:
parent
60df208924
commit
b6b5373999
3 changed files with 9 additions and 8 deletions
|
|
@ -35,7 +35,6 @@ type Container struct {
|
||||||
ProjectName string
|
ProjectName string
|
||||||
ID string
|
ID string
|
||||||
Container types.Container
|
Container types.Container
|
||||||
DisplayString string
|
|
||||||
Client *client.Client
|
Client *client.Client
|
||||||
OSCommand *OSCommand
|
OSCommand *OSCommand
|
||||||
Config *config.AppConfig
|
Config *config.AppConfig
|
||||||
|
|
@ -140,11 +139,6 @@ func (c *Container) GetDisplayCPUPerc() string {
|
||||||
return utils.ColoredString(formattedPercentage, clr)
|
return utils.ColoredString(formattedPercentage, clr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProducingLogs tells us whether we should bother checking a container's logs
|
|
||||||
func (c *Container) ProducingLogs() bool {
|
|
||||||
return c.Container.State == "running" && c.DetailsLoaded() && c.Details.HostConfig.LogConfig.Type != "none"
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetColor Container color
|
// GetColor Container color
|
||||||
func (c *Container) GetColor() color.Attribute {
|
func (c *Container) GetColor() color.Attribute {
|
||||||
switch c.Container.State {
|
switch c.Container.State {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,15 @@ func (gui *Gui) getImagesPanel() *SideListPanel[*commands.Image] {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return a.Name < b.Name
|
if a.Name != b.Name {
|
||||||
|
return a.Name < b.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
if a.Tag != b.Tag {
|
||||||
|
return a.Tag < b.Tag
|
||||||
|
}
|
||||||
|
|
||||||
|
return a.ID < b.ID
|
||||||
},
|
},
|
||||||
getDisplayStrings: func(image *commands.Image) []string {
|
getDisplayStrings: func(image *commands.Image) []string {
|
||||||
return []string{image.Name, image.Tag, utils.FormatDecimalBytes(int(image.Image.Size))}
|
return []string{image.Name, image.Tag, utils.FormatDecimalBytes(int(image.Image.Size))}
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,6 @@ type IGui interface {
|
||||||
FocusY(selectedLine int, itemCount int, view *gocui.View)
|
FocusY(selectedLine int, itemCount int, view *gocui.View)
|
||||||
ShouldRefresh(key string) bool
|
ShouldRefresh(key string) bool
|
||||||
GetMainView() *gocui.View
|
GetMainView() *gocui.View
|
||||||
PopupPanelFocused() bool
|
|
||||||
// TODO: replace with IsCurrentView() bool
|
// TODO: replace with IsCurrentView() bool
|
||||||
CurrentView() *gocui.View
|
CurrentView() *gocui.View
|
||||||
FilterString(view *gocui.View) string
|
FilterString(view *gocui.View) string
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue