parent
b0d88b2227
commit
66924bb35f
|
@ -53,11 +53,22 @@ func ReadReceivedData(data *pb.Event, mh *gui.TableData) {
|
|||
vms := data.GetVms()
|
||||
log.Println("ReadReceivedData() Event vms=", vms)
|
||||
for row, item := range vms {
|
||||
mh.Rows[row].Human[1].Text = ui.TableString(item.Name)
|
||||
mh.Rows[row].Human[2].Text = ui.TableString(item.Hostname)
|
||||
mh.Rows[row].Human[3].Text = ui.TableString(fmt.Sprintf("%d",item.Cpus))
|
||||
mh.Rows[row].Human[4].Text = ui.TableString(fmt.Sprintf("%d",item.Memory))
|
||||
mh.Rows[row].Human[5].Text = ui.TableString(fmt.Sprintf("%d",item.Disk))
|
||||
if (row % 2) == 1 {
|
||||
mh.Rows[row].Human[0].Color = ui.TableColor{0, 0, 0, .04}
|
||||
} else {
|
||||
mh.Rows[row].Human[0].Color = ui.TableColor{0, 0, 0, 0}
|
||||
}
|
||||
mh.Rows[row].Human[1].Text = ui.TableString(item.Name)
|
||||
mh.Rows[row].Human[1].Color = ui.TableColor{0, 0, 0, 0}
|
||||
mh.Rows[row].Human[2].Text = ui.TableString(item.Hostname)
|
||||
mh.Rows[row].Human[2].Color = ui.TableColor{0, 0, 0, 0}
|
||||
mh.Rows[row].Human[3].Text = ui.TableString(fmt.Sprintf("%d",item.Cpus))
|
||||
mh.Rows[row].Human[3].Color = ui.TableColor{0, 0, 0, 0}
|
||||
mh.Rows[row].Human[4].Text = ui.TableString(fmt.Sprintf("%d",item.Memory))
|
||||
mh.Rows[row].Human[4].Color = ui.TableColor{0, 0, 0, 0}
|
||||
mh.Rows[row].Human[5].Text = ui.TableString(fmt.Sprintf("%d",item.Disk))
|
||||
mh.Rows[row].Human[5].Color = ui.TableColor{0, 0, 0, 0}
|
||||
mh.Rows[row].Human[6].Text = ui.TableString(fmt.Sprintf("Details %s",item.Name))
|
||||
|
||||
log.Println("\titem=", item)
|
||||
log.Println("\titem.Name=", item.Name)
|
||||
|
|
|
@ -30,6 +30,13 @@ func makeCloudInfoBox() ui.Control {
|
|||
|
||||
vbox.Append(ui.NewColorButton(), false)
|
||||
|
||||
addXbutton := ui.NewButton("Show bmath's Account")
|
||||
addXbutton.OnClicked(func(*ui.Button) {
|
||||
log.Println("gorillaSendProtobuf()")
|
||||
gorillaSendProtobuf()
|
||||
})
|
||||
vbox.Append(addXbutton, false)
|
||||
|
||||
vbox.Append(ui.NewLabel("Debugging:"), false)
|
||||
|
||||
// ATTEMPT TO ADD THE TABLE HERE
|
||||
|
|
Loading…
Reference in New Issue