v0.5 : skip the account screens when the user already has one
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d9633fe2db
commit
41679c718b
6
Makefile
6
Makefile
|
@ -47,6 +47,12 @@ update:
|
|||
json-readable:
|
||||
cat /tmp/cloud-control-panel.json |jq -r --tab
|
||||
|
||||
json-restore:
|
||||
cp resources/jcarr.json ~/.config/cloud-control-panel.json
|
||||
|
||||
json-delete:
|
||||
mv ~/.config/cloud-control-panel.json /tmp
|
||||
|
||||
diff:
|
||||
git diff
|
||||
|
||||
|
|
61
config.json
61
config.json
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
"BUILDDEBUG": "",
|
||||
"MAIL": "/var/mail/jcarr",
|
||||
"USER": "jcarr",
|
||||
"arr1": [
|
||||
"lo",
|
||||
"wifi0",
|
||||
"docker0"
|
||||
],
|
||||
"baseKey": "value2",
|
||||
"accounts": {
|
||||
"jcarr": {
|
||||
"hostname": "fire.lab.wit.com",
|
||||
"domainname": "lab.wit.com",
|
||||
"port": 3333,
|
||||
"rows": 18,
|
||||
"proto": "tcp"
|
||||
},
|
||||
"jcarr2": {
|
||||
"hostname": "fire.lab.wit.com",
|
||||
"domainname": "lab.wit.com",
|
||||
"port": 3333,
|
||||
"rows": 18,
|
||||
"proto": "tcp"
|
||||
},
|
||||
"bmath": {
|
||||
"hostname": "v000185.testing.com.customers.wprod.wit.com",
|
||||
"domainname": "testing.com.customers.wprod.wit.com",
|
||||
"port": 9000,
|
||||
"proto": "tcp"
|
||||
}
|
||||
},
|
||||
"cloud": {
|
||||
"jcarr": {
|
||||
"hostname": "fire.lab.wit.com",
|
||||
"port": 3333,
|
||||
"rows": 18,
|
||||
"proto": "tcp"
|
||||
},
|
||||
"v000185": {
|
||||
"hostname": "v000185.testing.com.customers.wprod.wit.com",
|
||||
"port": 3333,
|
||||
"rows": 567,
|
||||
"proto": "tcp"
|
||||
}
|
||||
},
|
||||
"debug": false,
|
||||
"envKey1": "${NotExist|defValue}",
|
||||
"height": 600,
|
||||
"width": 800,
|
||||
"hostname": "localhost",
|
||||
"map1": {
|
||||
"key1": {
|
||||
"jwc1": "jcarr1",
|
||||
"jwc2": "jcarr2"
|
||||
},
|
||||
"key2": "val20"
|
||||
},
|
||||
"name": "app2",
|
||||
"shell": "${SHELL}"
|
||||
}
|
21
main.go
21
main.go
|
@ -89,7 +89,7 @@ func main() {
|
|||
|
||||
gui.Data.Width = config.Int("width")
|
||||
gui.Data.Height = config.Int("height")
|
||||
gui.Data.Version = "v0.4"
|
||||
gui.Data.Version = "v0.5"
|
||||
gui.Data.GitCommit = GITCOMMIT
|
||||
gui.Data.GoVersion = GOVERSION
|
||||
gui.Data.ButtonClickNew = buttonClickNew
|
||||
|
@ -167,12 +167,15 @@ func buttonClickNew(b *gui.ButtonMap) {
|
|||
}
|
||||
|
||||
func watchGUI() {
|
||||
log.Println("Sleep(2000)")
|
||||
time.Sleep(2000 * time.Millisecond)
|
||||
count := 0
|
||||
|
||||
for {
|
||||
log.Println("Sleep() in watchGUI() gui.Data.State =", gui.Data.State)
|
||||
time.Sleep(2000 * time.Millisecond)
|
||||
if (count > 10) {
|
||||
log.Println("Sleep() in watchGUI() gui.Data.State =", gui.Data.State)
|
||||
count = 0
|
||||
}
|
||||
count += 1
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
if (gui.Data.State == "bmath") {
|
||||
log.Println("\tTRIGGERING BMATH HERE")
|
||||
|
@ -186,5 +189,13 @@ func watchGUI() {
|
|||
log.Println("gui.State = kill")
|
||||
os.Exit(0)
|
||||
}
|
||||
if (gui.Data.State == "splash") {
|
||||
for account, _ := range config.StringMap("accounts") {
|
||||
log.Println("gui.State = splash BUT THERE IS AN ACCOUNT = ", account)
|
||||
log.Println("gui.State = splash BUT THERE IS AN ACCOUNT = ", account)
|
||||
log.Println("SETTING gui.State = main")
|
||||
gui.Data.State = "main";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,20 +8,6 @@
|
|||
"docker0"
|
||||
],
|
||||
"baseKey": "value2",
|
||||
"accounts": {
|
||||
"jcarr": {
|
||||
"hostname": "fire.lab.wit.com",
|
||||
"port": 3333,
|
||||
"rows": 18,
|
||||
"proto": "tcp"
|
||||
},
|
||||
"bmath": {
|
||||
"hostname": "v000185.testing.com.customers.wprod.wit.com",
|
||||
"domainname": "testing.com.customers.wprod.wit.com",
|
||||
"port": 9000,
|
||||
"proto": "tcp"
|
||||
}
|
||||
},
|
||||
"cloud": {
|
||||
"jcarr": {
|
||||
"hostname": "fire.lab.wit.com",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"BUILDDEBUG":"","MAIL":"/var/mail/jcarr","USER":"jcarr","accounts":{"bmath":{"domainname":"testing.com.customers.wprod.wit.com","hostname":"v000185.testing.com.customers.wprod.wit.com","port":9000,"proto":"tcp"},"jcarr":{"domainname":"lab.wit.com","hostname":"fire.lab.wit.com","port":3333,"proto":"tcp","rows":18},"jcarr2":{"domainname":"lab.wit.com","hostname":"fire.lab.wit.com","port":3333,"proto":"tcp","rows":18},"jcarr4":{"hostname":"v000185.testing.com.customers.wprod.wit.com","password":"test","username":"jcarr@wit.com"},"jcarr6":{"hostname":"v000185.testing.com.customers.wprod.wit.com","password":"testsinasfd","username":"jcarr@wit.com"}},"arr1":["lo","wifi0","docker0"],"baseKey":"value2","cloud":{"jcarr":{"hostname":"fire.lab.wit.com","port":3333,"proto":"tcp","rows":18},"v000185":{"hostname":"v000185.testing.com.customers.wprod.wit.com","port":3333,"proto":"tcp","rows":567}},"configfile":"/home/jcarr/.config/cloud-control-panel.json","debug":true,"debugging":true,"envKey1":"${NotExist|defValue}","height":600,"hostname":"localhost","map1":{"key1":{"jwc1":"jcarr1","jwc2":"jcarr2"},"key2":"val20"},"name":"app2","nogui":false,"shell":"${SHELL}","width":800}
|
Loading…
Reference in New Issue