add virtigod to display

This commit is contained in:
Jeff Carr 2025-03-23 07:51:30 -05:00
parent f90c4af25e
commit a24c5f67e5
1 changed files with 7 additions and 1 deletions

View File

@ -132,13 +132,19 @@ func AddMachinesPB(tbox *gui.Node, pb *zoopb.Machines) *zoopb.MachinesTable {
t.AddStringFunc("zood", func(m *zoopb.Machine) string { t.AddStringFunc("zood", func(m *zoopb.Machine) string {
return findVersion(m, "zood") 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") ver := findVersion(m, "virtigod")
if ver == "n/a" { if ver == "n/a" {
return "" return ""
} }
return ver 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 { delf := func(m *zoopb.Machine) string {
return "delete" return "delete"
} }