mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
web: round last scrape timestamp to milliseconds
This commit is contained in:
parent
76ffdf4cc5
commit
25135c3691
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue