From a24c5f67e5d0ea90322f0ee9803c996bf3f34bcb Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 23 Mar 2025 07:51:30 -0500 Subject: [PATCH] add virtigod to display --- windowZood.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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" }