parent
a60b529a4b
commit
d32f7c6596
|
@ -5,30 +5,11 @@ import "log"
|
||||||
import "github.com/golang/protobuf/proto"
|
import "github.com/golang/protobuf/proto"
|
||||||
import pb "git.wit.com/wit/witProtobuf"
|
import pb "git.wit.com/wit/witProtobuf"
|
||||||
|
|
||||||
import "github.com/andlabs/ui"
|
|
||||||
import "git.wit.com/wit/gui"
|
import "git.wit.com/wit/gui"
|
||||||
|
|
||||||
var mychannel chan *pb.Event
|
var mychannel chan *pb.Event
|
||||||
var currentMessage *pb.Event
|
var currentMessage *pb.Event
|
||||||
|
|
||||||
/*
|
|
||||||
var windowsTextVeryLightGrey = color.RGBA{10, 10, 10, 10}
|
|
||||||
var windowsTextBlack = color.RGBA{200, 200, 200, 200}
|
|
||||||
var windowsTextWhite = color.RGBA{255, 255, 255, 255}
|
|
||||||
var windowsTextYellow = color.RGBA{200, 200, 0, 200}
|
|
||||||
var windowsTextRed = color.RGBA{200, 0, 0, 200}
|
|
||||||
var windowsTextBlue = color.RGBA{0, 100, 200, 100}
|
|
||||||
var windowsBgGrey = color.RGBA{100, 100, 100, 142}
|
|
||||||
var windowsBgBlack = color.RGBA{55, 55, 55, 255}
|
|
||||||
|
|
||||||
var linuxTextBlue = color.RGBA{0, 100, 200, 100}
|
|
||||||
var linuxTextBlack = color.RGBA{0, 0, 0, 0}
|
|
||||||
var linuxTextYellow = color.RGBA{200, 200, 0, 200}
|
|
||||||
var linuxBgMauve = color.RGBA{72, 0, 0, 142}
|
|
||||||
var linuxBgBlack = color.RGBA{55, 55, 55, 255}
|
|
||||||
var linuxBgWhite = color.RGBA{0, 0, 0, 0}
|
|
||||||
*/
|
|
||||||
|
|
||||||
func initChannel() {
|
func initChannel() {
|
||||||
mychannel = make(chan *pb.Event)
|
mychannel = make(chan *pb.Event)
|
||||||
}
|
}
|
||||||
|
@ -112,7 +93,7 @@ func setRowValues(mh *gui.TableData, row int, vm *pb.Event_VM) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
func ReadReceivedData(data *pb.Event, mh *gui.TableData, window *ui.Window, tab *ui.Tab) {
|
func ReadReceivedData(data *pb.Event, mh *gui.TableData, window *gui.GuiWindow) {
|
||||||
msgItems := data.GetResults()
|
msgItems := data.GetResults()
|
||||||
log.Println("ReadReceivedData() Event msgItems=", msgItems)
|
log.Println("ReadReceivedData() Event msgItems=", msgItems)
|
||||||
for _, item := range msgItems {
|
for _, item := range msgItems {
|
||||||
|
@ -135,8 +116,9 @@ func ReadReceivedData(data *pb.Event, mh *gui.TableData, window *ui.Window, tab
|
||||||
newGuiButton.Action = "SHOW VM"
|
newGuiButton.Action = "SHOW VM"
|
||||||
newGuiButton.VM = vm // set the button to this VM
|
newGuiButton.VM = vm // set the button to this VM
|
||||||
newGuiButton.Account = data.Account
|
newGuiButton.Account = data.Account
|
||||||
newGuiButton.W = window
|
newGuiButton.W = window.UiWindow
|
||||||
newGuiButton.T = tab
|
newGuiButton.T = window.UiTab
|
||||||
|
newGuiButton.Box = mh.Box
|
||||||
gui.Data.AllButtons = append(gui.Data.AllButtons, &newGuiButton)
|
gui.Data.AllButtons = append(gui.Data.AllButtons, &newGuiButton)
|
||||||
mh.Rows[row].HumanData[6].Button = &newGuiButton
|
mh.Rows[row].HumanData[6].Button = &newGuiButton
|
||||||
mh.Rows[row].HumanData[6].VM = vm
|
mh.Rows[row].HumanData[6].VM = vm
|
||||||
|
|
2
main.go
2
main.go
|
@ -391,7 +391,7 @@ func mainMouseClick(b *gui.GuiButton) {
|
||||||
// if (count != 0) {
|
// if (count != 0) {
|
||||||
name := "Virtual Machines (" + b.Account.Nick + ")"
|
name := "Virtual Machines (" + b.Account.Nick + ")"
|
||||||
mh := gui.AddVmsTab(gw, name, count, b.Account)
|
mh := gui.AddVmsTab(gw, name, count, b.Account)
|
||||||
ReadReceivedData(currentMessage, mh, b.W, b.T)
|
ReadReceivedData(currentMessage, mh, b.GW)
|
||||||
// }
|
// }
|
||||||
currentMessage = nil
|
currentMessage = nil
|
||||||
gui.Data.State = "done"
|
gui.Data.State = "done"
|
||||||
|
|
Loading…
Reference in New Issue