diff --git a/config.go b/config.go index 39b6207..6f6bee8 100644 --- a/config.go +++ b/config.go @@ -72,15 +72,6 @@ func parseConfig() { config.LoadOSEnv([]string{"USER"}) config.LoadOSEnv([]string{"BUILDDEBUG"}) -/* - urls := flag.Args() - log.Println("flag.Aargs() = ", urls) - - for _, addr := range flag.Args() { - log.Println("GET %s", addr) - } -*/ - // add driver for support of yaml and json config.AddDriver(yaml.Driver) config.AddDriver(json.Driver) diff --git a/infoTabUI.go b/infoTabUI.go index 5413684..3defa2f 100644 --- a/infoTabUI.go +++ b/infoTabUI.go @@ -173,28 +173,6 @@ func addTableTab() { gui.AddTableTab(cloudtab, 1, "test seven", 7, parts) } -func addProtobufTab() { - var parts []gui.InputData - - for key, foo := range []string{"BG", "TEXTCOLOR", "BUTTON", "TEXTCOLOR", "TEXTCOLOR", "TEXT", "BUTTON", "TEXT", "BUTTON"} { - log.Println(key, foo) - - var b gui.InputData - b.CellType = foo - b.Heading = fmt.Sprintf("heading%d", key) - parts = append(parts, b) - } - - log.Println("Sleep for 2 seconds, then try to add new tabs") - time.Sleep(1 * 1000 * 1000 * 1000) - gui.AddTableTab(cloudtab, 1, "test seven", 7, parts) -} - -type aheader struct { - headtype string - name string -} - func addVmsTab(count int) *gui.TableData { var parts []gui.InputData @@ -212,33 +190,42 @@ func addVmsTab(count int) *gui.TableData { tmp.Heading = "name" tmp.Index = human parts = append(parts, tmp) + human += 1 tmp = gui.InputData{} tmp.CellType = "TEXTCOLOR" tmp.Heading = "hostname" tmp.Index = human parts = append(parts, tmp) + human += 1 tmp = gui.InputData{} tmp.CellType = "TEXTCOLOR" tmp.Heading = "IPv6" tmp.Index = human parts = append(parts, tmp) + human += 1 tmp = gui.InputData{} tmp.CellType = "TEXTCOLOR" tmp.Heading = "cpus" + tmp.Index = human parts = append(parts, tmp) + human += 1 tmp = gui.InputData{} tmp.CellType = "TEXTCOLOR" tmp.Heading = "memory" + tmp.Index = human parts = append(parts, tmp) + human += 1 tmp = gui.InputData{} tmp.CellType = "BUTTON" tmp.Heading = "Details" + tmp.Index = human parts = append(parts, tmp) + human += 1 mh := gui.AddTableTab(cloudtab, 1, "Virtual Machines", count, parts) return mh diff --git a/main.go b/main.go index 5e302c5..0094248 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ import "github.com/gookit/config" import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" -// import "git.wit.com/wit/gui" +import "git.wit.com/wit/gui" // import "github.com/davecgh/go-spew/spew" @@ -64,6 +64,9 @@ func main() { go gorillaDial("v000185.testing.com.customers.wprod.wit.com:9000") + gui.Width = config.Int("width") + gui.Height = config.Int("height") + // make this the main loop in an attempt to figure out the crashes // do not change this until the GUI is stable ui.Main(setupCloudUI)