parent
66924bb35f
commit
184bdd6677
|
@ -72,15 +72,6 @@ func parseConfig() {
|
||||||
config.LoadOSEnv([]string{"USER"})
|
config.LoadOSEnv([]string{"USER"})
|
||||||
config.LoadOSEnv([]string{"BUILDDEBUG"})
|
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
|
// add driver for support of yaml and json
|
||||||
config.AddDriver(yaml.Driver)
|
config.AddDriver(yaml.Driver)
|
||||||
config.AddDriver(json.Driver)
|
config.AddDriver(json.Driver)
|
||||||
|
|
31
infoTabUI.go
31
infoTabUI.go
|
@ -173,28 +173,6 @@ func addTableTab() {
|
||||||
gui.AddTableTab(cloudtab, 1, "test seven", 7, parts)
|
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 {
|
func addVmsTab(count int) *gui.TableData {
|
||||||
var parts []gui.InputData
|
var parts []gui.InputData
|
||||||
|
|
||||||
|
@ -212,33 +190,42 @@ func addVmsTab(count int) *gui.TableData {
|
||||||
tmp.Heading = "name"
|
tmp.Heading = "name"
|
||||||
tmp.Index = human
|
tmp.Index = human
|
||||||
parts = append(parts, tmp)
|
parts = append(parts, tmp)
|
||||||
|
human += 1
|
||||||
|
|
||||||
tmp = gui.InputData{}
|
tmp = gui.InputData{}
|
||||||
tmp.CellType = "TEXTCOLOR"
|
tmp.CellType = "TEXTCOLOR"
|
||||||
tmp.Heading = "hostname"
|
tmp.Heading = "hostname"
|
||||||
tmp.Index = human
|
tmp.Index = human
|
||||||
parts = append(parts, tmp)
|
parts = append(parts, tmp)
|
||||||
|
human += 1
|
||||||
|
|
||||||
tmp = gui.InputData{}
|
tmp = gui.InputData{}
|
||||||
tmp.CellType = "TEXTCOLOR"
|
tmp.CellType = "TEXTCOLOR"
|
||||||
tmp.Heading = "IPv6"
|
tmp.Heading = "IPv6"
|
||||||
tmp.Index = human
|
tmp.Index = human
|
||||||
parts = append(parts, tmp)
|
parts = append(parts, tmp)
|
||||||
|
human += 1
|
||||||
|
|
||||||
tmp = gui.InputData{}
|
tmp = gui.InputData{}
|
||||||
tmp.CellType = "TEXTCOLOR"
|
tmp.CellType = "TEXTCOLOR"
|
||||||
tmp.Heading = "cpus"
|
tmp.Heading = "cpus"
|
||||||
|
tmp.Index = human
|
||||||
parts = append(parts, tmp)
|
parts = append(parts, tmp)
|
||||||
|
human += 1
|
||||||
|
|
||||||
tmp = gui.InputData{}
|
tmp = gui.InputData{}
|
||||||
tmp.CellType = "TEXTCOLOR"
|
tmp.CellType = "TEXTCOLOR"
|
||||||
tmp.Heading = "memory"
|
tmp.Heading = "memory"
|
||||||
|
tmp.Index = human
|
||||||
parts = append(parts, tmp)
|
parts = append(parts, tmp)
|
||||||
|
human += 1
|
||||||
|
|
||||||
tmp = gui.InputData{}
|
tmp = gui.InputData{}
|
||||||
tmp.CellType = "BUTTON"
|
tmp.CellType = "BUTTON"
|
||||||
tmp.Heading = "Details"
|
tmp.Heading = "Details"
|
||||||
|
tmp.Index = human
|
||||||
parts = append(parts, tmp)
|
parts = append(parts, tmp)
|
||||||
|
human += 1
|
||||||
|
|
||||||
mh := gui.AddTableTab(cloudtab, 1, "Virtual Machines", count, parts)
|
mh := gui.AddTableTab(cloudtab, 1, "Virtual Machines", count, parts)
|
||||||
return mh
|
return mh
|
||||||
|
|
5
main.go
5
main.go
|
@ -10,7 +10,7 @@ import "github.com/gookit/config"
|
||||||
import "github.com/andlabs/ui"
|
import "github.com/andlabs/ui"
|
||||||
import _ "github.com/andlabs/ui/winmanifest"
|
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"
|
// import "github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
|
@ -64,6 +64,9 @@ func main() {
|
||||||
|
|
||||||
go gorillaDial("v000185.testing.com.customers.wprod.wit.com:9000")
|
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
|
// make this the main loop in an attempt to figure out the crashes
|
||||||
// do not change this until the GUI is stable
|
// do not change this until the GUI is stable
|
||||||
ui.Main(setupCloudUI)
|
ui.Main(setupCloudUI)
|
||||||
|
|
Loading…
Reference in New Issue