summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go26
1 files changed, 6 insertions, 20 deletions
diff --git a/http.go b/http.go
index f260143..857e117 100644
--- a/http.go
+++ b/http.go
@@ -21,25 +21,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
var route string
route = cleanURL(r.URL.Path)
- // is the cluster running what it should?
- if route == "/droplets" {
- for _, d := range me.cluster.Droplets {
- var msg string
- if d.StartState == pb.DropletState_ON {
- msg = "(should be on)"
- }
- switch d.CurrentState {
- case pb.DropletState_ON:
- fmt.Fprintln(w, d.Hostname, "ON")
- case pb.DropletState_OFF:
- fmt.Fprintln(w, d.Hostname, msg)
- default:
- fmt.Fprintln(w, d.Hostname, "? state:", d.CurrentState, msg)
- }
- }
- return
- }
-
// show only what droplets should be running but are missing
if route == "/missing" {
var count int
@@ -132,7 +113,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
}
if route == "/dumpdroplets" {
- dumpDroplets(w)
+ dumpDroplets(w, false)
+ return
+ }
+
+ if route == "/dumpdropletsfull" {
+ dumpDroplets(w, true)
return
}