refactor container refresh with docker event handler

This commit is contained in:
Bradley Cicenas
2017-02-24 01:18:59 +00:00
parent cf5eff40bb
commit cb9f38adb3
3 changed files with 125 additions and 58 deletions

View File

@@ -158,7 +158,6 @@ func Display(g *Grid) bool {
ui.DefaultEvtStream.Hook(logEvent)
// initial draw
g.cmap.Refresh()
g.redrawRows()
ui.Handle("/sys/kbd/<up>", func(ui.Event) {
@@ -202,7 +201,7 @@ func Display(g *Grid) bool {
ui.Handle("/timer/1s", func(e ui.Event) {
loopIter++
if loopIter%5 == 0 {
g.cmap.Refresh()
g.cmap.Update()
}
g.containers = g.cmap.All() // refresh containers for current sort order
g.redrawRows()