GUI: add a example for wit/gui
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
77659fd593
commit
3a28ded3e8
6
Makefile
6
Makefile
|
@ -26,6 +26,9 @@ build:
|
||||||
cd example-ui-table; go install # spreadsheet
|
cd example-ui-table; go install # spreadsheet
|
||||||
cd example-ui-show-hide; go install # toggle hide, show
|
cd example-ui-show-hide; go install # toggle hide, show
|
||||||
|
|
||||||
|
# wit/gui things
|
||||||
|
cd example-gui; go install # an example using the wit/gui wrapper
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
cd example-lookupAAAA; go install # nslookup
|
cd example-lookupAAAA; go install # nslookup
|
||||||
cd example-json-decode; go install # raw golang byte handling
|
cd example-json-decode; go install # raw golang byte handling
|
||||||
|
@ -34,8 +37,9 @@ build:
|
||||||
# golang things
|
# golang things
|
||||||
cd example-flag; go install # process argv
|
cd example-flag; go install # process argv
|
||||||
cd example-pprof; go install # dump out go process internals
|
cd example-pprof; go install # dump out go process internals
|
||||||
|
cd example-protobuf; go install # convert json into golang protobuf struct
|
||||||
cd example-bench-fast-timer; go install # time golang channels
|
cd example-bench-fast-timer; go install # time golang channels
|
||||||
cd example-bench-readWriteOps; go install #
|
cd example-bench-readWriteOps; go install # uses channels to time select
|
||||||
|
|
||||||
# witgoget='-v -t' make prep
|
# witgoget='-v -t' make prep
|
||||||
# witgoget='-v -t -u' make prep # to update
|
# witgoget='-v -t -u' make prep # to update
|
||||||
|
|
|
@ -65,10 +65,11 @@ func main() {
|
||||||
gui.StartNewWindow(false, "test5", 2, showBox)
|
gui.StartNewWindow(false, "test5", 2, showBox)
|
||||||
}
|
}
|
||||||
|
|
||||||
func showBox(gw *gui.GuiWindow) *gui.GuiBox {
|
// func showBox(gw *gui.GuiWindow) *gui.GuiBox {
|
||||||
|
func showBox(gw *gui.GuiBox) *gui.GuiBox {
|
||||||
log.Println("ShowSplashBox() START")
|
log.Println("ShowSplashBox() START")
|
||||||
|
|
||||||
box := gui.HardBox(gw, gui.Yaxis, "Cloud Accounts")
|
box := gui.HardBox(gw.Window, gui.Yaxis, "Cloud Accounts")
|
||||||
|
|
||||||
log.Println("showBox() START GW IS NOW: gw =", gw)
|
log.Println("showBox() START GW IS NOW: gw =", gw)
|
||||||
log.Println("showBox() box =", box)
|
log.Println("showBox() box =", box)
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"width": 800,
|
||||||
|
"height": 600,
|
||||||
|
"accounts": [
|
||||||
|
{
|
||||||
|
"ID": 42,
|
||||||
|
"nick": "Alpha jcarr",
|
||||||
|
"username": "jcarr@wit.com",
|
||||||
|
"email": "jcarr@wit.com",
|
||||||
|
"token": "alksjdf",
|
||||||
|
"hostname": "jcarr.customers.wprod.wit.com",
|
||||||
|
"password": "witbadpass",
|
||||||
|
"URL": "http://stackapi-api1.stackapi.customers.wprod.wit.com:4000/",
|
||||||
|
"domain": "jcarr.customers.wprod.wit.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ID": 44,
|
||||||
|
"nick": "Alpha alfonso",
|
||||||
|
"username": "alfonso@wit.com",
|
||||||
|
"email": "alfonso@wit.com",
|
||||||
|
"token": "aklsdjf",
|
||||||
|
"hostname": "alfonso.customers.wprod.wit.com",
|
||||||
|
"password": "witbadpass",
|
||||||
|
"URL": "http://stackapi-api1.stackapi.customers.wprod.wit.com:4000/",
|
||||||
|
"domain": "alfonso.customers.wprod.wit.com"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -25,7 +25,7 @@ import "github.com/davecgh/go-spew/spew"
|
||||||
func loadDefaultConfig(a string) pb.Config {
|
func loadDefaultConfig(a string) pb.Config {
|
||||||
sets := pb.Config{}
|
sets := pb.Config{}
|
||||||
|
|
||||||
b, err := ioutil.ReadFile("../resources/cloud-control-panel.json")
|
b, err := ioutil.ReadFile("cloud-control-panel.json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("ioutil.ReadFile() ERROR =", err)
|
log.Println("ioutil.ReadFile() ERROR =", err)
|
||||||
}
|
}
|
Loading…
Reference in New Issue