diff options
| author | Jeff Carr <[email protected]> | 2019-05-23 09:48:12 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-23 09:48:12 -0700 |
| commit | b9ade31605631ecfae95025489eef1dfe1491e2e (patch) | |
| tree | 7f679994f0ac520e8730d2e86216c561f184f6fd /infoTabUI.go | |
| parent | cf9fe10d1eac590a60c4007f1ec5b33bf56c5c94 (diff) | |
try to list the registered accounts
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'infoTabUI.go')
| -rw-r--r-- | infoTabUI.go | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/infoTabUI.go b/infoTabUI.go index e2867bd..ca94427 100644 --- a/infoTabUI.go +++ b/infoTabUI.go @@ -5,6 +5,7 @@ import "time" import "fmt" import "runtime/debug" import "runtime" +import "os" import "github.com/gookit/config" @@ -51,12 +52,11 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box { vbox.SetPadded(true) hbox.Append(vbox, true) + /* grid := ui.NewGrid() grid.SetPadded(true) vbox.Append(grid, false) - - msggrid := ui.NewGrid() - msggrid.SetPadded(true) + */ entryForm := ui.NewForm() entryForm.SetPadded(true) @@ -70,6 +70,22 @@ func makeCloudInfoBox(custom func(int, string)) *ui.Box { entryForm.Append("IPv6:", IPv6entry, false) IPv6entry.SetText("2604:bbc0:3:3:0:10:0:1003") + vbox.Append(ui.NewHorizontalSeparator(), false) + + vbox.Append(ui.NewLabel("Accounts:"), false) + + agrid := ui.NewGrid() + agrid.SetPadded(true) + + for account, _ := range config.StringMap("accounts") { + hostname := config.String("cloud." + account + ".hostname") + domainname := config.String("cloud." + account + ".hostname") + port := config.String("cloud." + account + ".port") + a := account + " " + hostname + " " + domainname + " " + port + log.Println("ACCOUNT: ", a) + vbox.Append(ui.NewLabel(a), false) + } + os.Exit(0) return hbox } |
