diff options
| author | Jeff Carr <[email protected]> | 2025-04-21 13:42:09 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-04-21 20:54:39 -0500 |
| commit | 4121e66e01f5b314e4fe4999d61550fbbbc07946 (patch) | |
| tree | 02ce2190b7dee4525e5aae87303ebdbbbde87617 /doAdminGui.go | |
| parent | a4dd085a47b0aa04d9d4475254fac08f62e0bc82 (diff) | |
attempting the cluster protobuf
Diffstat (limited to 'doAdminGui.go')
| -rw-r--r-- | doAdminGui.go | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/doAdminGui.go b/doAdminGui.go index bc024bd..fba8b5e 100644 --- a/doAdminGui.go +++ b/doAdminGui.go @@ -47,12 +47,12 @@ func (admin *adminT) refresh() { log.Info("/DropletsPB Error:", err) } else { fmt.Println("DropletsPB Response len:", len(data)) - admin.droplets = new(virtpb.Droplets) - if err := admin.droplets.Unmarshal(data); err != nil { + admin.cluster.Droplets = new(virtpb.Droplets) + if err := admin.cluster.Droplets.Unmarshal(data); err != nil { fmt.Println("droplets marshal failed", err) return } - fmt.Println("Droplet len=", admin.droplets.Len()) + fmt.Println("Droplet len=", admin.cluster.Droplets.Len()) } // update the hypervisor list @@ -60,12 +60,12 @@ func (admin *adminT) refresh() { log.Info("Error:", err) } else { fmt.Println("HypervisorsPB Response len:", len(data)) - admin.hypervisors = new(virtpb.Hypervisors) - if err := admin.hypervisors.Unmarshal(data); err != nil { + admin.cluster.Hypervisors = new(virtpb.Hypervisors) + if err := admin.cluster.Hypervisors.Unmarshal(data); err != nil { fmt.Println("hypervisors marshal failed", err) return } - fmt.Println("Hypervisors len=", admin.hypervisors.Len()) + fmt.Println("Hypervisors len=", admin.cluster.Hypervisors.Len()) } // update the events list @@ -92,20 +92,20 @@ func doLocalhostAdminGui() *adminT { grid := me.gwin.Group.RawGrid() grid.NewButton("show hypervisors", func() { - if admin.hypervisors == nil { + if admin.cluster.Hypervisors == nil { log.Info("hypervisors not initialized") return } - log.Info("Hypervisors len=", admin.hypervisors.Len()) + log.Info("Hypervisors len=", admin.cluster.Hypervisors.Len()) admin.hwin = newHypervisorsWindow() - admin.hwin.doStdHypervisors(admin.hypervisors) + admin.hwin.doStdHypervisors(admin.cluster.Hypervisors) admin.hwin.win.Custom = func() { log.Info("hiding table window") } }) grid.NewButton("droplets", func() { - if admin.droplets == nil { + if admin.cluster.Droplets == nil { log.Info("droplets not initialized") return } @@ -115,7 +115,7 @@ func doLocalhostAdminGui() *adminT { } var found *virtpb.Droplets found = virtpb.NewDroplets() - all := admin.droplets.All() + all := admin.cluster.Droplets.All() for all.Scan() { vm := all.Next() if vm.Current.State != virtpb.DropletState_ON { @@ -208,20 +208,20 @@ func (admin *adminT) doAdminGui() { grid := win.Group.RawGrid() grid.NewButton("show hypervisors", func() { - if admin.hypervisors == nil { + if admin.cluster.Hypervisors == nil { log.Info("hypervisors not initialized") return } - log.Info("Hypervisors len=", admin.hypervisors.Len()) + log.Info("Hypervisors len=", admin.cluster.Hypervisors.Len()) admin.hwin = newHypervisorsWindow() - admin.hwin.doStdHypervisors(admin.hypervisors) + admin.hwin.doStdHypervisors(admin.cluster.Hypervisors) admin.hwin.win.Custom = func() { log.Info("hiding table window") } }) grid.NewButton("droplets", func() { - if admin.droplets == nil { + if admin.cluster.Droplets == nil { log.Info("droplets not initialized") return } @@ -231,7 +231,7 @@ func (admin *adminT) doAdminGui() { } var found *virtpb.Droplets found = virtpb.NewDroplets() - all := admin.droplets.All() + all := admin.cluster.Droplets.All() for all.Scan() { vm := all.Next() if vm.Current.State != virtpb.DropletState_ON { @@ -303,20 +303,20 @@ func (admin *adminT) makeClusterGroup(c *virtpb.Cluster) { grid := group.RawGrid() grid.NewButton("show hypervisors", func() { - if admin.hypervisors == nil { + if admin.cluster.Hypervisors == nil { log.Info("hypervisors not initialized") return } - log.Info("Hypervisors len=", admin.hypervisors.Len()) + log.Info("Hypervisors len=", admin.cluster.Hypervisors.Len()) admin.hwin = newHypervisorsWindow() - admin.hwin.doStdHypervisors(admin.hypervisors) + admin.hwin.doStdHypervisors(admin.cluster.Hypervisors) admin.hwin.win.Custom = func() { log.Info("hiding table window") } }) grid.NewButton("droplets", func() { - if admin.droplets == nil { + if admin.cluster.Droplets == nil { log.Info("droplets not initialized") return } @@ -326,7 +326,7 @@ func (admin *adminT) makeClusterGroup(c *virtpb.Cluster) { } var found *virtpb.Droplets found = virtpb.NewDroplets() - all := admin.droplets.All() + all := admin.cluster.Droplets.All() for all.Scan() { vm := all.Next() if vm.Current.State != virtpb.DropletState_ON { |
