more colors

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-23 14:11:18 -07:00
parent 4a639270ff
commit 6ba8970d23
1 changed files with 11 additions and 2 deletions

View File

@ -66,14 +66,23 @@ func ReadReceivedData(data *pb.Event, mh *gui.TableData) {
vms := data.GetVms() vms := data.GetVms()
log.Println("ReadReceivedData() Event vms=", vms) log.Println("ReadReceivedData() Event vms=", vms)
for row, item := range vms { for row, item := range vms {
if (row % 2) == 1 { // if (row % 2) == 1 {
if (row == 1) {
mh.Rows[row].HumanData[0].Color = color.RGBA{100, 100, 100, 142} // makes the background of each other row grey mh.Rows[row].HumanData[0].Color = color.RGBA{100, 100, 100, 142} // makes the background of each other row grey
} else if (row == 2) {
mh.Rows[row].HumanData[0].Color = color.RGBA{0, 0, 0, 0} // makes the background of each other row grey
} else if (row == 3) {
mh.Rows[row].HumanData[0].Color = color.RGBA{255, 255, 255, 255} // makes the background of each other row grey
} else if (row == 4) {
mh.Rows[row].HumanData[0].Color = color.RGBA{255, 255, 255, 0} // makes the background of each other row grey
} else if (row == 5) {
mh.Rows[row].HumanData[0].Color = color.RGBA{55, 55, 55, 255} // makes the background of each other row grey
} else { } else {
mh.Rows[row].HumanData[0].Color = color.RGBA{72, 0, 0, 142} mh.Rows[row].HumanData[0].Color = color.RGBA{72, 0, 0, 142}
// mh.Rows[row].HumanData[0].Color = nil // mh.Rows[row].HumanData[0].Color = nil
} }
mh.Rows[row].HumanData[1].Text = item.Name mh.Rows[row].HumanData[1].Text = item.Name
mh.Rows[row].HumanData[1].Color = color.RGBA{0, 0, 0, 0} mh.Rows[row].HumanData[1].Color = color.RGBA{255, 255, 255, 255}
mh.Rows[row].HumanData[2].Text = item.Hostname mh.Rows[row].HumanData[2].Text = item.Hostname
mh.Rows[row].HumanData[2].Color = color.RGBA{200, 200, 0, 200} mh.Rows[row].HumanData[2].Color = color.RGBA{200, 200, 0, 200}
mh.Rows[row].HumanData[3].Text = fmt.Sprintf("%d",item.Cpus) mh.Rows[row].HumanData[3].Text = fmt.Sprintf("%d",item.Cpus)