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"
|
||||
|
||||
// THIS IS CLEAN
|
||||
// THIS IS NOT CLEAN (but probably doesn't need to be. it's debugging)
|
||||
|
||||
// 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.SetPadded(true)
|
||||
|
||||
a := CreateButton(gb, account, nil, "Add Virtual Machine", "createAddVmBox", nil)
|
||||
hbox.Append(a.B, false)
|
||||
// a := CreateButton(gb, account, nil, "Add Virtual Machine", "createAddVmBox", nil)
|
||||
// hbox.Append(a.B, false)
|
||||
|
||||
vbox.Append(hbox, false)
|
||||
|
||||
|
@ -136,11 +136,13 @@ func mouseClick(b *GuiButton) {
|
|||
log.Println("\tgui.mouseClick() START b = nil")
|
||||
} else {
|
||||
log.Println("\tgui.mouseClick() START b.Action =", b.Action)
|
||||
if (b.Action == "createAddVmBox") {
|
||||
log.Println("\tgui.mouseClick() createAddVmBox for b =", b)
|
||||
createAddVmBox(b.GW, b)
|
||||
/*
|
||||
if (b.Action == "CreateAddVmBox") {
|
||||
log.Println("\tgui.mouseClick() CreateAddVmBox for b =", b)
|
||||
CreateAddVmBox(b.GW, b)
|
||||
return
|
||||
}
|
||||
*/
|
||||
/*
|
||||
if (b.Action == "WINDOW CLOSE") {
|
||||
b.W.Hide()
|
||||
|
|
|
@ -13,6 +13,8 @@ import pb "git.wit.com/wit/witProtobuf"
|
|||
|
||||
// import "github.com/davecgh/go-spew/spew"
|
||||
|
||||
// THIS IS NOT CLEAN
|
||||
|
||||
func makeCloudInfoBox(gw *GuiWindow) *GuiBox {
|
||||
var gb *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"
|
||||
|
||||
// THIS IS NOT CLEAN
|
||||
|
||||
func CreateVmBox(gw *GuiWindow, vm *pb.Event_VM) {
|
||||
log.Println("CreateVmBox() START")
|
||||
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)
|
||||
}
|
||||
|
||||
func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
||||
log.Println("createAddVmBox() START")
|
||||
name := "(" + b.Account.Nick + ")"
|
||||
func CreateAddVmBox(gw *GuiWindow, b *GuiButton, name string) *GuiBox{
|
||||
log.Println("CreateAddVmBox() START name =", name)
|
||||
|
||||
var box *GuiBox
|
||||
box = new(GuiBox)
|
||||
|
@ -87,12 +88,19 @@ func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
|||
hbox.SetPadded(true)
|
||||
vbox.Append(hbox, false)
|
||||
|
||||
// abox := gw.MakeTab(gw)
|
||||
|
||||
AddBoxToTab(name, gw.UiTab, vbox)
|
||||
|
||||
return box
|
||||
|
||||
/*
|
||||
// Add hostname entry box
|
||||
hostname := MakeEntryHbox(box, "Hostname:", "testhost", true, "Hostname")
|
||||
memory := MakeEntryHbox(box, "Memory:", "512", true, "Memory")
|
||||
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)
|
||||
|
||||
|
@ -111,6 +119,5 @@ func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
|||
|
||||
a := CreateButton(box, nil, nil, "Cancel", "CLOSE", nil)
|
||||
hboxButtons.Append(a.B, false)
|
||||
|
||||
AddBoxToTab(name, gw.UiTab, vbox)
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue