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

Side by Side Diff: milo/appengine/frontend/frontpage.go

Issue 2799873002: Milo: Fix frontpage bug (Closed)
Patch Set: assign Created 3 years, 8 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 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package frontend 5 package frontend
6 6
7 import ( 7 import (
8 "github.com/luci/luci-go/server/router" 8 "github.com/luci/luci-go/server/router"
9 "github.com/luci/luci-go/server/templates" 9 "github.com/luci/luci-go/server/templates"
10 10
(...skipping 14 matching lines...) Expand all
25 return err 25 return err
26 } 26 }
27 ch <- func() (err error) { 27 ch <- func() (err error) {
28 mBuildbucket, err = buildbucket.GetAllBuilders(c.Context ) 28 mBuildbucket, err = buildbucket.GetAllBuilders(c.Context )
29 return err 29 return err
30 } 30 }
31 }) 31 })
32 32
33 fp.CIServices = append(fp.CIServices, *mBuildbucket) 33 fp.CIServices = append(fp.CIServices, *mBuildbucket)
34 fp.CIServices = append(fp.CIServices, *mBuildbot) 34 fp.CIServices = append(fp.CIServices, *mBuildbot)
35 errMsg := ""
36 if err != nil {
37 errMsg = err.Error()
38 }
35 templates.MustRender(c.Context, c.Writer, "pages/frontpage.html", templa tes.Args{ 39 templates.MustRender(c.Context, c.Writer, "pages/frontpage.html", templa tes.Args{
36 "frontpage": fp, 40 "frontpage": fp,
37 » » "error": err.Error(), 41 » » "error": errMsg,
38 }) 42 })
39 } 43 }
40 44
41 func frontpageTestData() []common.TestBundle { 45 func frontpageTestData() []common.TestBundle {
42 data := &templates.Args{ 46 data := &templates.Args{
43 "frontpage": resp.FrontPage{ 47 "frontpage": resp.FrontPage{
44 CIServices: []resp.CIService{ 48 CIServices: []resp.CIService{
45 { 49 {
46 Name: "Module 1", 50 Name: "Module 1",
47 BuilderGroups: []resp.BuilderGroup{ 51 BuilderGroups: []resp.BuilderGroup{
(...skipping 16 matching lines...) Expand all
64 }, 68 },
65 "error": "couldn't find ice cream", 69 "error": "couldn't find ice cream",
66 } 70 }
67 return []common.TestBundle{ 71 return []common.TestBundle{
68 { 72 {
69 Description: "Basic frontpage", 73 Description: "Basic frontpage",
70 Data: *data, 74 Data: *data,
71 }, 75 },
72 } 76 }
73 } 77 }
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