OLD | NEW |
1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 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 "net/http" | 8 "net/http" |
9 | 9 |
10 "cloud.google.com/go/datastore" | 10 "cloud.google.com/go/datastore" |
11 | 11 |
12 "github.com/luci/luci-go/common/logging" | 12 "github.com/luci/luci-go/common/logging" |
13 » "github.com/luci/luci-go/milo/appengine/common" | 13 » "github.com/luci/luci-go/milo/common" |
14 "github.com/luci/luci-go/server/router" | 14 "github.com/luci/luci-go/server/router" |
15 "github.com/luci/luci-go/server/templates" | 15 "github.com/luci/luci-go/server/templates" |
16 ) | 16 ) |
17 | 17 |
18 // ConfigsHandler renders the page showing the currently loaded set of luci-conf
igs. | 18 // ConfigsHandler renders the page showing the currently loaded set of luci-conf
igs. |
19 func ConfigsHandler(c *router.Context) { | 19 func ConfigsHandler(c *router.Context) { |
20 projects, err := common.GetAllProjects(c.Context) | 20 projects, err := common.GetAllProjects(c.Context) |
21 if err != nil { | 21 if err != nil { |
22 common.ErrorPage( | 22 common.ErrorPage( |
23 c, http.StatusInternalServerError, | 23 c, http.StatusInternalServerError, |
(...skipping 24 matching lines...) Expand all Loading... |
48 servErr := common.UpdateServiceConfig(c) | 48 servErr := common.UpdateServiceConfig(c) |
49 if servErr != nil { | 49 if servErr != nil { |
50 logging.WithError(servErr).Errorf(c, "service update handler enc
ountered error") | 50 logging.WithError(servErr).Errorf(c, "service update handler enc
ountered error") |
51 } | 51 } |
52 if projErr != nil || servErr != nil { | 52 if projErr != nil || servErr != nil { |
53 h.WriteHeader(http.StatusInternalServerError) | 53 h.WriteHeader(http.StatusInternalServerError) |
54 return | 54 return |
55 } | 55 } |
56 h.WriteHeader(http.StatusOK) | 56 h.WriteHeader(http.StatusOK) |
57 } | 57 } |
OLD | NEW |