parent
9e9383d059
commit
cbc96f2b61
|
@ -51,17 +51,21 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
|
||||||
log.Println("makeCloudInfoBox() END")
|
log.Println("makeCloudInfoBox() END")
|
||||||
}
|
}
|
||||||
|
|
||||||
func createAccount(gw *gui.GuiWindow) {
|
func initWindow(gw *gui.GuiWindow, name string) *gui.GuiWindow {
|
||||||
|
window := gui.Data.WindowMap[name]
|
||||||
window := gui.Data.WindowMap["createAccount"]
|
|
||||||
if (window != nil) {
|
if (window != nil) {
|
||||||
box := window.BoxMap["MAINBOX"]
|
box := window.BoxMap["MAINBOX"]
|
||||||
log.Println("createAccount tab already exists")
|
log.Println("initWindow() tab already exists name =", name)
|
||||||
gui.MessageWindow(box.Window, "createAccount", "New account tab already exists")
|
gui.ErrorWindow(box.Window, "Create Window Error", "Window " + name + " already exists")
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
// if there is not an account, then go to 'make account'
|
// if there is not an account, then go to 'make account'
|
||||||
gw = gui.InitGuiWindow("createAccount", gw)
|
return gui.InitGuiWindow("createAccount", gw)
|
||||||
|
}
|
||||||
|
|
||||||
|
func createAccount(gw *gui.GuiWindow) {
|
||||||
|
gw = initWindow(gw, "createAccount")
|
||||||
|
if (gw == nil) { return }
|
||||||
|
|
||||||
box := gui.HardBox(gw, gui.Yaxis, "Create New Account")
|
box := gui.HardBox(gw, gui.Yaxis, "Create New Account")
|
||||||
|
|
||||||
|
@ -95,7 +99,7 @@ func addSubdomainClick(b *gui.GuiButton) {
|
||||||
acc.Username = "jcarr@wit.com"
|
acc.Username = "jcarr@wit.com"
|
||||||
acc.Email = "jcarr@wit.com"
|
acc.Email = "jcarr@wit.com"
|
||||||
acc.Password = "badpass"
|
acc.Password = "badpass"
|
||||||
acc.URL = "http://stackapi-api1.stackapi.customers.dev.wit.com:4000/"
|
acc.URL = "http://stackapi-api1.stackapi.customers.wprod.wit.com:4000/"
|
||||||
config.Accounts = append(config.Accounts, acc)
|
config.Accounts = append(config.Accounts, acc)
|
||||||
|
|
||||||
makeCloudInfoBox(b.Box.Window)
|
makeCloudInfoBox(b.Box.Window)
|
||||||
|
@ -120,8 +124,7 @@ func generateSubdomain(b *gui.GuiButton) {
|
||||||
}
|
}
|
||||||
// subdomain.SetText("cust00013.wit.dev")
|
// subdomain.SetText("cust00013.wit.dev")
|
||||||
|
|
||||||
// curl -vv -X POST -H "X-Wit-Auth: $TOKEN" 'http://stackapi-api1.stackapi.customers.wit.com:4000/vms/toby?count=1&cpu=2&ram=512&disk=25'
|
txt := gui.SetText(b.Box, "SUBDOMAIN", "yourname.customers.wprod.wit.com")
|
||||||
txt := gui.SetText(b.Box, "SUBDOMAIN", "http://stackapi-api1.stackapi.customers.wit.com:4000/vms/jcarr")
|
|
||||||
log.Println("generateSubdomain subdomain = ", txt)
|
log.Println("generateSubdomain subdomain = ", txt)
|
||||||
log.Println("generateSubdomain END")
|
log.Println("generateSubdomain END")
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ func debugClick(b *gui.GuiButton) {
|
||||||
gw := b.Box.Window
|
gw := b.Box.Window
|
||||||
|
|
||||||
// if there is not an account, then go to 'make account'
|
// if there is not an account, then go to 'make account'
|
||||||
gw = gui.InitGuiWindow("debugClick", gw)
|
// gw = gui.InitGuiWindow("debugClick", gw)
|
||||||
|
gw = initWindow(gw, "Debugging")
|
||||||
|
|
||||||
log.Println("debugClick() AddGenericBox() START")
|
log.Println("debugClick() AddGenericBox() START")
|
||||||
box := gui.HardBox(gw, gui.Yaxis, "debugging")
|
box := gui.HardBox(gw, gui.Yaxis, "debugging")
|
||||||
|
|
|
@ -75,22 +75,5 @@ func splashClick(b *gui.GuiButton) {
|
||||||
|
|
||||||
gw.UiTab.Delete(0) // does this make things more or less stable or neither?
|
gw.UiTab.Delete(0) // does this make things more or less stable or neither?
|
||||||
createAccount(gw)
|
createAccount(gw)
|
||||||
/*
|
|
||||||
|
|
||||||
box := gui.HardBox(gw, gui.Yaxis, "Create New Account")
|
|
||||||
|
|
||||||
// make a place for someone to enter their subdomain
|
|
||||||
hardXbox := gui.HardBox(gw, gui.Xaxis, "subdomain test")
|
|
||||||
makeButton(hardXbox, nil, nil, "Generate a Subdomain", "SUBDOMAIN", generateSubdomain)
|
|
||||||
gui.NewLabel(hardXbox, "")
|
|
||||||
|
|
||||||
gui.AddEntry(box, "SUBDOMAIN")
|
|
||||||
// gui.HorizontalBreak(box)
|
|
||||||
|
|
||||||
hardXbox1 := gui.HardBox(gw, gui.Xaxis, "subdomain test")
|
|
||||||
makeButton(hardXbox1, nil, nil, "Create Account", "ADD", addSubdomainClick)
|
|
||||||
gui.NewLabel(hardXbox, "")
|
|
||||||
|
|
||||||
*/
|
|
||||||
log.Println("splashClick() END")
|
log.Println("splashClick() END")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue