Fixed label for F1 menu entry

This commit is contained in:
Christian Muehlhaeuser 2018-03-26 07:56:47 +02:00
parent 97b2af5da4
commit ffdfbfb739
No known key found for this signature in database
GPG Key ID: BA4CF857DD4117E9
2 changed files with 5 additions and 5 deletions

View File

@ -147,12 +147,12 @@ func logsForm() (tview.Primitive, error) {
selectLog(pipe, list.Model[list.GetCurrentItem()], filter, logView) selectLog(pipe, list.Model[list.GetCurrentItem()], filter, logView)
}) })
menu.AddItem("Active Services", tcell.KeyF1, func() { menu.AddItem("All Services", tcell.KeyF1, func() {
activeOnly = !activeOnly activeOnly = !activeOnly
if activeOnly { if activeOnly {
menu.Items[0].Text = "Active Services"
} else {
menu.Items[0].Text = "All Services" menu.Items[0].Text = "All Services"
} else {
menu.Items[0].Text = "Active Services"
} }
list.loadModel(true, activeOnly) list.loadModel(true, activeOnly)
app.SetFocus(list) app.SetFocus(list)

View File

@ -78,9 +78,9 @@ func servicesForm() (tview.Primitive, error) {
menu.AddItem("Active Services", tcell.KeyF1, func() { menu.AddItem("Active Services", tcell.KeyF1, func() {
activeOnly = !activeOnly activeOnly = !activeOnly
if activeOnly { if activeOnly {
menu.Items[0].Text = "Active Services"
} else {
menu.Items[0].Text = "All Services" menu.Items[0].Text = "All Services"
} else {
menu.Items[0].Text = "Active Services"
} }
list.loadModel(false, activeOnly) list.loadModel(false, activeOnly)
app.SetFocus(list) app.SetFocus(list)