summaryrefslogtreecommitdiff
path: root/doGui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-15 07:17:35 -0600
committerJeff Carr <[email protected]>2025-02-15 07:28:42 -0600
commit8ad5e779311a5b7be1dd22ee92e582902ba33ed1 (patch)
tree465c0072e2abfcffa6c4bc1ace69684c55ecdd27 /doGui.go
parentd3b6c1725d1657d20ba843e5f1323ab8019ea9d1 (diff)
show some more details in the tablev0.0.25
Diffstat (limited to 'doGui.go')
-rw-r--r--doGui.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/doGui.go b/doGui.go
index e9b22c5..d8a1f92 100644
--- a/doGui.go
+++ b/doGui.go
@@ -71,28 +71,25 @@ func drawWindow(win *gadgets.BasicWindow) {
})
- grid.NewButton("addTable", func() {
- if tbwin == nil {
- log.Info("show the table first")
- return
- }
- tbwin.showTable(me.machines)
+ grid.NewButton("update table", func() {
+ newwin := makeTableWindow()
+ newwin.showTable(me.machines)
+ newwin.Show()
})
}
func (tw *tableWindow) showTable(allm *zoopb.Machines) {
-
all := allm.All()
for all.Scan() {
m := all.Next()
- tw.grid.NewLabel("hello")
-
tw.grid.NewLabel(m.Hostname)
tw.grid.NewLabel(fmt.Sprintf("%d", m.Cpus))
tw.grid.NewLabel(fmt.Sprintf("%d", m.Memory))
tw.grid.NewLabel(m.Distro)
tw.grid.NewLabel(findVersion(m, "zood"))
tw.grid.NewLabel(findVersion(m, "bash"))
+ dur := m.Laststamp.AsTime()
+ tw.grid.NewLabel(fmt.Sprintf("%v", time.Since(dur)))
tw.grid.NextRow()
}
}