Add IDs to H2 tags to allow anchored linking

Allow sharing links directly to areas of the status page f.e. http://prometheus.internal/#config/
This commit is contained in:
Dan Williams 2015-07-30 15:39:05 -04:00
parent 6e7d743cd4
commit 0441518a71
1 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
{{define "content"}} {{define "content"}}
<div class="container-fluid"> <div class="container-fluid">
<h2>Runtime Information</h2> <h2 id="runtime">Runtime Information</h2>
<table class="table table-condensed table-bordered table-striped table-hover"> <table class="table table-condensed table-bordered table-striped table-hover">
<tbody> <tbody>
<tr> <tr>
@ -12,7 +12,7 @@
</tbody> </tbody>
</table> </table>
<h2>Build Information</h2> <h2 id="buildinformation">Build Information</h2>
<table class="table table-condensed table-bordered table-striped table-hover"> <table class="table table-condensed table-bordered table-striped table-hover">
<tbody> <tbody>
{{range $key, $value := .Info}} {{range $key, $value := .Info}}
@ -24,13 +24,13 @@
</tbody> </tbody>
</table> </table>
<h2>Configuration</h2> <h2 id="configuration">Configuration</h2>
<pre>{{.Status.Config}}</pre> <pre>{{.Status.Config}}</pre>
<h2>Rules</h2> <h2 id="rules">Rules</h2>
<pre>{{range call .Status.Rules}}{{.HTMLSnippet pathPrefix}}<br/>{{end}}</pre> <pre>{{range call .Status.Rules}}{{.HTMLSnippet pathPrefix}}<br/>{{end}}</pre>
<h2>Targets</h2> <h2 id="targets">Targets</h2>
<table class="table table-condensed table-bordered table-striped table-hover"> <table class="table table-condensed table-bordered table-striped table-hover">
{{range $job, $pool := call .Status.TargetPools}} {{range $job, $pool := call .Status.TargetPools}}
<thead> <thead>
@ -85,7 +85,7 @@
{{end}} {{end}}
</table> </table>
<h2>Startup Flags</h2> <h2 id="startupflags">Startup Flags</h2>
<table class="table table-condensed table-bordered table-striped table-hover"> <table class="table table-condensed table-bordered table-striped table-hover">
<tbody> <tbody>
{{range $key, $value := .Status.Flags}} {{range $key, $value := .Status.Flags}}