Compare commits

...

6 Commits

Author SHA1 Message Date
Jeff Carr 19c4932cba BUILD: fix the import paths
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-08-09 00:45:36 -05:00
Jeff Carr 96b1951184 BUILD: update the import paths so it will build
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-08-09 00:35:28 -05:00
Jeff Carr 4be77889d1 v0.6.46
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-28 14:08:46 -07:00
Jeff Carr b10f647312 fix the 'ID' name
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-28 14:06:15 -07:00
Jeff Carr 40ec27a48b v0.6.45
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-28 12:06:53 -07:00
Akram 92a3739391 Updated to version 0.6.44.
Signed-off-by: Akram <akram@wit.com>
2019-06-26 16:30:47 -07:00
19 changed files with 56 additions and 54 deletions

1
README
View File

@ -1 +0,0 @@
README.md

View File

@ -24,8 +24,8 @@ must be installed.
# build # build
``` ```
go get -v -t -u git.wit.com/wit/cloud-control-panel go get -v -t -u git.wit.org/wit/cloud-control-panel
cd ~/go/src/git.wit.com/wit/cloud-control-panel cd ~/go/src/git.wit.org/wit/cloud-control-panel
go build go build
./cloud-control-panel ./cloud-control-panel
``` ```

View File

@ -2,15 +2,15 @@ package main
// This should build the control panel correctly on each platform // This should build the control panel correctly on each platform
// Then, upload the binaries to mirrors.wit.com/cloud/control-panel // Then, upload the binaries to mirrors.wit.org/cloud/control-panel
import "log" import "log"
//import "fmt" //import "fmt"
//import "time" //import "time"
//import "os/user" //import "os/user"
import "git.wit.com/wit/shell" import "git.wit.org/wit/shell"
import build "git.wit.com/wit/cloud-control-panel-build" import build "git.wit.org/wit/cloud-control-panel-build"
var filename string var filename string

View File

@ -20,8 +20,8 @@ import "io/ioutil"
import "strings" import "strings"
import "github.com/golang/protobuf/jsonpb" import "github.com/golang/protobuf/jsonpb"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
import "git.wit.com/wit/shell" import "git.wit.org/wit/shell"
import "github.com/davecgh/go-spew/spew" import "github.com/davecgh/go-spew/spew"
@ -66,7 +66,7 @@ var customUsage = func() {
fmt.Println("") fmt.Println("")
fmt.Println("EXAMPLES:") fmt.Println("EXAMPLES:")
fmt.Println("") fmt.Println("")
fmt.Println(os.Args[0] + " --hostname test.hostname.wit.com") fmt.Println(os.Args[0] + " --hostname test.hostname.wit.org")
fmt.Println("") fmt.Println("")
} }
var defaultconfig *bool var defaultconfig *bool

View File

@ -3,8 +3,8 @@ package main
import "log" import "log"
import "github.com/golang/protobuf/proto" import "github.com/golang/protobuf/proto"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
var mychannel chan *pb.Event var mychannel chan *pb.Event
var currentMessage *pb.Event var currentMessage *pb.Event

View File

@ -11,8 +11,8 @@ import "time"
import "github.com/gorilla/websocket" import "github.com/gorilla/websocket"
import "github.com/golang/protobuf/proto" import "github.com/golang/protobuf/proto"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
// import "git.wit.com/wit/gui" // import "git.wit.org/wit/gui"
var gorillaConn *websocket.Conn var gorillaConn *websocket.Conn
@ -87,7 +87,7 @@ func closeGorillaConn() {
} }
func gorillaDial(hostname string) { func gorillaDial(hostname string) {
// var addr = flag.String("addr", "v000185.testing.com.customers.wprod.wit.com:9000", "http service address") // var addr = flag.String("addr", "v000185.testing.com.customers.wprod.wit.org:9000", "http service address")
for { for {
u := url.URL{ u := url.URL{

View File

@ -3,8 +3,8 @@ package main
import "log" import "log"
import "fmt" import "fmt"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
func makeCloudInfoBox(gw *gui.GuiWindow) { func makeCloudInfoBox(gw *gui.GuiWindow) {
log.Println("makeCloudInfoBox() START gw =", gw) log.Println("makeCloudInfoBox() START gw =", gw)
@ -30,6 +30,9 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
vbox := gui.NewBox(box, gui.Xaxis, fmt.Sprintf("ACCOUNT %d", key)) vbox := gui.NewBox(box, gui.Xaxis, fmt.Sprintf("ACCOUNT %d", key))
log.Println("account = ", key, a) log.Println("account = ", key, a)
log.Println("Accounts[key] = ", config.Accounts[key]) log.Println("Accounts[key] = ", config.Accounts[key])
if config.Accounts[key] == nil {
continue;
}
log.Println("account.Nick = ", config.Accounts[key].Nick) log.Println("account.Nick = ", config.Accounts[key].Nick)
log.Println("account.Username = ", config.Accounts[key].Username) log.Println("account.Username = ", config.Accounts[key].Username)
log.Println("account.Token = ", config.Accounts[key].Token) log.Println("account.Token = ", config.Accounts[key].Token)
@ -100,7 +103,7 @@ func addSubdomainClick(b *gui.GuiButton) {
acc.Username = "jcarr@wit.com" acc.Username = "jcarr@wit.com"
acc.Email = "jcarr@wit.com" acc.Email = "jcarr@wit.com"
acc.Password = "badpass" acc.Password = "badpass"
acc.URL = "http://stackapi-api1.stackapi.customers.wprod.wit.com:4000/" acc.URL = "http://stackapi-api1.stackapi.customers.wprod.wit.org:4000/"
config.Accounts = append(config.Accounts, acc) config.Accounts = append(config.Accounts, acc)
makeCloudInfoBox(b.Box.Window) makeCloudInfoBox(b.Box.Window)
@ -125,7 +128,7 @@ func generateSubdomain(b *gui.GuiButton) {
} }
// subdomain.SetText("cust00013.wit.dev") // subdomain.SetText("cust00013.wit.dev")
txt := gui.SetText(b.Box, "SUBDOMAIN", "yourname.customers.wprod.wit.com") txt := gui.SetText(b.Box, "SUBDOMAIN", "yourname.customers.wprod.wit.org")
log.Println("generateSubdomain subdomain = ", txt) log.Println("generateSubdomain subdomain = ", txt)
log.Println("generateSubdomain END") log.Println("generateSubdomain END")
} }

View File

@ -6,8 +6,8 @@ import "time"
// import "runtime" // import "runtime"
// import "runtime/debug" // import "runtime/debug"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
// import "github.com/davecgh/go-spew/spew" // import "github.com/davecgh/go-spew/spew"
// //
@ -46,7 +46,7 @@ func mainMouseClick(b *gui.GuiButton) {
if (b == nil) { if (b == nil) {
log.Println("mainMouseClick() BACK IN MAIN CONTROL PANEL CODE (button is nil) WHY DID THIS HAPPEN?") log.Println("mainMouseClick() BACK IN MAIN CONTROL PANEL CODE (button is nil) WHY DID THIS HAPPEN?")
log.Println("THIS IS PROBABLY A BUG IN git.wit.com/gui") log.Println("THIS IS PROBABLY A BUG IN git.wit.org/gui")
// gui.ErrorWindow(gw, // gui.ErrorWindow(gw,
// "Unknown Mouse Event", // "Unknown Mouse Event",
// "Error in mainMouseClick()") // "Error in mainMouseClick()")

View File

@ -4,8 +4,8 @@ import "fmt"
import "image/color" import "image/color"
// import "runtime" // import "runtime"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
var windowsTextVeryLightGrey = color.RGBA{10, 10, 10, 10} var windowsTextVeryLightGrey = color.RGBA{10, 10, 10, 10}
var windowsTextBlack = color.RGBA{0, 0, 0, 255} var windowsTextBlack = color.RGBA{0, 0, 0, 255}

View File

@ -7,13 +7,13 @@ import "runtime"
import "os/exec" import "os/exec"
import "strings" import "strings"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import "git.wit.com/wit/shell" import "git.wit.org/wit/shell"
// import pb "git.wit.com/wit/witProtobuf" // import pb "git.wit.org/wit/witProtobuf"
import "github.com/davecgh/go-spew/spew" import "github.com/davecgh/go-spew/spew"
// import pb "git.wit.com/wit/witProtobuf" // import pb "git.wit.org/wit/witProtobuf"
func debugClick(b *gui.GuiButton) { func debugClick(b *gui.GuiButton) {
log.Println("debugClick() START") log.Println("debugClick() START")

View File

@ -3,13 +3,13 @@ package main
import "log" import "log"
import "runtime" import "runtime"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import "git.wit.com/wit/shell" import "git.wit.org/wit/shell"
import "github.com/andlabs/ui" import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest" import _ "github.com/andlabs/ui/winmanifest"
// import pb "git.wit.com/wit/witProtobuf" // import pb "git.wit.org/wit/witProtobuf"
func showSplashBox(box *gui.GuiBox) *gui.GuiBox { func showSplashBox(box *gui.GuiBox) *gui.GuiBox {
log.Println("ShowSplashBox() START") log.Println("ShowSplashBox() START")

View File

@ -3,8 +3,8 @@ package main
import "log" import "log"
import "fmt" import "fmt"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
// //
// THIS IS THE STANDARD VM DISPLAY TABLE // THIS IS THE STANDARD VM DISPLAY TABLE
@ -139,10 +139,10 @@ func createVmBox(gw *gui.GuiWindow, vm *pb.Event_VM) {
box = gui.HardBox(gw, gui.Xaxis, txt) box = gui.HardBox(gw, gui.Xaxis, txt)
// Add hostname entry box // Add hostname entry box
gui.MakeEntryVbox(box, "hostname:", vm.Hostname, true, "Hostname") gui.MakeEntryVbox(box, "hostname:", vm.Hostname, false, "Hostname")
gui.MakeEntryVbox(box, "IPv6:", vm.IPv6, true, "IPv6") gui.MakeEntryVbox(box, "IPv6:", vm.IPv6, false, "IPv6")
gui.MakeEntryVbox(box, "RAM:", fmt.Sprintf("%d",vm.Memory), true, "Memory") gui.MakeEntryVbox(box, "RAM:", fmt.Sprintf("%d",vm.Memory), false, "Memory")
gui.MakeEntryVbox(box, "CPU:", fmt.Sprintf("%d",vm.Cpus), true, "Cpus") gui.MakeEntryVbox(box, "CPU:", fmt.Sprintf("%d",vm.Cpus), false, "Cpus")
gui.MakeEntryVbox(box, "Disk (GB):", fmt.Sprintf("%d",vm.Disk), true, "Disk") gui.MakeEntryVbox(box, "Disk (GB):", fmt.Sprintf("%d",vm.Disk), true, "Disk")
gui.MakeEntryVbox(box, "OS Image:", vm.BaseImage, true, "BaseImage") gui.MakeEntryVbox(box, "OS Image:", vm.BaseImage, true, "BaseImage")

View File

@ -13,7 +13,7 @@ import "syscall"
// import "time" // import "time"
// import "reflect" // import "reflect"
// import "git.wit.com/wit/shell" // import "git.wit.org/wit/shell"
// import "github.com/davecgh/go-spew/spew" // import "github.com/davecgh/go-spew/spew"
func handleSignal(err interface{}, ret int) { func handleSignal(err interface{}, ret int) {

View File

@ -4,8 +4,8 @@ import "log"
import "fmt" import "fmt"
import "time" import "time"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
// import "github.com/davecgh/go-spew/spew" // import "github.com/davecgh/go-spew/spew"
@ -43,7 +43,7 @@ func login(b *gui.GuiButton) {
log.Println("\tLOGIN WAS OK!", msg) log.Println("\tLOGIN WAS OK!", msg)
log.Println("\tLOGIN WAS OK! old button.Account was =", values.Account) log.Println("\tLOGIN WAS OK! old button.Account was =", values.Account)
log.Println("\tLOGIN WAS OK! currentMessage.Account =", currentMessage.Account) log.Println("\tLOGIN WAS OK! currentMessage.Account =", currentMessage.Account)
if (values.Account.Id == currentMessage.Account.Id) { if (values.Account.ID == currentMessage.Account.ID) {
if (values.Account.Token != currentMessage.Account.Token) { if (values.Account.Token != currentMessage.Account.Token) {
log.Println("\tLOGIN SENT NEW TOKEN") log.Println("\tLOGIN SENT NEW TOKEN")
values.Account.Token = currentMessage.Account.Token values.Account.Token = currentMessage.Account.Token

16
main.go
View File

@ -12,10 +12,10 @@ import "reflect"
// this is the king of dns libraries // this is the king of dns libraries
import "github.com/miekg/dns" import "github.com/miekg/dns"
import "git.wit.com/wit/gui" import "git.wit.org/wit/gui"
import pb "git.wit.com/wit/witProtobuf" import pb "git.wit.org/jcarr/witProtobuf"
import "git.wit.com/jcarr/dnssecsocket" import "git.wit.org/jcarr/dnssecsocket"
import "git.wit.com/wit/shell" import "git.wit.org/wit/shell"
import "github.com/gobuffalo/packr" import "github.com/gobuffalo/packr"
import "github.com/davecgh/go-spew/spew" import "github.com/davecgh/go-spew/spew"
@ -120,10 +120,10 @@ func main() {
initChannel() initChannel()
go processEvents() go processEvents()
v185AAAA := lookupAAAA("v000185.testing.com.customers.wprod.wit.com") v185AAAA := lookupAAAA("v000185.testing.com.customers.wprod.wit.org")
log.Println("v185AAA = ", v185AAAA) log.Println("v185AAA = ", v185AAAA)
go gorillaDial("ccp.wit.com:9000") go gorillaDial("ccp.wit.org:9000")
// go gorillaDial("stackapi-ccp.stackapi.customers.wit.com:9000") // go gorillaDial("stackapi-ccp.stackapi.customers.wit.org:9000")
go gui.WatchGUI() go gui.WatchGUI()
// use this to discover what the OS thinks it's hostname is // use this to discover what the OS thinks it's hostname is
@ -199,7 +199,7 @@ func init() {
*/ */
} }
// get's sent the return values and errors from git.wit.com/wit/shell/ // get's sent the return values and errors from git.wit.org/wit/shell/
func handleShell(err interface{}, ret int) { func handleShell(err interface{}, ret int) {
log.Println("handleShell() shell.Run() END Returned ", ret) log.Println("handleShell() shell.Run() END Returned ", ret)
errChan <- err errChan <- err

View File

@ -1 +1 @@
0.6.43 0.6.46

View File

@ -3,7 +3,7 @@
"height": 600, "height": 600,
"accounts": [ "accounts": [
{ {
"id": 42, "ID": 42,
"nick": "Alpha jcarr", "nick": "Alpha jcarr",
"username": "jcarr@wit.com", "username": "jcarr@wit.com",
"email": "jcarr@wit.com", "email": "jcarr@wit.com",
@ -14,7 +14,7 @@
"domain": "jcarr.customers.wprod.wit.com" "domain": "jcarr.customers.wprod.wit.com"
}, },
{ {
"id": 44, "ID": 44,
"nick": "Alpha alfonso", "nick": "Alpha alfonso",
"username": "alfonso@wit.com", "username": "alfonso@wit.com",
"email": "alfonso@wit.com", "email": "alfonso@wit.com",

View File

@ -9,7 +9,7 @@ import "os"
import "time" import "time"
import "runtime" import "runtime"
import "git.wit.com/wit/shell" import "git.wit.org/wit/shell"
// import "github.com/davecgh/go-spew/spew" // import "github.com/davecgh/go-spew/spew"
@ -19,7 +19,7 @@ func upgrade() {
filename = "cloud-control-panel.exe" filename = "cloud-control-panel.exe"
} }
mirrors := "https://mirrors.wit.com/cloud/control-panel/" mirrors := "https://mirrors.wit.org/cloud/control-panel/"
upstreamVERSION := shell.Chomp(shell.Wget(mirrors + "VERSION")) upstreamVERSION := shell.Chomp(shell.Wget(mirrors + "VERSION"))
dir := "/v" + upstreamVERSION + "/linux/" dir := "/v" + upstreamVERSION + "/linux/"

View File

@ -6,7 +6,7 @@ package main
import "log" import "log"
// import "git.wit.com/wit/shell" // import "git.wit.org/wit/shell"
// import "github.com/davecgh/go-spew/spew" // import "github.com/davecgh/go-spew/spew"
func handleSignal(err interface{}, ret int) { func handleSignal(err interface{}, ret int) {