diff options
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7,6 +7,7 @@ import ( "time" "go.wit.com/lib/gui/shell" + pb "go.wit.com/lib/protobuf/virtbuf" "go.wit.com/log" ) @@ -23,7 +24,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { // is the cluster running what it should? if tmp == "/droplets" { for _, d := range me.droplets { - if d.pb.StartState != "ON" { + if d.pb.StartState != pb.DropletState_ON { continue } dur := time.Since(d.lastpoll) // Calculate the elapsed time @@ -33,7 +34,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { } else { hname = d.h.pb.Hostname } - if d.CurrentState != "ON" { + if d.CurrentState != pb.DropletState_ON { fmt.Fprintln(w, "BAD STATE ", d.pb.Hostname, hname, "(", d.pb.StartState, "vs", d.CurrentState, ")", shell.FormatDuration(dur)) } else { dur := time.Since(d.lastpoll) // Calculate the elapsed time |
