summaryrefslogtreecommitdiff
path: root/machine.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-12 13:16:05 -0500
committerJeff Carr <[email protected]>2025-03-12 13:17:19 -0500
commit767380abd080682f2e13d8d41633c0f600b8f616 (patch)
tree932fdffe21bce59c57580857135633b4ff7ef196 /machine.go
parentbb4a6a01df71f7ce4338b8f61806ebf8832bffbf (diff)
the forgotten patchv0.0.47
Diffstat (limited to 'machine.go')
-rw-r--r--machine.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/machine.go b/machine.go
index dc8da72..9f188e6 100644
--- a/machine.go
+++ b/machine.go
@@ -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)