diff options
Diffstat (limited to 'machine.gui.go')
| -rw-r--r-- | machine.gui.go | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/machine.gui.go b/machine.gui.go index 9ef1f40..3791b71 100644 --- a/machine.gui.go +++ b/machine.gui.go @@ -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) |
