Made all text black and made rows alternate white/grey.
Signed-off-by: Akram <akram@wit.com>
This commit is contained in:
parent
27801edca3
commit
e977a3dddc
|
@ -2,7 +2,7 @@ package main
|
|||
|
||||
import "fmt"
|
||||
import "image/color"
|
||||
import "runtime"
|
||||
// import "runtime"
|
||||
|
||||
import pb "git.wit.com/wit/witProtobuf"
|
||||
import "git.wit.com/wit/gui"
|
||||
|
@ -26,13 +26,6 @@ var linuxBgYellow = color.RGBA{255, 255, 0, 255}
|
|||
|
||||
func setRowValues(mh *gui.TableData, row int, vm *pb.Event_VM) {
|
||||
defaultTextColor := linuxTextBlack
|
||||
defaultTextYellow := linuxTextBlack
|
||||
defaultTextBlack := linuxTextBlack
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
defaultTextColor = windowsTextRed
|
||||
defaultTextBlack = windowsTextBlack
|
||||
}
|
||||
if (row % 2) == 1 {
|
||||
mh.Rows[row].HumanData[0].Color = color.RGBA{200, 200, 200, 100} // odd columns are light grey
|
||||
} else {
|
||||
|
@ -58,12 +51,12 @@ func setRowValues(mh *gui.TableData, row int, vm *pb.Event_VM) {
|
|||
mh.Rows[row].HumanData[1].Text = vm.Name
|
||||
mh.Rows[row].HumanData[1].Color = defaultTextColor
|
||||
mh.Rows[row].HumanData[2].Text = vm.Hostname
|
||||
mh.Rows[row].HumanData[2].Color = defaultTextYellow
|
||||
mh.Rows[row].HumanData[2].Color = defaultTextColor
|
||||
mh.Rows[row].HumanData[3].Text = fmt.Sprintf("%d",vm.Cpus)
|
||||
mh.Rows[row].HumanData[3].Color = defaultTextColor
|
||||
mh.Rows[row].HumanData[4].Text = fmt.Sprintf("%d",vm.Memory)
|
||||
mh.Rows[row].HumanData[4].Color = defaultTextBlack
|
||||
mh.Rows[row].HumanData[4].Color = defaultTextColor
|
||||
mh.Rows[row].HumanData[5].Text = fmt.Sprintf("%d",vm.Disk)
|
||||
mh.Rows[row].HumanData[5].Color = defaultTextBlack
|
||||
mh.Rows[row].HumanData[5].Color = defaultTextColor
|
||||
mh.Rows[row].HumanData[6].Text = fmt.Sprintf("Details %s",vm.Name)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue