use the actually number of vms for the number of rows

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-15 10:02:47 -07:00
parent 12ab3b54a6
commit 04838e6c13
1 changed files with 9 additions and 1 deletions

View File

@ -31,12 +31,20 @@ func processEvents() {
log.Println("processEvents() do Event DEMO")
go ui.Main(gui.SetupDemoUI)
} else {
mh := addVmsTab(30)
count := countVMS(message)
mh := addVmsTab(count)
ReadReceivedData(message, mh)
}
}
}
func countVMS(data *pb.Event) int {
vms := data.GetVms()
log.Println("NUMBER OF vms=", len(vms))
// os.Exit(-1)
return len(vms)
}
func ReadReceivedData(data *pb.Event, mh *gui.TableData) {
msgItems := data.GetResults()
log.Println("ReadReceivedData() Event msgItems=", msgItems)