diff options
| author | Jeff Carr <[email protected]> | 2025-03-12 13:16:05 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-12 13:17:19 -0500 |
| commit | 767380abd080682f2e13d8d41633c0f600b8f616 (patch) | |
| tree | 932fdffe21bce59c57580857135633b4ff7ef196 /machine.go | |
| parent | bb4a6a01df71f7ce4338b8f61806ebf8832bffbf (diff) | |
the forgotten patchv0.0.47
Diffstat (limited to 'machine.go')
| -rw-r--r-- | machine.go | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -43,7 +43,7 @@ func handleMachine(r *http.Request, w http.ResponseWriter, hostname string, data am := new(zoopb.Machine) am.Hostname = newm.Hostname am.Memory = newm.Memory - me.machines2.Append(am) + // me.machines2.Append(am) me.machines.Append(newm) log.Info("new machine", am.Hostname, am.Memory) return @@ -59,7 +59,7 @@ func handleMachine(r *http.Request, w http.ResponseWriter, hostname string, data fmt.Fprintln(w, "apt update") m.Upgrade = false } else { - fmt.Fprintln(w, "upgrade") + fmt.Fprintln(w, "good") } // log.Info("update machine protobuf", hostname) updateMachine(newm) @@ -75,8 +75,12 @@ func updateMachine(u *zoopb.Machine) string { if m == nil { log.Info("adding new machine", u.Hostname) me.machines.Append(u) - log.Info("save machines pb file here...") - me.machines2.ConfigSave() + if me.zood == nil { + // do nothing. window has not been opened + } else { + me.zood.doMachinesUpgradeTable(me.machines) + } + saveMachineState() return "new" } // log.Info("updating machine", m.Hostname) |
