table tests

This commit is contained in:
Jeff Carr 2025-02-18 20:10:51 -06:00
parent df91ac2cbd
commit 78cc971daa
1 changed files with 32 additions and 13 deletions

View File

@ -1,14 +1,39 @@
package zoopb
/*
type RepoTable struct {
n *gui.Node
x *Repos
FullPath *repoTableFullPath
columns []*gui.NodeColumn
order []*gui.NodeColumn
import (
"go.wit.com/gui"
"go.wit.com/lib/protobuf/guipb"
"go.wit.com/log"
)
func (x *Machines) NewTable(title string) *MachinesTable {
t := new(MachinesTable)
t.gt = gui.NewTable(title)
t.x = x
pb := new(guipb.Table)
pb.Title = title
pb.Order = append(pb.Order, "Hostname")
pb.Order = append(pb.Order, "Memory")
pb.Order = append(pb.Order, "Cpus")
t.pb = pb
return t
}
func (t *MachinesTable) ShowTable() {
log.Info("zoopb ShowTable()")
t.gt.ShowTable(t.pb)
}
type MachinesTable struct {
gt *gui.NodeTable
pb *guipb.Table
x *Machines
hostnames []string
columns []*gui.NodeColumn
order []*gui.NodeColumn
}
/*
type RepoTableRow struct {
nodes []*gui.Node
}
@ -23,12 +48,6 @@ func (x *repoTableFullPath) Add(s string) {
func (x *RepoTable) FullPath() *RepoTableFullPath {
}
func (x *Repos) NewTable() *RepoTable {
t := new(RepoTable)
t.n = gui.NewTable()
return *RepoTable
}
func (x *RepoTable) AddFullPath() {
x.order = append(x.order, x.n.AddStringFunc( f() string {
return t.x.getRepoFullPath(rx *RepoTableRow)