web: round last scrape timestamp to milliseconds

This commit is contained in:
Fabian Reinartz 2016-06-08 20:23:54 +02:00
parent 76ffdf4cc5
commit 25135c3691

View file

@ -377,7 +377,9 @@ func (h *Handler) consolesPath() string {
func tmplFuncs(consolesPath string, opts *Options) template_text.FuncMap {
return template_text.FuncMap{
"since": time.Since,
"since": func(t time.Time) time.Duration {
return time.Since(t) / time.Millisecond * time.Millisecond
},
"consolesPath": func() string { return consolesPath },
"pathPrefix": func() string { return opts.ExternalURL.Path },
"stripLabels": func(lset model.LabelSet, labels ...model.LabelName) model.LabelSet {