summaryrefslogtreecommitdiff
path: root/windowDroplets.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-06-03 23:48:40 -0500
committerJeff Carr <[email protected]>2025-06-03 23:48:40 -0500
commitd261a220dff941701ed4e55faec8fe096d0d8f5d (patch)
treea3f5f9d45260b18226fabf4692afe127a796c90f /windowDroplets.go
parent7fd5089917de2b095b7fed973ffc6f44085711fe (diff)
send a create droplet event & unmarshal response
Diffstat (limited to 'windowDroplets.go')
-rw-r--r--windowDroplets.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/windowDroplets.go b/windowDroplets.go
index 6b84373..14052fc 100644
--- a/windowDroplets.go
+++ b/windowDroplets.go
@@ -73,6 +73,11 @@ func newDropletsWindow(admin *adminT) *stdDropletTableWin {
dwin.doInactiveDroplets(found)
})
+ grid.NewButton("Create", func() {
+ log.Info("create droplet here")
+ admin.createDropletWindow()
+ })
+
// make a box at the bottom of the window for the protobuf table
dwin.box = dwin.win.Bottom.Box().SetProgName("TBOX")
return dwin
@@ -173,7 +178,15 @@ func (dw *stdDropletTableWin) doActiveDroplets(pb *virtpb.Droplets) {
log.Info("data", string(data), "err =", err)
}
- t.AddHostname()
+ // t.AddHostname()
+ vp := t.AddButtonFunc("Hostname", func(p *virtpb.Droplet) string {
+ return p.Hostname
+ })
+ vp.Custom = func(d *virtpb.Droplet) {
+ log.Info("edit droplet here", d.Hostname)
+ dw.admin.editDropletWindow(d)
+ }
+
t.AddStringFunc("location", func(d *virtpb.Droplet) string {
return d.Current.Hypervisor
})