mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-21 23:01:03 +00:00
allow viewing container config in services panel
This commit is contained in:
parent
816eb3f55f
commit
da645cf173
2 changed files with 17 additions and 6 deletions
|
|
@ -14,11 +14,11 @@ import (
|
|||
// list panel functions
|
||||
|
||||
func (gui *Gui) getServiceContexts() []string {
|
||||
return []string{"logs", "stats", "config"}
|
||||
return []string{"logs", "stats", "config", "container-config"}
|
||||
}
|
||||
|
||||
func (gui *Gui) getServiceContextTitles() []string {
|
||||
return []string{gui.Tr.LogsTitle, gui.Tr.StatsTitle, gui.Tr.ConfigTitle}
|
||||
return []string{gui.Tr.LogsTitle, gui.Tr.StatsTitle, gui.Tr.ConfigTitle, gui.Tr.ContainerConfigTitle}
|
||||
}
|
||||
|
||||
func (gui *Gui) getSelectedService() (*commands.Service, error) {
|
||||
|
|
@ -93,6 +93,13 @@ func (gui *Gui) handleServiceSelect(g *gocui.Gui, v *gocui.View) error {
|
|||
if err := gui.renderServiceStats(service); err != nil {
|
||||
return err
|
||||
}
|
||||
case "container-config":
|
||||
if service.Container == nil {
|
||||
return gui.renderString(gui.g, "main", gui.Tr.NoContainer)
|
||||
}
|
||||
if err := gui.renderContainerConfig(service.Container); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return errors.New("Unknown context for services panel")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ type TranslationSet struct {
|
|||
StandaloneContainersTitle string
|
||||
ImagesTitle string
|
||||
NoContainers string
|
||||
NoContainer string
|
||||
NoImages string
|
||||
RemoveImage string
|
||||
RemoveWithoutPrune string
|
||||
|
|
@ -56,10 +57,11 @@ type TranslationSet struct {
|
|||
PressEnterToReturn string
|
||||
ViewRestartOptions string
|
||||
|
||||
LogsTitle string
|
||||
ConfigTitle string
|
||||
StatsTitle string
|
||||
CreditsTitle string
|
||||
LogsTitle string
|
||||
ConfigTitle string
|
||||
StatsTitle string
|
||||
CreditsTitle string
|
||||
ContainerConfigTitle string
|
||||
}
|
||||
|
||||
func englishSet() TranslationSet {
|
||||
|
|
@ -114,8 +116,10 @@ func englishSet() TranslationSet {
|
|||
ConfigTitle: "Config",
|
||||
StatsTitle: "Stats",
|
||||
CreditsTitle: "About",
|
||||
ContainerConfigTitle: "Container Config",
|
||||
|
||||
NoContainers: "No containers",
|
||||
NoContainer: "No container",
|
||||
NoImages: "No images",
|
||||
|
||||
ConfirmQuit: "Are you sure you want to quit?",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue