diff options
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -5,7 +5,6 @@ import ( "net/http" "strings" - "go.wit.com/lib/gui/shell" "go.wit.com/log" ) @@ -30,24 +29,8 @@ func okHandler(w http.ResponseWriter, r *http.Request) { } if tmp == "/vms" { - for _, hostname := range argv.Hosts { - url := "http://" + hostname + ":2520/vms" - log.Info("wget url =", url) - s := shell.Wget(url) - if s == nil { - continue; - } - var bytesSplice []byte - bytesSplice = s.Bytes() - // fmt.Fprintln(w, string(bytesSplice)) - for _, line := range strings.Split(string(bytesSplice), "\n") { - if line == "" { - continue - } - fmt.Fprintln(w, hostname, line) - log.Info("LINE: =", hostname, line) - } - // log.Info("i, s =", hostname, i, s) + for _, d := range me.droplets { + fmt.Fprintln(w, d.Hostname, d.hname, d.lastpoll) } return } |
