OLD | NEW |
1 package main | 1 package main |
2 | 2 |
3 import ( | 3 import ( |
4 "encoding/json" | 4 "encoding/json" |
5 "flag" | 5 "flag" |
6 "fmt" | 6 "fmt" |
7 "io/ioutil" | 7 "io/ioutil" |
8 "net/http" | 8 "net/http" |
9 "os" | 9 "os" |
10 "path/filepath" | 10 "path/filepath" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 // /search*.html pages will be consolidated into one. | 425 // /search*.html pages will be consolidated into one. |
426 router.HandleFunc("/_/search", polySearchJSONHandler).Methods("GET") | 426 router.HandleFunc("/_/search", polySearchJSONHandler).Methods("GET") |
427 router.HandleFunc("/_/search3", search3JSONHandler).Methods("GET") | 427 router.HandleFunc("/_/search3", search3JSONHandler).Methods("GET") |
428 | 428 |
429 router.HandleFunc("/_/status/{test}", polyTestStatusHandler).Methods("GE
T") | 429 router.HandleFunc("/_/status/{test}", polyTestStatusHandler).Methods("GE
T") |
430 router.HandleFunc("/_/test", polyTestHandler).Methods("POST") | 430 router.HandleFunc("/_/test", polyTestHandler).Methods("POST") |
431 router.HandleFunc("/_/triage", polyTriageHandler).Methods("POST") | 431 router.HandleFunc("/_/triage", polyTriageHandler).Methods("POST") |
432 router.HandleFunc("/_/triagelog", polyTriageLogHandler).Methods("GET") | 432 router.HandleFunc("/_/triagelog", polyTriageLogHandler).Methods("GET") |
433 router.HandleFunc("/_/triagelog/undo", triageUndoHandler).Methods("POST"
) | 433 router.HandleFunc("/_/triagelog/undo", triageUndoHandler).Methods("POST"
) |
434 router.HandleFunc("/_/failure", failureListJSONHandler).Methods("GET") | 434 router.HandleFunc("/_/failure", failureListJSONHandler).Methods("GET") |
| 435 router.HandleFunc("/_/failure/clear", failureClearJSONHandler).Methods("
POST") |
435 router.HandleFunc("/_/trybot", listTrybotsJSONHandler).Methods("GET") | 436 router.HandleFunc("/_/trybot", listTrybotsJSONHandler).Methods("GET") |
436 | 437 |
437 router.HandleFunc("/byblame", byBlameHandler).Methods("GET") | 438 router.HandleFunc("/byblame", byBlameHandler).Methods("GET") |
438 router.HandleFunc("/cluster", templateHandler("cluster.html")).Methods("
GET") | 439 router.HandleFunc("/cluster", templateHandler("cluster.html")).Methods("
GET") |
439 router.HandleFunc("/search2", search2Handler).Methods("GET") | 440 router.HandleFunc("/search2", search2Handler).Methods("GET") |
440 router.HandleFunc("/cmp/{test}", templateHandler("compare.html")).Method
s("GET") | 441 router.HandleFunc("/cmp/{test}", templateHandler("compare.html")).Method
s("GET") |
441 router.HandleFunc("/detail", templateHandler("single.html")).Methods("GE
T") | 442 router.HandleFunc("/detail", templateHandler("single.html")).Methods("GE
T") |
442 router.HandleFunc("/diff", templateHandler("diff.html")).Methods("GET") | 443 router.HandleFunc("/diff", templateHandler("diff.html")).Methods("GET") |
443 router.HandleFunc("/help", templateHandler("help.html")).Methods("GET") | 444 router.HandleFunc("/help", templateHandler("help.html")).Methods("GET") |
444 router.HandleFunc("/ignores", templateHandler("ignores.html")).Methods("
GET") | 445 router.HandleFunc("/ignores", templateHandler("ignores.html")).Methods("
GET") |
(...skipping 13 matching lines...) Expand all Loading... |
458 } | 459 } |
459 | 460 |
460 // The polyStatusHandler is being polled, so we exclude it from logging. | 461 // The polyStatusHandler is being polled, so we exclude it from logging. |
461 http.HandleFunc("/_/trstatus", polyStatusHandler) | 462 http.HandleFunc("/_/trstatus", polyStatusHandler) |
462 http.Handle("/", rootHandler) | 463 http.Handle("/", rootHandler) |
463 | 464 |
464 // Start the server | 465 // Start the server |
465 glog.Infoln("Serving on http://127.0.0.1" + *port) | 466 glog.Infoln("Serving on http://127.0.0.1" + *port) |
466 glog.Fatal(http.ListenAndServe(*port, nil)) | 467 glog.Fatal(http.ListenAndServe(*port, nil)) |
467 } | 468 } |
OLD | NEW |