summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug.go11
-rw-r--r--gui.go1
-rw-r--r--mainCloudBox.go2
3 files changed, 12 insertions, 2 deletions
diff --git a/debug.go b/debug.go
index 5d8f0aa..4389bde 100644
--- a/debug.go
+++ b/debug.go
@@ -79,9 +79,14 @@ func addDebuggingButtons(vbox *ui.Box, custom func(*ButtonMap)) {
func runPingClick(b *ButtonMap) {
log.Println("runPingClick START")
+ log.Println("runTestExecClick b.VM", b.VM)
+ hostname := "localhost"
+ if (b.VM != nil) {
+ hostname = b.VM.Hostname
+ }
spew.Dump(b)
var tmp []string
- tmp = append(tmp, "xterm", "-e", "ping localhost")
+ tmp = append(tmp, "xterm", "-e", "ping " + hostname + ";bash")
runCommand(tmp)
log.Println("runPingClick END")
}
@@ -91,7 +96,7 @@ func runTestExecClick(b *ButtonMap) {
if runtime.GOOS == "linux" {
go runSimpleCommand("xterm -report-fonts")
} else if runtime.GOOS == "windows" {
- go runSimpleCommand("cmd.exe")
+ go runSimpleCommand("mintty.exe")
} else {
go runSimpleCommand("xterm")
}
@@ -115,6 +120,8 @@ func runCommand(cmdArgs []string) {
process.Start()
log.Println("runXterm process.Wait()")
process.Wait()
+ log.Println("runXterm NEED TO CHECK THE TIME HERE TO SEE IF THIS WORKED")
+ log.Println("runXterm OTHERWISE INFORM THE USER")
log.Println("runXterm END")
log.Println("runXterm END")
log.Println("runXterm END")
diff --git a/gui.go b/gui.go
index c811bd9..f9744bf 100644
--- a/gui.go
+++ b/gui.go
@@ -201,6 +201,7 @@ func CreateButton(a *pb.Account, vm *pb.Event_VM,
var newmap ButtonMap
newmap.B = newB
newmap.Account = a
+ newmap.VM = vm
newmap.Action = note
newmap.custom = custom
newmap.aTab = Data.CurrentTab
diff --git a/mainCloudBox.go b/mainCloudBox.go
index b6f23e2..dd0842a 100644
--- a/mainCloudBox.go
+++ b/mainCloudBox.go
@@ -3,6 +3,7 @@ package gui
import "log"
import "time"
import "fmt"
+// import "os"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
@@ -335,6 +336,7 @@ func createVmBox(tab *ui.Tab, custom func(*ButtonMap), pbVM *pb.Event_VM) {
hboxButtons.SetPadded(true)
vbox.Append(hboxButtons, false)
+ log.Println("pbVM =", pbVM)
hboxButtons.Append(CreateButton(nil, pbVM, "Power On", "POWERON", custom), false)
hboxButtons.Append(CreateButton(nil, pbVM, "Power Off", "POWEROFF", custom), false)
hboxButtons.Append(CreateButton(nil, pbVM, "Destroy", "DESTROY", custom), false)