mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
use the view list to build the view
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
28150dcb6d
commit
069c7fb669
2 changed files with 9 additions and 8 deletions
|
|
@ -147,7 +147,7 @@ func NewGui(log *logrus.Entry, dockerCommand *commands.DockerCommand, oSCommand
|
|||
SessionIndex: 0,
|
||||
}
|
||||
|
||||
cyclableViews := []string{"project", "containers", "images"}
|
||||
cyclableViews := []string{"project", "containers", "images", "volumes"}
|
||||
if dockerCommand.InDockerComposeProject || config.DockerSwarm {
|
||||
cyclableViews = []string{"project", "services", "containers", "images", "volumes"}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,15 +204,16 @@ func (gui *Gui) layout(g *gocui.Gui) error {
|
|||
}
|
||||
|
||||
aboveContainersView := "project"
|
||||
if showServicesPanel {
|
||||
aboveContainersView = "services"
|
||||
addView(g, "services", "project", titles["services"], vHeights["services"])
|
||||
for _, view := range gui.CyclableViews {
|
||||
if view == aboveContainersView {
|
||||
continue
|
||||
}
|
||||
if err = addView(g, view, aboveContainersView, titles[view], vHeights[view]); err != nil {
|
||||
return err
|
||||
}
|
||||
aboveContainersView = view
|
||||
}
|
||||
|
||||
addView(g, "containers", aboveContainersView, titles["containers"], vHeights["containers"])
|
||||
addView(g, "images", "containers", titles["images"], vHeights["images"])
|
||||
addView(g, "volumes", "images", titles["volumes"], vHeights["volumes"])
|
||||
|
||||
if v, err := g.SetView("options", appStatusOptionsBoundary-1, height-2, optionsVersionBoundary-1, height, 0); err != nil {
|
||||
if err.Error() != "unknown view" {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue