From 107def9ccc5c6f7152e63533893b67caa74bfd16 Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Thu, 11 Jan 2018 18:27:30 +0000 Subject: [PATCH] add status err messages to start/stop/remove --- container/main.go | 3 +++ grid.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/container/main.go b/container/main.go index a576e70..c00739c 100644 --- a/container/main.go +++ b/container/main.go @@ -93,6 +93,7 @@ func (c *Container) Start() { if c.Meta["state"] != "running" { if err := c.manager.Start(); err != nil { log.Warningf("container %s: %v", c.Id, err) + log.StatusErr(err) return } c.SetState("running") @@ -103,6 +104,7 @@ func (c *Container) Stop() { if c.Meta["state"] == "running" { if err := c.manager.Stop(); err != nil { log.Warningf("container %s: %v", c.Id, err) + log.StatusErr(err) return } c.SetState("exited") @@ -112,5 +114,6 @@ func (c *Container) Stop() { func (c *Container) Remove() { if err := c.manager.Remove(); err != nil { log.Warningf("container %s: %v", c.Id, err) + log.StatusErr(err) } } diff --git a/grid.go b/grid.go index 6c11866..a11c7e0 100644 --- a/grid.go +++ b/grid.go @@ -145,6 +145,9 @@ func Display() bool { }) ui.Handle("/timer/1s", func(e ui.Event) { + if log.StatusQueued() { + ui.StopLoop() + } RefreshDisplay() })