2017-12-04 15:12:28 +00:00
|
|
|
{{define "head"}}
|
2020-11-03 13:51:48 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/classic/static/css/targets.css?v={{ buildVersion }}">
|
|
|
|
<script src="{{ pathPrefix }}/classic/static/js/targets.js?v={{ buildVersion }}"></script>
|
2017-12-04 15:12:28 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
*[id]:before {
|
|
|
|
display: block;
|
|
|
|
content: " ";
|
|
|
|
margin-top: -65px;
|
|
|
|
height: 65px;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
</style>
|
2019-06-25 12:39:34 +00:00
|
|
|
{{end}}
|
2017-12-04 15:12:28 +00:00
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
<h1>Service Discovery</h1>
|
2019-03-08 21:40:31 +00:00
|
|
|
<div>
|
2017-12-04 15:12:28 +00:00
|
|
|
<ul>
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- range $i, $job := .Index}}
|
|
|
|
<li><a href="#job-{{$job}}">{{$job}}</a> ({{ index $.Active $i }}/{{ index $.Total $i }} active targets)</li>
|
|
|
|
{{- end}}
|
2017-12-04 15:12:28 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- $targets := .Targets}}
|
|
|
|
{{- range $i, $job := .Index}}
|
2017-12-04 15:12:28 +00:00
|
|
|
|
|
|
|
<div class="table-container">
|
2018-03-09 13:33:53 +00:00
|
|
|
<h2 class="job_header" id="job-{{$job}}">
|
2019-06-25 12:39:34 +00:00
|
|
|
{{$job}} <button type="button" class="targets collapsed-table btn btn-primary">show more</button>
|
2017-12-04 15:12:28 +00:00
|
|
|
</h2>
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- with index $.Dropped $i}}
|
|
|
|
{{- if gt . 100 }}
|
|
|
|
<div class="collapsed-element" style="display:none">{{ . }} targets have been dropped, showing only the first 100 dropped targets as examples.</div>
|
|
|
|
{{- end}}
|
|
|
|
{{- end}}
|
2019-02-07 21:18:09 +00:00
|
|
|
<table class="table table-sm table-bordered table-striped table-hover" style="display:none">
|
2017-12-04 15:12:28 +00:00
|
|
|
<thead class="job_details">
|
|
|
|
<tr>
|
|
|
|
<th>Discovered Labels</th>
|
|
|
|
<th>Target Labels</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- range index $targets $job}}
|
2017-12-04 15:12:28 +00:00
|
|
|
<tr>
|
|
|
|
<td class="labels">
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- $labels := .DiscoveredLabels.Map }}
|
2018-02-24 19:44:37 +00:00
|
|
|
<ul class="list-inline" style="list-style-type:none">
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- range $label, $value := $labels }}
|
|
|
|
<li><span class="badge badge-primary">{{$label}}="{{$value}}"</span></li>
|
|
|
|
{{- else -}}
|
|
|
|
<li><span class="badge badge-default">none</span></li>
|
|
|
|
{{- end }}
|
2017-12-04 15:12:28 +00:00
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
<td class="labels">
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- $labels := .Labels.Map }}
|
2018-02-24 19:44:37 +00:00
|
|
|
<ul class="list-inline" style="list-style-type:none">
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- range $label, $value := $labels }}
|
|
|
|
<li><span class="badge badge-primary">{{$label}}="{{$value}}"</span></li>
|
|
|
|
{{- else -}}
|
|
|
|
<li><span class="badge badge-default">Dropped</span></li>
|
|
|
|
{{- end }}
|
2017-12-04 15:12:28 +00:00
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- end}}
|
2017-12-04 15:12:28 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2019-06-25 12:39:34 +00:00
|
|
|
{{- end }}
|
2017-12-04 15:12:28 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{end}}
|