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

Unified Diff: go/src/infra/tricium/service/gerrit-reporter/handlers.go

Issue 2149853003: Adds checking of template error (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Adds infra testing expectation Created 4 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 side-by-side diff with in-line comments
Download patch
Index: go/src/infra/tricium/service/gerrit-reporter/handlers.go
diff --git a/go/src/infra/tricium/service/gerrit-reporter/handlers.go b/go/src/infra/tricium/service/gerrit-reporter/handlers.go
index ab9fee120bc0ae497aa4a3aeb9aad70cc091ac1d..d3c9b5e868a45687329554e59b2d3000c2883ec5 100644
--- a/go/src/infra/tricium/service/gerrit-reporter/handlers.go
+++ b/go/src/infra/tricium/service/gerrit-reporter/handlers.go
@@ -6,8 +6,9 @@
package handlers
import (
- "html/template"
"net/http"
+
+ "infra/tricium/service/common"
)
func init() {
@@ -15,14 +16,12 @@ func init() {
http.HandleFunc("/gerrit-reporter/queue-handler", queueHandler)
}
-var basePage = template.Must(template.ParseFiles("templates/base.html"))
-
func statusPageHandler(w http.ResponseWriter, r *http.Request) {
// TODO(emso): Add Gerrit reporter stats
- data := map[string]interface{}{
+ d := map[string]interface{}{
"Msg": "Status of the Gerrit Reporter ...",
}
- basePage.Execute(w, data)
+ common.ShowBasePage(w, d)
}
func queueHandler(w http.ResponseWriter, r *http.Request) {
« no previous file with comments | « go/src/infra/tricium/service/gerrit-poller/handlers.go ('k') | go/src/infra/tricium/service/workflow-launcher/handlers.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698