cloud-control-panel/gui-accountPage.go

43 lines
1.4 KiB
Go

package main
import "log"
import "git.wit.com/wit/gui"
func makeCloudInfoBox(gw *gui.GuiWindow) {
log.Println("makeCloudInfoBox() START gw =", gw)
gw = gui.InitGuiWindow("makeCloudInfoBox() Box23", gw)
box := gui.AddGenericBox(gw, "makeCloudInfoBox")
log.Println("makeCloudInfoBox() START GW IS NOW: gw =", gw)
log.Println("makeCloudInfoBox() box =", box)
gui.NewLabel(box, "Hostname:")
tmp := config.Hostname + " (" + config.IPv6 + ")"
gui.MakeEntryHbox(box, "hostname:", tmp, true, "Hostname")
for key, a := range config.Accounts {
gui.HardVerticalBreak(box)
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
gui.CreateButton(box, config.Accounts[key], nil, name, "LOGIN", login)
name = "Show " + config.Accounts[key].Nick
gui.CreateButton(box, config.Accounts[key], nil, name, "SHOW", nil)
}
gui.CreateButton(box, nil, nil, "Add Account", "ADD TAB", addSubdomainButton)
gui.CreateButton(box, nil, nil, "Quit", "QUIT", nil)
log.Println("makeCloudInfoBox() END")
}