summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-18 14:58:16 -0600
committerJeff Carr <[email protected]>2025-02-19 17:39:44 -0600
commit656f706aa10f56031ec4e58c4c12d4dd2c6526bb (patch)
tree11225c8eb2e86e82b2bf9dc7ef13d4c27c4724f5
parentb53e71ed9eb4067e749f872a7843e31381511bfb (diff)
testing close window
-rw-r--r--doGui.go9
-rw-r--r--main.go4
-rw-r--r--tableWindow.go2
3 files changed, 15 insertions, 0 deletions
diff --git a/doGui.go b/doGui.go
index 5f0be92..bb1259c 100644
--- a/doGui.go
+++ b/doGui.go
@@ -76,6 +76,15 @@ func drawWindow(win *gadgets.BasicWindow) {
newwin.showTable(me.machines)
newwin.Show()
})
+
+ grid.NewButton("ConfigSave(me.machines)", func() {
+ log.Info("saving config...")
+ me.machines.ConfigSave()
+ })
+ grid.NewButton("ConfigSave(me.machines2)", func() {
+ log.Info("saving config...")
+ me.machines2.ConfigSave()
+ })
}
func (tw *tableWindow) showTable(allm *zoopb.Machines) {
diff --git a/main.go b/main.go
index 88115d1..ef4146d 100644
--- a/main.go
+++ b/main.go
@@ -42,6 +42,10 @@ func main() {
log.Warn("load config failed", err)
os.Exit(-1)
}
+ if err := me.machines2.ConfigLoad(); err != nil {
+ log.Warn("load config failed", err)
+ os.Exit(-1)
+ }
// me.targets = make(map[string]string) // keep track of what versions the machines should be running
me.upgrade = make(map[string]bool) // used to trigger upgrade attempts
diff --git a/tableWindow.go b/tableWindow.go
index f4db2b9..5d64bac 100644
--- a/tableWindow.go
+++ b/tableWindow.go
@@ -7,6 +7,7 @@ import (
"sync"
"go.wit.com/lib/gadgets"
+ "go.wit.com/log"
"go.wit.com/gui"
)
@@ -44,6 +45,7 @@ func (w *tableWindow) Show() {
}
func (w *tableWindow) Hide() {
+ log.Info("hide window here")
w.win.Hide()
}