Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: milo/frontend/view_console.go

Issue 2983353002: Milo: Fix console table alignment (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The LUCI Authors. 1 // Copyright 2017 The LUCI Authors.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 current = s 149 current = s
150 } 150 }
151 } 151 }
152 if colspan != 0 { 152 if colspan != 0 {
153 result += fmt.Sprintf(`<th colspan="%d">%s</th>`, colspa n, current) 153 result += fmt.Sprintf(`<th colspan="%d">%s</th>`, colspa n, current)
154 } 154 }
155 result += "</tr>" 155 result += "</tr>"
156 } 156 }
157 157
158 // Last row: The actual builder shortnames. 158 // Last row: The actual builder shortnames.
159 » result += "<tr><th></th>" 159 » result += "<tr><th></th><th></th>"
160 for _, br := range c.BuilderRef { 160 for _, br := range c.BuilderRef {
161 result += fmt.Sprintf("<th>%s</th>", br.ShortName) 161 result += fmt.Sprintf("<th>%s</th>", br.ShortName)
162 } 162 }
163 result += "</tr>" 163 result += "</tr>"
164 return template.HTML(result) 164 return template.HTML(result)
165 } 165 }
166 166
167 func (c consoleRenderer) BuilderLink(bs *model.BuildSummary) (*resp.Link, error) { 167 func (c consoleRenderer) BuilderLink(bs *model.BuildSummary) (*resp.Link, error) {
168 _, _, builderName, err := buildsource.BuilderID(bs.BuilderID).Split() 168 _, _, builderName, err := buildsource.BuilderID(bs.BuilderID).Split()
169 if err != nil { 169 if err != nil {
(...skipping 23 matching lines...) Expand all
193 } 193 }
194 194
195 // ConsoleMainHandler is a redirect handler that redirects the user to the main 195 // ConsoleMainHandler is a redirect handler that redirects the user to the main
196 // console for a particular project. 196 // console for a particular project.
197 func ConsoleMainHandler(ctx *router.Context) { 197 func ConsoleMainHandler(ctx *router.Context) {
198 w, r, p := ctx.Writer, ctx.Request, ctx.Params 198 w, r, p := ctx.Writer, ctx.Request, ctx.Params
199 proj := p.ByName("project") 199 proj := p.ByName("project")
200 http.Redirect(w, r, fmt.Sprintf("/console/%s/main", proj), http.StatusMo vedPermanently) 200 http.Redirect(w, r, fmt.Sprintf("/console/%s/main", proj), http.StatusMo vedPermanently)
201 return 201 return
202 } 202 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698