summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-12 10:59:11 -0500
committerJeff Carr <[email protected]>2024-10-12 10:59:11 -0500
commitd08d9f99bee4d4e93a8beda780d8e9f6099e32cb (patch)
tree78540be4d3b371569f59ee863621b03786a479c5 /http.go
parent0751e80559cbb34bc23639328938780c64063c92 (diff)
ugly but limping along progress
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'http.go')
-rw-r--r--http.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/http.go b/http.go
index 6c5e397..2188ed5 100644
--- a/http.go
+++ b/http.go
@@ -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
}