summaryrefslogtreecommitdiff
path: root/infoTabUI.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-23 15:07:10 -0700
committerJeff Carr <[email protected]>2019-05-23 15:07:10 -0700
commit07b16e36729ec6f580995824bd5116ee4d99cf82 (patch)
treefee745c1be5a747b605d68f1b0b41c91cc1b8964 /infoTabUI.go
parent7e9037a9f579964727ccf2996b7e88d22a7a8aa0 (diff)
make account grid
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'infoTabUI.go')
-rw-r--r--infoTabUI.go28
1 files changed, 23 insertions, 5 deletions
diff --git a/infoTabUI.go b/infoTabUI.go
index 4f7306d..c8f7b6f 100644
--- a/infoTabUI.go
+++ b/infoTabUI.go
@@ -62,20 +62,38 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box {
vbox.Append(ui.NewHorizontalSeparator(), false)
- vbox.Append(ui.NewLabel("Accounts:"), false)
-
agrid := ui.NewGrid()
agrid.SetPadded(true)
+ agrid.Append(ui.NewLabel("Accounts:"), 0, 0, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+ agrid.Append(ui.NewLabel("Nickname"), 1, 0, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+ agrid.Append(ui.NewLabel("Username"), 2, 0, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+ agrid.Append(ui.NewLabel("Domain Name"), 3, 0, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+
+ row := 1
for account, _ := range config.StringMap("accounts") {
- hostname := config.String("accounts." + account + ".hostname")
+ // nickname := config.String("accounts." + account + ".nickname")
+ username := config.String("accounts." + account + ".username")
domainname := config.String("accounts." + account + ".domainname")
+
+ hostname := config.String("accounts." + account + ".hostname")
port := config.String("accounts." + account + ".port")
- username := config.String("accounts." + account + ".username")
+
a := account + " " + hostname + " " + domainname + " " + port + " " + username
log.Println("ACCOUNT: ", a)
- vbox.Append(ui.NewLabel(a), false)
+
+ agrid.Append(ui.NewLabel(account), 1, row, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+ agrid.Append(ui.NewLabel(username), 2, row, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+ agrid.Append(ui.NewLabel(domainname), 3, row, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+ bname := "Open " + account
+ b := CreateButton(bname, "SHOW", custom)
+ agrid.Append(b, 4, row, 1, 1, true, ui.AlignFill, false, ui.AlignFill)
+
+ // vbox.Append(ui.NewLabel(a), false)
+ row += 1
}
+
+ vbox.Append(agrid, false)
return hbox
}