| OLD | NEW |
| (Empty) | |
| 1 package handlers |
| 2 |
| 3 import ( |
| 4 "html/template" |
| 5 "net/http" |
| 6 ) |
| 7 |
| 8 func init() { |
| 9 http.HandleFunc("/gerrit-reporter/status", statusPageHandler) |
| 10 http.HandleFunc("/gerrit-reporter/queue-handler", queueHandler) |
| 11 } |
| 12 |
| 13 var basePage = template.Must(template.ParseFiles("templates/base.html")) |
| 14 |
| 15 func statusPageHandler(w http.ResponseWriter, r *http.Request) { |
| 16 // TODO(emso): Add Gerrit reporter stats |
| 17 data := map[string]interface{}{ |
| 18 "Msg": "Status of the Gerrit Reporter ...", |
| 19 } |
| 20 basePage.Execute(w, data) |
| 21 } |
| 22 |
| 23 func queueHandler(w http.ResponseWriter, r *http.Request) { |
| 24 // TODO(emso): Process request and report event to Gerrit |
| 25 } |
| OLD | NEW |