diff --git a/windowZood.go b/windowZood.go index 7a51703..01bcf28 100644 --- a/windowZood.go +++ b/windowZood.go @@ -132,13 +132,19 @@ func AddMachinesPB(tbox *gui.Node, pb *zoopb.Machines) *zoopb.MachinesTable { t.AddStringFunc("zood", func(m *zoopb.Machine) string { return findVersion(m, "zood") }) - t.AddStringFunc("virtigod", func(m *zoopb.Machine) string { + virtbut := t.AddButtonFunc("virtigod", func(m *zoopb.Machine) string { ver := findVersion(m, "virtigod") if ver == "n/a" { return "" } return ver }) + virtbut.Custom = func(m *zoopb.Machine) { + log.Info("Triggering machine", m.Hostname, "to upgrade virtigod") + m.Upgrade = true + m.UpgradeCmd = "apt install virtigod" + } + delf := func(m *zoopb.Machine) string { return "delete" }