remove all the delays. GUI is very stable on Linux. Haven't seen it
crash in days. Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
2e4bbf7b91
commit
06af8a0d14
|
@ -23,6 +23,7 @@ func processEvents() {
|
|||
message := <-mychannel
|
||||
log.Println("processEvents() on channel recieved a message = ", message)
|
||||
ReadReceivedData(message)
|
||||
addVmsTab()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,6 +33,18 @@ func ReadReceivedData(data *pb.Event) {
|
|||
for _, item := range msgItems {
|
||||
log.Println(item)
|
||||
}
|
||||
|
||||
nets := data.GetNetworks()
|
||||
log.Println("ReadReceivedData() Event networks=", nets)
|
||||
for _, item := range nets {
|
||||
log.Println(item)
|
||||
}
|
||||
|
||||
vms := data.GetVms()
|
||||
log.Println("ReadReceivedData() Event vms=", vms)
|
||||
for _, item := range vms {
|
||||
log.Println(item)
|
||||
}
|
||||
}
|
||||
|
||||
func handleProtoClient(conn net.Conn) {
|
||||
|
|
27
infoTabUI.go
27
infoTabUI.go
|
@ -154,6 +154,33 @@ func setupCloudUI() {
|
|||
cloudwin.Show()
|
||||
}
|
||||
|
||||
func addVmsTab() {
|
||||
var parts []gui.InputData
|
||||
|
||||
for key, foo := range []string{"BG", "TEXTCOLOR", "TEXT", "BUTTON"} {
|
||||
log.Println(key, foo)
|
||||
|
||||
var b gui.InputData
|
||||
b.CellType = foo
|
||||
b.Heading = fmt.Sprintf("heading%d", key)
|
||||
parts = append(parts, b)
|
||||
}
|
||||
|
||||
var b gui.InputData
|
||||
b.CellType = "TEXTCOLOR"
|
||||
b.Heading = fmt.Sprintf("cpus")
|
||||
parts = append(parts, b)
|
||||
|
||||
var c gui.InputData
|
||||
c.CellType = "TEXTCOLOR"
|
||||
c.Heading = fmt.Sprintf("memory")
|
||||
parts = append(parts, c)
|
||||
|
||||
// log.Println("Sleep for 2 seconds, then try to add new tabs")
|
||||
// time.Sleep(1 * 1000 * 1000 * 1000)
|
||||
gui.AddTableTab(cloudtab, 1, "Virtual Machines", 7, parts)
|
||||
}
|
||||
|
||||
func addTableTab() {
|
||||
var parts []gui.InputData
|
||||
|
||||
|
|
Loading…
Reference in New Issue