golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/coordinator/internal/dashboard/dashboard.html (about)

     1  <!DOCTYPE html>
     2  <!--
     3   Copyright 2022 The Go Authors. All rights reserved.
     4   Use of this source code is governed by a BSD-style
     5   license that can be found in the LICENSE file.
     6  -->
     7  
     8  <html lang="en">
     9  <head>
    10    <title>{{$.Dashboard.Name}} Build Dashboard</title>
    11    <link rel="stylesheet" href="/style.css"/>
    12    <script async>
    13      let showUnsupported = window.location.hash.substr(1) !== 'short';
    14  
    15      function redraw() {
    16        showUnsupported = !document.querySelector('#showshort').checked;
    17        document.querySelectorAll('.unsupported').forEach(el => {
    18          el.hidden = !showUnsupported;
    19        });
    20        window.location.hash = showUnsupported ? '' : 'short';
    21        document.querySelectorAll('.Build-builderOS').forEach(el => {
    22          el.setAttribute(
    23            'colspan',
    24            el.getAttribute(
    25              showUnsupported ? 'data-archs' : 'data-firstClassArchs'
    26            )
    27          );
    28        });
    29        document.querySelectorAll('.Build-osColumn').forEach(el => {
    30          el.setAttribute(
    31            'span',
    32            el.getAttribute(
    33              showUnsupported ? 'data-archs' : 'data-firstClassArchs'
    34            )
    35          );
    36        });
    37      }
    38  
    39      window.addEventListener('load', () => {
    40        document.querySelector('#showshort').checked = !showUnsupported;
    41        document.querySelector('#showshort').addEventListener('change', redraw);
    42        redraw();
    43      });
    44    </script>
    45  </head>
    46  
    47  <body class="Dashboard">
    48  {{if false}}<header class="Dashboard-topbar" style="background: antiquewhite;">
    49    <div>
    50      A banner isn't actively displayed at this time. This serves as a placeholder
    51      that can be used if a banner does need to be displayed.
    52    </div>
    53  </header>{{end}}
    54  <header class="Dashboard-topbar">
    55    <h1>
    56      <a href="/">Go Build Coordinator</a>
    57    </h1>
    58    <nav>
    59      <ul>
    60        <li><a href="/dashboard">Build Dashboard</a></li>
    61        <li><a href="https://perf.golang.org/dashboard">Performance Dashboard</a></li>
    62        <li><a href="/builders">Builders</a></li>
    63      </ul>
    64    </nav>
    65  </header>
    66  
    67  <form action="../.." method="GET">
    68  <input type="hidden" name="repo" value="{{.Package.Path}}"/>
    69  <nav class="Dashboard-controls">
    70    {{if not (eq .Branch "")}}
    71      <label>
    72        <select name="branch" onchange="this.form.submit()">
    73            {{range $.Branches}}
    74              <option value="{{.}}" {{if eq $.Branch .}} selected{{end}}>
    75                  {{.}}
    76              </option>
    77            {{end}}
    78        </select>
    79      </label>
    80    {{end}}
    81    <label>
    82      <input type="checkbox" id="showshort"/>
    83      show only
    84      <a href="http://golang.org/wiki/PortingPolicy">first-class ports</a>
    85    </label>
    86  </nav>
    87  </form>
    88  <h2 class="Dashboard-packageName">{{$.Package.Name}}</h2>
    89  
    90  <div class="page Build-scrollTable">
    91  {{if $.Commits}}
    92    <table class="Build">
    93      <colgroup class="col-hash" {{if $.Package.Path}} span="2" {{end}}></colgroup>
    94      <colgroup class="col-user"></colgroup>
    95      <colgroup class="col-time"></colgroup>
    96      <colgroup class="Build-descriptionColumn col-desc"></colgroup>
    97        {{range $.Builders}}
    98          <colgroup class="Build-osColumn col-result{{if .Unsupported}} unsupported{{end}}" span="{{.Archs | len}}"
    99                    data-archs="{{.Archs | len}}" data-firstClassArchs="{{.FirstClassArchs | len}}"></colgroup>
   100        {{end}}
   101      <tr class="Build-builderOSRow">
   102        {{if $.Package.Path}}
   103          <th colspan="2">revision</th>
   104        {{else}}
   105          <th>&nbsp;</th>
   106        {{end}}
   107        <th></th>
   108        <th></th>
   109        <th></th>
   110        {{range $.Builders}}
   111          <th class="Build-builderOS{{if not .FirstClass}} unsupported{{end}}" colspan="{{.Archs | len}}"
   112              data-archs="{{.Archs | len}}" data-firstClassArchs="{{.FirstClassArchs | len}}">
   113              {{.OS}}
   114          </th>
   115        {{end}}
   116      </tr>
   117  
   118      <tr class="Build-builderArchRow">
   119        {{if $.Package.Path}}
   120          <th class="result arch">repo</th>
   121          <th class="result arch">{{$.Dashboard.Name}}</th>
   122        {{else}}
   123          <th>&nbsp;</th>
   124        {{end}}
   125        <th></th>
   126        <th></th>
   127        <th></th>
   128        {{range $.Builders}}
   129          {{range.Archs}}
   130            <th class="result arch{{if not (.FirstClass)}} unsupported{{end}}" title="{{.Name}}">
   131                {{.Arch}}
   132            </th>
   133          {{end}}
   134        {{end}}
   135      </tr>
   136  
   137      <tr class="Build-builderTagRow">
   138        <th {{if $.Package.Path}}colspan="2" {{end}}>&nbsp;</th>
   139        <th></th>
   140        <th></th>
   141        <th></th>
   142        {{range $.Builders}}
   143          {{range.Archs}}
   144            <th class="Build-resultArch result arch{{if not (.FirstClass)}} unsupported{{end}}" title="{{.Name}}">
   145                {{.Tag}}
   146            </th>
   147          {{end}}
   148        {{end}}
   149      </tr>
   150      {{range $c := $.Commits}}
   151        <tr class="commit">
   152          <td class="hash">
   153            <span class="ShortHash">
   154              <a href="https://go-review.googlesource.com/q/{{$c.Hash}}">
   155                {{$c.Hash}}
   156              </a>
   157            </span>
   158          </td>
   159          <td class="Build-user" title="{{$c.User}}">{{$c.ShortUser}}</td>
   160          <td class="Build-commitTime">
   161            {{$c.Time}}
   162          </td>
   163          <td class="Build-desc desc" title="{{$c.Desc}}">{{$c.Desc}}</td>
   164          {{range $b := $.Builders}}
   165            {{range $a := .Archs}}
   166              <td class="Build-result {{if not $a.FirstClass}} unsupported{{end}}" data-builder="{{$a.Name}}">
   167                {{with $c.ResultForBuilder $a.Name}}
   168                  {{if .BuildingURL}}
   169                    <a href="{{.BuildingURL}}"><img src="https://go.dev/favicon.ico" height=16 width=16 border=0></a>
   170                  {{else}}
   171                    <a class="Build-result{{if .OK}}OK{{else}}Fail{{end}}
   172                      {{- if .Noise}} Build-resultNoise{{end}}"
   173                      href="{{.LogURL}}"
   174                      title="Build log of {{$a.Name}} on commit {{shortHash $c.Hash}}.">{{if .OK}}ok{{else}}fail{{end}}</a>
   175                  {{end}}
   176                {{end}}
   177              </td>
   178            {{end}}
   179          {{end}}
   180        </tr>
   181      {{end}}
   182    </table>
   183  
   184    {{with $.Pagination}}
   185      <div class="paginate">
   186        <nav>
   187          {{if .HasPrev}}
   188            <a href="?repo={{$.Package.Path}}&page={{.Prev}}&branch={{$.Branch}}">
   189              newer
   190            </a>
   191          {{else}}
   192            newer
   193          {{end}}
   194          {{if .Next}}
   195            <a href="?repo={{$.Package.Path}}&page={{.Next}}branch={{$.Branch}}">
   196              older
   197            </a>
   198          {{else}}
   199            older
   200          {{end}}
   201          {{if .HasPrev}}
   202            <a href="?branch={{$.Branch}}">
   203              latest
   204            </a>
   205          {{else}}
   206            latest
   207          {{end}}
   208        </nav>
   209      </div>
   210    {{end}}
   211  {{else}}
   212    <p>No commits to display. Hm.</p>
   213  {{end}}
   214  </div>
   215  </body>
   216  </html>