| Index: milo/frontend/middleware.go
|
| diff --git a/milo/frontend/middleware.go b/milo/frontend/middleware.go
|
| index b728c2296285f8e33e1cd47a5a8894d3740525a3..0e3e037c1f860e25a5c4ecf97e80d21e9de71c2d 100644
|
| --- a/milo/frontend/middleware.go
|
| +++ b/milo/frontend/middleware.go
|
| @@ -42,7 +42,6 @@ var funcMap = template.FuncMap{
|
| "shortHash": shortHash,
|
| "startswith": strings.HasPrefix,
|
| "sub": sub,
|
| - "consoleHeader": consoleHeader,
|
| "pagedURL": pagedURL,
|
| "formatTime": formatTime,
|
| "percent": percent,
|
| @@ -62,54 +61,6 @@ func localTime(ifZero string, t time.Time) template.HTML {
|
| t.Format(time.RFC850)))
|
| }
|
|
|
| -func consoleHeader(brs []resp.BuilderRef) template.HTML {
|
| - // First, split things into nice rows and find the max depth.
|
| - cat := make([][]string, len(brs))
|
| - depth := 0
|
| - for i, b := range brs {
|
| - cat[i] = b.Category
|
| - if len(cat[i]) > depth {
|
| - depth = len(cat[i])
|
| - }
|
| - }
|
| -
|
| - result := ""
|
| - for row := 0; row < depth; row++ {
|
| - result += "<tr><th></th>"
|
| - // "" is the first node, " " is an empty node.
|
| - current := ""
|
| - colspan := 0
|
| - for _, br := range cat {
|
| - colspan++
|
| - var s string
|
| - if row >= len(br) {
|
| - s = " "
|
| - } else {
|
| - s = br[row]
|
| - }
|
| - if s != current || current == " " {
|
| - if current != "" || current == " " {
|
| - result += fmt.Sprintf(`<th colspan="%d">%s</th>`, colspan, current)
|
| - colspan = 0
|
| - }
|
| - current = s
|
| - }
|
| - }
|
| - if colspan != 0 {
|
| - result += fmt.Sprintf(`<th colspan="%d">%s</th>`, colspan, current)
|
| - }
|
| - result += "</tr>"
|
| - }
|
| -
|
| - // Last row: The actual builder shortnames.
|
| - result += "<tr><th></th>"
|
| - for _, br := range brs {
|
| - result += fmt.Sprintf("<th>%s</th>", br.ShortName)
|
| - }
|
| - result += "</tr>"
|
| - return template.HTML(result)
|
| -}
|
| -
|
| // humanDuration translates d into a human readable string of x units y units,
|
| // where x and y could be in days, hours, minutes, or seconds, whichever is the
|
| // largest.
|
|
|