start moving vm here
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d2942f7e2d
commit
7dbb890525
49
vm.go
49
vm.go
|
@ -1,6 +1,6 @@
|
|||
package main
|
||||
|
||||
// import "log"
|
||||
import "log"
|
||||
// import "fmt"
|
||||
|
||||
import "git.wit.com/wit/gui"
|
||||
|
@ -72,5 +72,52 @@ func addVmsTab(gw *gui.GuiWindow, name string, count int, a *pb.Account) *gui.Ta
|
|||
human += 1
|
||||
|
||||
mh := gui.AddTableTab(gw, name, count, parts, a)
|
||||
|
||||
box := mh.Box
|
||||
okButton := gui.CreateButton(box, a, nil, "Add Virtual Machine", "createAddVmBox", createAddVmBox)
|
||||
gui.AddButtonToBox(box, okButton)
|
||||
|
||||
return mh
|
||||
}
|
||||
|
||||
func createAddVmBox(b *gui.GuiButton) {
|
||||
log.Println("createAddVmBox() START")
|
||||
gw := b.GW
|
||||
log.Println("createAddVmBox() gw =", gw)
|
||||
name := "(" + b.Account.Nick + ")"
|
||||
|
||||
// gw.BoxMap["ADD VM" + name] = box
|
||||
|
||||
box := gui.CreateAddVmBox(gw, b, name)
|
||||
|
||||
// Add hostname entry box
|
||||
hostname := gui.MakeEntryHbox(box, "Hostname:", "testhost", true, "Hostname")
|
||||
memory := gui.MakeEntryHbox(box, "Memory:", "512", true, "Memory")
|
||||
disk := gui.MakeEntryHbox(box, "Disk:", "20", true, "Disk")
|
||||
|
||||
log.Println("createAddVmBox() hostname, memory, disk =", hostname, memory, disk)
|
||||
|
||||
gui.HorizontalBreak(box)
|
||||
// vbox.Append(ui.NewHorizontalSeparator(), false)
|
||||
|
||||
// hboxButtons := ui.NewHorizontalBox()
|
||||
// hboxButtons.SetPadded(true)
|
||||
// vbox.Append(hboxButtons, false)
|
||||
|
||||
// gui.AddBoxToTab(name, gw.UiTab, vbox)
|
||||
|
||||
/*
|
||||
var newb GuiButton
|
||||
newb.Action = "CREATE"
|
||||
newb.VM = b.VM
|
||||
newb.Account = b.Account
|
||||
hostname.B = &newb
|
||||
memory.B = &newb
|
||||
disk.B = &newb
|
||||
hboxButtons.Append(AddButton(&newb, "Add Virtual Machine"), false)
|
||||
|
||||
a := CreateButton(box, nil, nil, "Cancel", "CLOSE", nil)
|
||||
hboxButtons.Append(a.B, false)
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue