summaryrefslogtreecommitdiff
path: root/doGui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-23 17:01:22 -0600
committerJeff Carr <[email protected]>2025-03-04 05:00:46 -0600
commit30a5eb56a210c28feca0098fd9e6dc340f494b9f (patch)
treebb3e3c4a5fabc8c534ff5395fd027223e7a2a29b /doGui.go
parent01d7e92cdbd2221bd54702126af256828cff29dc (diff)
display status and uptimev0.2.42v0.2.41v0.2.40v0.2.39
Diffstat (limited to 'doGui.go')
-rw-r--r--doGui.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/doGui.go b/doGui.go
index fe799ca..5a017ab 100644
--- a/doGui.go
+++ b/doGui.go
@@ -20,7 +20,7 @@ import (
func debug() {
for {
time.Sleep(90 * time.Second)
- log.Info("TODO: virtigo scan here. repo count =")
+ // log.Info("TODO: use this?")
}
}
@@ -108,6 +108,23 @@ func drawWindow(win *gadgets.BasicWindow) {
d := me.cluster.GetDropletsPB()
testWin, _ = makeDropletsWindow(d)
})
+ grid.NextRow()
+
+ me.status = grid.NewLabel("cur status")
+ grid.NextRow()
+ me.lastuptime = grid.NewLabel("last uptime")
+ grid.NextRow()
+
+ grid.NewButton("uptime", func() {
+ updateUptimeGui("kuma uptime should update this")
+ })
+}
+
+func updateUptimeGui(uptime string) {
+ me.status.SetLabel(uptime)
+
+ datestamp := time.Now().Format("2006-01-02 15:04:03")
+ me.lastuptime.SetLabel("last uptime at " + datestamp)
}
func makeDropletsWindow(pb *virtpb.Droplets) (*GenericWindow, *virtpb.DropletsTable) {