refactor config, add Switch and Param struct + config labels

This commit is contained in:
Bradley Cicenas
2017-02-16 03:02:13 +00:00
parent 5f13563b6f
commit 90f6ce3962
6 changed files with 106 additions and 44 deletions

View File

@@ -75,14 +75,14 @@ func (g *Grid) redrawRows() {
ui.Clear()
// build layout
if config.GetToggle("enableHeader") {
if config.GetSwitch("enableHeader") {
g.header.SetCount(len(g.containers))
g.header.SetFilter(config.Get("filterStr"))
ui.Body.AddRows(g.header.Row())
}
ui.Body.AddRows(fieldHeader())
for _, c := range g.containers {
if !config.GetToggle("allContainers") && c.state != "running" {
if !config.GetSwitch("allContainers") && c.state != "running" {
continue
}
ui.Body.AddRows(c.widgets.Row())