package zoopb 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 } type repoTableFullPath struct { } func (x *repoTableFullPath) Add(s string) { } func (x *RepoTable) FullPath() *RepoTableFullPath { } func (x *RepoTable) AddFullPath() { x.order = append(x.order, x.n.AddStringFunc( f() string { return t.x.getRepoFullPath(rx *RepoTableRow) })) return *RepoTableRow } func (x *RepoTable) Show() { x.order.f() ZZ } func (x *RepoTable) AddMasterVersion() { all := x.x.SortByFullPath() for all.Scan() { repo := all.Next() for x.order return *RepoTableRow } func (x *RepoTable) NewColumn() *RepoRow { t := new(RepoTableRow) return *RepoTableRow } */