cmd/coordinator: show expected number of reverse buildlets in HTML

Change-Id: Iabbf2023fc6122fceb151f97b1d9563da23445d0
Reviewed-on: https://go-review.googlesource.com/107595
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/coordinator/reverse.go b/cmd/coordinator/reverse.go
index 783604e..5e4dd42 100644
--- a/cmd/coordinator/reverse.go
+++ b/cmd/coordinator/reverse.go
@@ -349,12 +349,17 @@
 	}
 	sort.Strings(typs)
 
-	io.WriteString(w, "<b>Reverse pool summary</b><ul>")
+	io.WriteString(w, "<b>Reverse pool summary</b> (in use / total)<ul>")
 	if len(typs) == 0 {
 		io.WriteString(w, "<li>no connections</li>")
 	}
 	for _, typ := range typs {
-		fmt.Fprintf(w, "<li>%s: %d/%d</li>", typ, inUse[typ], total[typ])
+		if dashboard.Hosts[typ] != nil && total[typ] < dashboard.Hosts[typ].ExpectNum {
+			fmt.Fprintf(w, "<li>%s: %d/%d (%d missing)</li>",
+				typ, inUse[typ], total[typ], dashboard.Hosts[typ].ExpectNum-total[typ])
+		} else {
+			fmt.Fprintf(w, "<li>%s: %d/%d</li>", typ, inUse[typ], total[typ])
+		}
 	}
 	io.WriteString(w, "</ul>")