mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
use confirmation panel for upping project
This commit is contained in:
parent
0a0116b5eb
commit
129402fd50
2 changed files with 16 additions and 12 deletions
|
|
@ -326,17 +326,19 @@ func (gui *Gui) handleServiceRenderLogsToMain(g *gocui.Gui, v *gocui.View) error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) handleProjectUp(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) handleProjectUp(g *gocui.Gui, v *gocui.View) error {
|
||||||
cmdStr := utils.ApplyTemplate(
|
return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmUpProject, func(g *gocui.Gui, v *gocui.View) error {
|
||||||
gui.Config.UserConfig.CommandTemplates.Up,
|
cmdStr := utils.ApplyTemplate(
|
||||||
gui.DockerCommand.NewCommandObject(commands.CommandObject{}),
|
gui.Config.UserConfig.CommandTemplates.Up,
|
||||||
)
|
gui.DockerCommand.NewCommandObject(commands.CommandObject{}),
|
||||||
|
)
|
||||||
|
|
||||||
return gui.WithWaitingStatus(gui.Tr.UppingAllStatus, func() error {
|
return gui.WithWaitingStatus(gui.Tr.UppingProjectStatus, func() error {
|
||||||
if err := gui.OSCommand.RunCommand(cmdStr); err != nil {
|
if err := gui.OSCommand.RunCommand(cmdStr); err != nil {
|
||||||
return gui.createErrorPanel(err.Error())
|
return gui.createErrorPanel(err.Error())
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
}, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) handleProjectDown(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) handleProjectDown(g *gocui.Gui, v *gocui.View) error {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ type TranslationSet struct {
|
||||||
OpenConfig string
|
OpenConfig string
|
||||||
EditConfig string
|
EditConfig string
|
||||||
ConfirmQuit string
|
ConfirmQuit string
|
||||||
|
ConfirmUpProject string
|
||||||
ErrorOccurred string
|
ErrorOccurred string
|
||||||
ConnectionFailed string
|
ConnectionFailed string
|
||||||
UnattachableContainerError string
|
UnattachableContainerError string
|
||||||
|
|
@ -41,7 +42,7 @@ type TranslationSet struct {
|
||||||
RestartingStatus string
|
RestartingStatus string
|
||||||
StartingStatus string
|
StartingStatus string
|
||||||
StoppingStatus string
|
StoppingStatus string
|
||||||
UppingAllStatus string
|
UppingProjectStatus string
|
||||||
UppingServiceStatus string
|
UppingServiceStatus string
|
||||||
PausingStatus string
|
PausingStatus string
|
||||||
RemovingStatus string
|
RemovingStatus string
|
||||||
|
|
@ -125,7 +126,7 @@ func englishSet() TranslationSet {
|
||||||
StartingStatus: "starting",
|
StartingStatus: "starting",
|
||||||
StoppingStatus: "stopping",
|
StoppingStatus: "stopping",
|
||||||
UppingServiceStatus: "upping service",
|
UppingServiceStatus: "upping service",
|
||||||
UppingAllStatus: "upping all",
|
UppingProjectStatus: "upping project",
|
||||||
DowningStatus: "downing",
|
DowningStatus: "downing",
|
||||||
PausingStatus: "pausing",
|
PausingStatus: "pausing",
|
||||||
RunningCustomCommandStatus: "running custom command",
|
RunningCustomCommandStatus: "running custom command",
|
||||||
|
|
@ -221,6 +222,7 @@ func englishSet() TranslationSet {
|
||||||
NoVolumes: "No volumes",
|
NoVolumes: "No volumes",
|
||||||
|
|
||||||
ConfirmQuit: "Are you sure you want to quit?",
|
ConfirmQuit: "Are you sure you want to quit?",
|
||||||
|
ConfirmUpProject: "Are you sure you want to 'up' your docker compose project?",
|
||||||
MustForceToRemoveContainer: "You cannot remove a running container unless you force it. Do you want to force it?",
|
MustForceToRemoveContainer: "You cannot remove a running container unless you force it. Do you want to force it?",
|
||||||
NotEnoughSpace: "Not enough space to render panels",
|
NotEnoughSpace: "Not enough space to render panels",
|
||||||
ConfirmPruneImages: "Are you sure you want to prune all unused images?",
|
ConfirmPruneImages: "Are you sure you want to prune all unused images?",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue