view individual page of logs
This commit is contained in:
parent
5c26ff75aa
commit
9a2a3aa12c
14
Router.go
14
Router.go
@ -105,8 +105,18 @@ func (this *ArchiveServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
arc.renderError(w, fmt.Sprintf("Unknown source '%s'", matches[1]))
|
||||
}
|
||||
|
||||
} else if this.rxViewPage.MatchString(r.URL.Path) {
|
||||
arc.renderError(w, "Not implemented.") // FIXME
|
||||
} else if matches := this.rxViewPage.FindStringSubmatch(r.URL.Path); len(matches) > 0 {
|
||||
if ls := this.lookupSource(matches[1]); ls != nil {
|
||||
arc.selectSource(ls, matches[1])
|
||||
y, _ := strconv.Atoi(matches[2])
|
||||
m, _ := strconv.Atoi(matches[3])
|
||||
arc.ym = YearMonth{Year: y, Month: time.Month(m)} // 1-based months
|
||||
arc.page, _ = strconv.Atoi(matches[4])
|
||||
arc.renderView(w)
|
||||
|
||||
} else {
|
||||
arc.renderError(w, fmt.Sprintf("Unknown source '%s'", matches[1]))
|
||||
}
|
||||
|
||||
} else if this.rxSearch.MatchString(r.URL.Path) {
|
||||
arc.renderError(w, "Not implemented.") // FIXME
|
||||
|
Loading…
Reference in New Issue
Block a user