cmd/coordinator: fix the /builders page, add Host info

Change-Id: I8828d62918e29c732592d82f49c48a8c3442c7f3
Reviewed-on: https://go-review.googlesource.com/29674
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index ce21a5f..e648920 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -503,6 +503,20 @@
 	return strings.TrimSuffix(owner, "@golang.org")
 }
 
+// PoolName returns a short summary of the builder's host type for the
+// http://farmer.golang.org/builders page.
+func (c *HostConfig) PoolName() string {
+	switch {
+	case c.IsReverse:
+		return "Reverse (dedicated machine/VM)"
+	case c.IsGCE():
+		return "GCE VM"
+	case c.IsKube():
+		return "Kubernetes container"
+	}
+	return "??"
+}
+
 // GCENumCPU reports the number of GCE CPUs this buildlet requires.
 func (c *HostConfig) GCENumCPU() int {
 	t := c.MachineType()