displays stuff again
more or less works enough to now work on updating the window and box concept login Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
b3c77d26bd
commit
cd4ef60acc
|
@ -22,6 +22,7 @@ func lookupAAAA(hostname string) string {
|
|||
|
||||
func main() {
|
||||
hostname := "v000185.testing.com.customers.wprod.wit.com"
|
||||
// 2604:bbc0:2:248:5054:f0ff:fe00:156
|
||||
|
||||
lookupAAAA(hostname)
|
||||
}
|
||||
|
|
55
main.go
55
main.go
|
@ -214,7 +214,7 @@ func mainMouseClick(b *gui.GuiButton) {
|
|||
}
|
||||
}
|
||||
if (gui.Data.State == "splash") {
|
||||
gw.MakeTab = addSubdomainQuestionBox
|
||||
gw.MakeWindow = addSubdomainQuestionBox
|
||||
gui.ShowTab(gw, "Box2", "New Account?")
|
||||
gui.Data.State = "account1"
|
||||
return
|
||||
|
@ -222,7 +222,9 @@ func mainMouseClick(b *gui.GuiButton) {
|
|||
if (gui.Data.State == "main") {
|
||||
log.Println("gui.Data.State == main b =", b)
|
||||
log.Println("gui.Data.State == main gw =", gw)
|
||||
gui.ShowMainTab(gw)
|
||||
makeCloudInfoBox(gw)
|
||||
// gw.MakeWindow = makeCloudInfoBox
|
||||
// gui.ShowMainTab(gw)
|
||||
gui.Data.State = "done"
|
||||
return
|
||||
} else if (gui.Data.State == "account1") {
|
||||
|
@ -293,7 +295,8 @@ func mainMouseClick(b *gui.GuiButton) {
|
|||
acc.URL = "http://stackapi-api1.stackapi.customers.dev.wit.com:4000/"
|
||||
config.Accounts = append(config.Accounts, acc)
|
||||
|
||||
gui.ShowMainTab(gw)
|
||||
// gui.ShowMainTab(gw)
|
||||
makeCloudInfoBox(gw)
|
||||
gui.Data.State = "done"
|
||||
} else if (b.Action == "LOGIN") {
|
||||
log.Println("\tTRIGGER LOGIN ACCOUNT")
|
||||
|
@ -480,3 +483,49 @@ func watchGUI() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func makeCloudInfoBox(gw *gui.GuiWindow) {
|
||||
log.Println("makeCloudInfoBox() START gw =", gw)
|
||||
box := gui.ShowMainTab(gw)
|
||||
log.Println("makeCloudInfoBox() box =", box)
|
||||
|
||||
gui.NewLabel(box, "Hostname:")
|
||||
|
||||
gui.HardHorizontalBreak(box)
|
||||
// gui.VerticalBreak(box)
|
||||
|
||||
tmp := gui.Data.Hostname + " (" + gui.Data.IPv6 + ")"
|
||||
gui.MakeEntryHbox(box, "hostname:", tmp, true, "Hostname")
|
||||
|
||||
for key, a := range config.Accounts {
|
||||
log.Println("account = ", key, a)
|
||||
log.Println("Accounts[key] = ", config.Accounts[key])
|
||||
log.Println("account.Nick = ", config.Accounts[key].Nick)
|
||||
log.Println("account.Username = ", config.Accounts[key].Username)
|
||||
log.Println("account.Token = ", config.Accounts[key].Token)
|
||||
|
||||
gui.NewLabel(box, config.Accounts[key].Domain)
|
||||
gui.NewLabel(box, config.Accounts[key].Email)
|
||||
|
||||
name := "Login " + config.Accounts[key].Nick
|
||||
login := gui.CreateButton(box, config.Accounts[key], nil, name, "LOGIN", nil)
|
||||
gui.AddButtonToBox(box, login)
|
||||
|
||||
name = "Show " + config.Accounts[key].Nick
|
||||
show := gui.CreateButton(box, config.Accounts[key], nil, name, "SHOW", nil)
|
||||
gui.AddButtonToBox(box, show)
|
||||
}
|
||||
|
||||
// gui.HardHorizontalBreak(box)
|
||||
// gui.VerticalBreak(box)
|
||||
|
||||
|
||||
add := gui.CreateButton(box, nil, nil, "Add Account", "ADD TAB", nil)
|
||||
gui.AddButtonToBox(box, add)
|
||||
|
||||
quit := gui.CreateButton(box, nil, nil, "Quit", "QUIT", nil)
|
||||
gui.AddButtonToBox(box, quit)
|
||||
|
||||
gui.ShowMainTabShowBox(gw, box)
|
||||
log.Println("makeCloudInfoBox() END")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue