1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00
Files
go-inbucket/web/root_controller.go
James Hillyerd afe14da506 Metrics improvements
- Label graphs by their duration, not update period
- Extend to 60 units so they are either 10 minutes or an hour of data
- Improvements to retention information
- Change javascript calculations, fixes #9 (I hope)
2012-11-14 17:22:25 -08:00

21 lines
534 B
Go

package web
import (
"github.com/jhillyerd/inbucket/config"
"net/http"
)
func RootIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err error) {
return RenderTemplate("root/index.html", w, map[string]interface{}{
"ctx": ctx,
})
}
func RootStatus(w http.ResponseWriter, req *http.Request, ctx *Context) (err error) {
retentionMinutes := config.GetDataStoreConfig().RetentionMinutes
return RenderTemplate("root/status.html", w, map[string]interface{}{
"ctx": ctx,
"retentionMinutes": retentionMinutes,
})
}