mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Display dates as well as timestamps in status page (#7544)
* Display dates as well as timestamps in the status page Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr> * Trim trailing whitespaces Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
This commit is contained in:
parent
be96951c56
commit
6a00626ee9
|
@ -99,14 +99,14 @@
|
|||
<tr>
|
||||
<th>Number Of Series </th>
|
||||
<th>Number of Chunks</th>
|
||||
<th>Current Max Time</th>
|
||||
<th>Current Min Time</th>
|
||||
<th>Current Max Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row">{{ .NumSeries}}</td>
|
||||
<td>{{.ChunkCount}}</td>
|
||||
<td>{{ .MaxTime}}</td>
|
||||
<td>{{ .MinTime}}</td>
|
||||
<td>{{.ChunkCount}}</td>
|
||||
<td>{{ .MinTime | unixToTime }} ({{ .MinTime }})</td>
|
||||
<td>{{ .MaxTime | unixToTime }} ({{ .MaxTime }})</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -121,7 +121,7 @@
|
|||
{{ range .Stats.CardinalityLabelStats }}
|
||||
<tr>
|
||||
<td scope="row">{{.Name}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
@ -136,7 +136,7 @@
|
|||
{{ range .Stats.CardinalityMetricsStats }}
|
||||
<tr>
|
||||
<td scope="row">{{.Name}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
@ -151,11 +151,11 @@
|
|||
{{ range .Stats.LabelValueStats }}
|
||||
<tr>
|
||||
<td scope="row">{{.Name}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
<h3 id="headstatus">Most Common Label Pairs</h3>
|
||||
<table class="table table-sm table-bordered table-striped table-hover">
|
||||
<tbody>
|
||||
|
@ -166,10 +166,10 @@
|
|||
{{ range .Stats.LabelValuePairsStats }}
|
||||
<tr>
|
||||
<td scope="row">{{.Name}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
<td>{{.Count}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -982,6 +982,10 @@ func tmplFuncs(consolesPath string, opts *Options) template_text.FuncMap {
|
|||
"since": func(t time.Time) time.Duration {
|
||||
return time.Since(t) / time.Millisecond * time.Millisecond
|
||||
},
|
||||
"unixToTime": func(i int64) time.Time {
|
||||
t := time.Unix(i/int64(time.Microsecond), 0).UTC()
|
||||
return t
|
||||
},
|
||||
"consolesPath": func() string { return consolesPath },
|
||||
"pathPrefix": func() string { return opts.ExternalURL.Path },
|
||||
"pageTitle": func() string { return opts.PageTitle },
|
||||
|
|
Loading…
Reference in a new issue