| OLD | NEW |
| 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 |
| 11 "github.com/luci/luci-go/common/sync/parallel" | 11 "github.com/luci/luci-go/common/sync/parallel" |
| 12 "github.com/luci/luci-go/milo/api/resp" | 12 "github.com/luci/luci-go/milo/api/resp" |
| 13 » "github.com/luci/luci-go/milo/build_source/buildbot" | 13 » "github.com/luci/luci-go/milo/buildsource/buildbot" |
| 14 » "github.com/luci/luci-go/milo/build_source/buildbucket" | 14 » "github.com/luci/luci-go/milo/buildsource/buildbucket" |
| 15 "github.com/luci/luci-go/milo/common" | 15 "github.com/luci/luci-go/milo/common" |
| 16 ) | 16 ) |
| 17 | 17 |
| 18 func frontpageHandler(c *router.Context) { | 18 func frontpageHandler(c *router.Context) { |
| 19 fp := resp.FrontPage{} | 19 fp := resp.FrontPage{} |
| 20 var mBuildbot, mBuildbucket *resp.CIService | 20 var mBuildbot, mBuildbucket *resp.CIService |
| 21 | 21 |
| 22 err := parallel.FanOutIn(func(ch chan<- func() error) { | 22 err := parallel.FanOutIn(func(ch chan<- func() error) { |
| 23 ch <- func() (err error) { | 23 ch <- func() (err error) { |
| 24 mBuildbot, err = buildbot.GetAllBuilders(c.Context) | 24 mBuildbot, err = buildbot.GetAllBuilders(c.Context) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 }, | 62 }, |
| 63 "error": "couldn't find ice cream", | 63 "error": "couldn't find ice cream", |
| 64 } | 64 } |
| 65 return []common.TestBundle{ | 65 return []common.TestBundle{ |
| 66 { | 66 { |
| 67 Description: "Basic frontpage", | 67 Description: "Basic frontpage", |
| 68 Data: *data, | 68 Data: *data, |
| 69 }, | 69 }, |
| 70 } | 70 } |
| 71 } | 71 } |
| OLD | NEW |