github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/clients/pkg/promtail/server/ui/templates/targets.html (about)

     1  {{define "head"}}
     2  <link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/static/css/targets.css?v={{ buildVersion }}">
     3  <script src="{{ pathPrefix }}/static/js/targets.js?v={{ buildVersion }}"></script>
     4  {{end}}
     5  
     6  
     7  {{define "content"}}
     8    <div class="container-fluid">
     9      <h1>Targets</h1>
    10      <div id="showTargets" class="btn-group btn-group-toggle" data-toggle="buttons">
    11        <label class="btn btn-primary">
    12          <input type="radio" name="targets" id="all-targets" autocomplete="off" checked> All
    13        </label>
    14        <label class="btn btn-primary">
    15          <input type="radio" name="targets" id="unready-targets" autocomplete="off"> Unready
    16        </label>
    17        </br>
    18    </div>
    19  
    20      {{range $job, $pool := .TargetPools}}
    21      {{$ready := numReady $pool}}
    22      {{$total := len $pool}}
    23  
    24      <div class="table-container">
    25        <h2 class="job_header{{if lt $ready $total}} danger{{end}}">
    26          <a id="job-{{$job}}" href="#job-{{$job}}">{{$job}} ({{$ready}}/{{$total}} ready)</a>
    27          <button type="button" class="targets expanded-table btn btn-primary">show less</button>
    28        </h2>
    29        <table class="table table-sm table-bordered table-striped table-hover">
    30          <thead class="job_details">
    31            <tr>
    32              <th>Type</th>
    33              <th>Ready</th>
    34              <th>Labels</th>
    35              <th>Details</th>
    36            </tr>
    37          </thead>
    38          <tbody>
    39          {{range $pool}}
    40            <tr>
    41              <td class="type">
    42                <span >{{.Type}}</a><br>
    43              </td>
    44              <td class="state">
    45                <span class="alert alert-{{ if .Ready }}success{{else}}danger{{end}} state_indicator text-uppercase">
    46                  {{.Ready}}
    47                </span>
    48              </td>
    49              <td class="labels">
    50                <span class="cursor-pointer" data-toggle="tooltip" title="" data-html=true data-original-title="<b>Before relabeling:</b>{{range $k, $v := .DiscoveredLabels}}<br>{{$ev := $v | html}}{{$k}}=&quot;{{$ev}}&quot;{{end}}">
    51                  {{range $label, $value := .Labels}}
    52                    <span class="badge badge-primary">{{$label}}="{{$value}}"</span>
    53                  {{else}}
    54                    <span class="badge badge-default">none</span>
    55                  {{end}}
    56                </span>
    57              </td>
    58              <td class="details">
    59                {{if eq .Type "File"}}
    60                  {{$files := fileTargetDetails .Details}}
    61                  <table class="table">
    62                      <thead>
    63                        <tr>
    64                          <th scope="col">Path</th>
    65                          <th scope="col">Position</th>
    66                        </tr>
    67                      </thead>
    68                    <tbody>
    69                  {{range $path, $position := $files}}
    70                    <tr>
    71                      <td>{{$path}}</td>
    72                      <td>{{$position}}</td>
    73                    </tr>
    74                  {{end}}
    75                  </tbody>
    76                </table>
    77                {{else if eq .Type "Journal" }}
    78                  {{$files := journalTargetDetails .Details}}
    79                  <table class="table">
    80                      <thead>
    81                        <tr>
    82                          <th scope="col">Key</th>
    83                          <th scope="col">Value</th>
    84                        </tr>
    85                      </thead>
    86                    <tbody>
    87                  {{range $path, $position := $files}}
    88                    <tr>
    89                      <td>{{$path}}</td>
    90                      <td>{{$position}}</td>
    91                    </tr>
    92                  {{end}}
    93                  </tbody>
    94                </table>
    95                {{end}}
    96              </td>
    97            </tr>
    98          {{end}}
    99          </tbody>
   100        </table>
   101      </div>
   102      {{ end }}
   103    </div>
   104  {{end}}