1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-19 10:37:01 +00:00

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)
This commit is contained in:
James Hillyerd
2012-11-14 17:22:25 -08:00
parent 2ba9eaa779
commit afe14da506
5 changed files with 48 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
package web
import (
"github.com/jhillyerd/inbucket/config"
"net/http"
)
@@ -11,7 +12,9 @@ func RootIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err erro
}
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,
})
}