more moving to vm
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
0aec23e172
commit
c11e03c499
2
debug.go
2
debug.go
|
@ -14,7 +14,7 @@ import "github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
// import pb "git.wit.com/wit/witProtobuf"
|
// import pb "git.wit.com/wit/witProtobuf"
|
||||||
|
|
||||||
// THIS IS CLEAN
|
// THIS IS NOT CLEAN (but probably doesn't need to be. it's debugging)
|
||||||
|
|
||||||
// can not pass any args to this (?)
|
// can not pass any args to this (?)
|
||||||
/*
|
/*
|
||||||
|
|
12
gui.go
12
gui.go
|
@ -103,8 +103,8 @@ func AddTableTab(gw *GuiWindow, name string, rowcount int, parts []TableColumnDa
|
||||||
hbox := ui.NewHorizontalBox()
|
hbox := ui.NewHorizontalBox()
|
||||||
hbox.SetPadded(true)
|
hbox.SetPadded(true)
|
||||||
|
|
||||||
a := CreateButton(gb, account, nil, "Add Virtual Machine", "createAddVmBox", nil)
|
// a := CreateButton(gb, account, nil, "Add Virtual Machine", "createAddVmBox", nil)
|
||||||
hbox.Append(a.B, false)
|
// hbox.Append(a.B, false)
|
||||||
|
|
||||||
vbox.Append(hbox, false)
|
vbox.Append(hbox, false)
|
||||||
|
|
||||||
|
@ -136,11 +136,13 @@ func mouseClick(b *GuiButton) {
|
||||||
log.Println("\tgui.mouseClick() START b = nil")
|
log.Println("\tgui.mouseClick() START b = nil")
|
||||||
} else {
|
} else {
|
||||||
log.Println("\tgui.mouseClick() START b.Action =", b.Action)
|
log.Println("\tgui.mouseClick() START b.Action =", b.Action)
|
||||||
if (b.Action == "createAddVmBox") {
|
/*
|
||||||
log.Println("\tgui.mouseClick() createAddVmBox for b =", b)
|
if (b.Action == "CreateAddVmBox") {
|
||||||
createAddVmBox(b.GW, b)
|
log.Println("\tgui.mouseClick() CreateAddVmBox for b =", b)
|
||||||
|
CreateAddVmBox(b.GW, b)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
if (b.Action == "WINDOW CLOSE") {
|
if (b.Action == "WINDOW CLOSE") {
|
||||||
b.W.Hide()
|
b.W.Hide()
|
||||||
|
|
|
@ -13,6 +13,8 @@ import pb "git.wit.com/wit/witProtobuf"
|
||||||
|
|
||||||
// import "github.com/davecgh/go-spew/spew"
|
// import "github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
|
// THIS IS NOT CLEAN
|
||||||
|
|
||||||
func makeCloudInfoBox(gw *GuiWindow) *GuiBox {
|
func makeCloudInfoBox(gw *GuiWindow) *GuiBox {
|
||||||
var gb *GuiBox
|
var gb *GuiBox
|
||||||
gb = new(GuiBox)
|
gb = new(GuiBox)
|
||||||
|
|
19
vmBox.go
19
vmBox.go
|
@ -10,6 +10,8 @@ import pb "git.wit.com/wit/witProtobuf"
|
||||||
|
|
||||||
import "github.com/davecgh/go-spew/spew"
|
import "github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
|
// THIS IS NOT CLEAN
|
||||||
|
|
||||||
func CreateVmBox(gw *GuiWindow, vm *pb.Event_VM) {
|
func CreateVmBox(gw *GuiWindow, vm *pb.Event_VM) {
|
||||||
log.Println("CreateVmBox() START")
|
log.Println("CreateVmBox() START")
|
||||||
log.Println("CreateVmBox() vm.Name =", vm.Name)
|
log.Println("CreateVmBox() vm.Name =", vm.Name)
|
||||||
|
@ -70,9 +72,8 @@ func CreateVmBox(gw *GuiWindow, vm *pb.Event_VM) {
|
||||||
AddBoxToTab(vm.Name, gw.UiTab, vbox)
|
AddBoxToTab(vm.Name, gw.UiTab, vbox)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
func CreateAddVmBox(gw *GuiWindow, b *GuiButton, name string) *GuiBox{
|
||||||
log.Println("createAddVmBox() START")
|
log.Println("CreateAddVmBox() START name =", name)
|
||||||
name := "(" + b.Account.Nick + ")"
|
|
||||||
|
|
||||||
var box *GuiBox
|
var box *GuiBox
|
||||||
box = new(GuiBox)
|
box = new(GuiBox)
|
||||||
|
@ -87,12 +88,19 @@ func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
||||||
hbox.SetPadded(true)
|
hbox.SetPadded(true)
|
||||||
vbox.Append(hbox, false)
|
vbox.Append(hbox, false)
|
||||||
|
|
||||||
|
// abox := gw.MakeTab(gw)
|
||||||
|
|
||||||
|
AddBoxToTab(name, gw.UiTab, vbox)
|
||||||
|
|
||||||
|
return box
|
||||||
|
|
||||||
|
/*
|
||||||
// Add hostname entry box
|
// Add hostname entry box
|
||||||
hostname := MakeEntryHbox(box, "Hostname:", "testhost", true, "Hostname")
|
hostname := MakeEntryHbox(box, "Hostname:", "testhost", true, "Hostname")
|
||||||
memory := MakeEntryHbox(box, "Memory:", "512", true, "Memory")
|
memory := MakeEntryHbox(box, "Memory:", "512", true, "Memory")
|
||||||
disk := MakeEntryHbox(box, "Disk:", "20", true, "Disk")
|
disk := MakeEntryHbox(box, "Disk:", "20", true, "Disk")
|
||||||
|
|
||||||
log.Println("createAddVmBox() hostname, memory, disk =", hostname, memory, disk)
|
log.Println("CreateAddVmBox() hostname, memory, disk =", hostname, memory, disk)
|
||||||
|
|
||||||
vbox.Append(ui.NewHorizontalSeparator(), false)
|
vbox.Append(ui.NewHorizontalSeparator(), false)
|
||||||
|
|
||||||
|
@ -111,6 +119,5 @@ func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
||||||
|
|
||||||
a := CreateButton(box, nil, nil, "Cancel", "CLOSE", nil)
|
a := CreateButton(box, nil, nil, "Cancel", "CLOSE", nil)
|
||||||
hboxButtons.Append(a.B, false)
|
hboxButtons.Append(a.B, false)
|
||||||
|
*/
|
||||||
AddBoxToTab(name, gw.UiTab, vbox)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue