golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/coordinator/internal/legacydash/ui.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>
     9    <head>
    10      <title>{{$.Dashboard.Name}} Build Dashboard</title>
    11      <link rel="stylesheet" href="/static/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('.js-redraw-colspan').forEach(el => {
    22              const newColspan = el.getAttribute(showUnsupported ? 'data-archs' : 'data-firstarchs');
    23              el.setAttribute('colspan', newColspan);
    24            });
    25            document.querySelectorAll('.js-redraw-span').forEach(el => {
    26              const newSpan = el.getAttribute(showUnsupported ? 'data-archs' : 'data-firstarchs');
    27              el.setAttribute('span', newSpan);
    28            });
    29        }
    30  
    31        window.addEventListener('load', () => {
    32          document.querySelector('#showshort').checked = !showUnsupported;
    33          document.querySelector('#showshort').addEventListener('change', redraw);
    34          redraw();
    35        });
    36      </script>
    37    </head>
    38  
    39    <body>
    40      {{if false}}<header class="Dashboard-topbar" style="background: antiquewhite;">
    41        <div>
    42          A banner isn't actively displayed at this time. This serves as a placeholder
    43          that can be used if a banner does need to be displayed.
    44        </div>
    45      </header>{{end}}
    46      <header id="topbar">
    47        <h1>
    48          <a href="https://farmer.golang.org/">Go Build Coordinator</a>
    49        </h1>
    50        <nav>
    51          <ul>
    52            <li><a href="/">Build Dashboard</a></li>
    53            <li><a href="https://perf.golang.org/dashboard">Performance Dashboard</a></li>
    54            <li><a href="https://farmer.golang.org/builders">Builders</a></li>
    55          </ul>
    56        </nav>
    57        <div class="clear"></div>
    58      </header>
    59  
    60      <form action="." method="GET">
    61      <input type="hidden" name="repo" value="{{.Package.Path}}">
    62      <nav class="dashboards">
    63        {{if not (eq .Branch "")}}
    64        <label>
    65          <select name="branch" onchange="this.form.submit()">
    66          {{range $.Branches}}
    67            <option value="{{.}}"{{if eq $.Branch .}} selected{{end}}>{{.}}</option>
    68          {{end}}
    69          </select>
    70        </label>
    71        {{end}}
    72        <label>
    73          <input type=checkbox id="showshort">
    74          show only <a href="http://golang.org/wiki/PortingPolicy">first-class ports</a>
    75        </label>
    76      </nav>
    77      </form>
    78      {{with $.Package.Name}}<h2>{{.}}</h2>{{end}}
    79  
    80    <div class="page">
    81  
    82      {{if $.Commits}}
    83  
    84      <table class="build">
    85        <colgroup class="col-hash" {{if $.Package.Path}}span="2"{{end}}></colgroup>
    86        <colgroup class="col-user"></colgroup>
    87        <colgroup class="col-time"></colgroup>
    88        <colgroup class="col-desc"></colgroup>
    89      {{range $.Builders | builderSpans}}
    90        <colgroup class="col-result js-redraw-span{{if .Unsupported}} unsupported{{end}}" span="{{.N}}" data-archs="{{.N}}" data-firstarchs="{{.FirstN}}"></colgroup>
    91      {{end}}
    92        <tr>
    93          <!-- extra row to make alternating colors use dark for first result -->
    94        </tr>
    95        <tr>
    96      {{if $.Package.Path}}
    97          <th colspan="2">revision</th>
    98      {{else}}
    99          <th>&nbsp;</th>
   100      {{end}}
   101          <th></th>
   102          <th></th>
   103          <th></th>
   104      {{range $.Builders | builderSpans}}
   105          <th class="js-redraw-colspan{{if .Unsupported}} unsupported{{end}}" colspan="{{.N}}" data-archs="{{.N}}" data-firstarchs="{{.FirstN}}">{{.OS}}</th>
   106      {{end}}
   107        </tr>
   108  
   109        <tr>
   110      {{if $.Package.Path}}
   111          <th class="result arch">repo</th>
   112          <th class="result arch">{{$.Dashboard.Name}}</th>
   113      {{else}}
   114          <th>&nbsp;</th>
   115      {{end}}
   116          <th></th>
   117          <th></th>
   118          <th></th>
   119      {{range $.Builders}}
   120          {{$ki := knownIssue .}}
   121          <th class="result arch{{if (unsupported .)}} unsupported{{end}}{{if $ki}} noise{{end}}" title="{{.}}
   122            {{- with $ki}}{{"\n\n"}}This builder has a known issue. See go.dev/issue/{{.}}.{{end}}"
   123          >{{builderSubheading .}}</th>
   124      {{end}}
   125        </tr>
   126  
   127        <tr class="subheading2">
   128          <th {{if $.Package.Path}}colspan="2"{{end}}>&nbsp;</th>
   129          <th></th>
   130          <th></th>
   131          <th></th>
   132      {{range $.Builders}}
   133          {{$ki := knownIssue .}}
   134          <th class="result arch{{if (unsupported .)}} unsupported{{end}}{{if $ki}} noise{{end}}" title="{{.}}
   135            {{- with $ki}}{{"\n\n"}}This builder has a known issue. See go.dev/issue/{{.}}.{{end}}"
   136          >{{builderSubheading2 .}}</th>
   137      {{end}}
   138        </tr>
   139  
   140        {{range $c := $.Commits}}
   141        {{range $i, $h := $c.ResultGoHashes}}
   142          <tr class="commit">
   143          {{if $i}}
   144            <td>&nbsp;</td>
   145          {{if $h}}
   146            <td class="hash"><a href="https://go-review.googlesource.com/q/{{$h}}">{{shortHash $h}}</a></td>
   147          {{end}}
   148            <td>&nbsp;</td>
   149            <td>&nbsp;</td>
   150            <td>&nbsp;</td>
   151          {{else}}
   152            <td class="hash"><a href="https://go-review.googlesource.com/q/{{$c.Hash}}">{{shortHash $c.Hash}}</a></td>
   153          {{if $h}}
   154            <td class="hash"><a href="https://go-review.googlesource.com/q/{{$h}}">{{shortHash $h}}</a></td>
   155          {{end}}
   156            <td class="user" title="{{$c.User}}">{{shortUser $c.User}}</td>
   157            <td class="time">{{formatTime $c.Time}}</td>
   158            <td class="desc" title="{{$c.Desc}}">{{shortDesc $c.Desc}}</td>
   159          {{end}}
   160            {{range $builderName := $.Builders}}
   161              <td class="result{{if (unsupported .)}} unsupported{{end}}">
   162              {{if and (eq $.Repo "go") (isUntested $builderName "go" $.Branch "")}}•{{else}}
   163                {{with $c.Result $builderName $h}}
   164                  {{$ki := knownIssue $builderName}}
   165                  {{if .BuildingURL}}
   166                    <a href="{{.BuildingURL}}"><img src="https://go.dev/favicon.ico" height=16 width=16 border=0></a>
   167                  {{else}}
   168                    <a href="{{.LogURL}}"
   169                      class="{{if .OK}}ok{{else}}fail{{end}}
   170                        {{- if or $ki .Noise}} noise{{end}}"
   171                      title="Build log of {{$builderName}} on commit {{shortHash $c.Hash}}{{with $h}} (using Go commit {{shortHash .}}){{end}}.
   172                        {{- with $ki}}{{"\n\n"}}This builder has a known issue. See go.dev/issue/{{.}}.{{end}}"
   173                    >{{if .OK}}ok{{else}}fail{{end}}</a>
   174                  {{end}}
   175                {{else}}
   176                  &nbsp;
   177                {{end}}
   178              {{end}}
   179              </td>
   180            {{end}}
   181          </tr>
   182        {{end}}
   183      {{end}}
   184      </table>
   185  
   186      {{with $.Pagination}}
   187      <div class="paginate">
   188        <nav>
   189          <a {{if .HasPrev}}href="?{{with $.Package.Path}}repo={{.}}&{{end}}page={{.Prev}}{{with $.Branch}}&branch={{.}}{{end}}"{{else}}class="inactive"{{end}}>newer</a>
   190          <a {{if .Next}}href="?{{with $.Package.Path}}repo={{.}}&{{end}}page={{.Next}}{{with $.Branch}}&branch={{.}}{{end}}"{{else}}class="inactive"{{end}}>older</a>
   191          <a {{if .HasPrev}}href=".{{with $.Branch}}?branch={{.}}{{end}}"{{else}}class="inactive"{{end}}>latest</a>
   192        </nav>
   193      </div>
   194      {{end}}
   195  
   196    {{else}}
   197      <p>No commits to display. Hm.</p>
   198    {{end}}
   199  
   200    {{range $.TagState}}
   201      {{$goHash := .Tag.Hash}}
   202      {{$goBranch := .Branch}}
   203      {{$builders := .Builders}}
   204      {{if .Packages}}
   205        <h2>
   206          golang.org/x repos at Go {{$goBranch}}
   207          <small>(<a href="https://go-review.googlesource.com/q/{{.Tag.Hash}}">{{shortHash .Tag.Hash}}</a>)</small>
   208        </h2>
   209  
   210        <table class="build">
   211        <colgroup class="col-package"></colgroup>
   212        <colgroup class="col-hash"></colgroup>
   213        <colgroup class="col-user"></colgroup>
   214        <colgroup class="col-time"></colgroup>
   215        <colgroup class="col-desc"></colgroup>
   216        {{range $builders | builderSpans}}
   217          <colgroup class="col-result js-redraw-span{{if .Unsupported}} unsupported{{end}}" span="{{.N}}" data-archs="{{.N}}" data-firstarchs="{{.FirstN}}"></colgroup>
   218        {{end}}
   219        <tr>
   220          <!-- extra row to make alternating colors use dark for first result -->
   221        </tr>
   222        <tr>
   223          <th></th>
   224          <th></th>
   225          <th></th>
   226          <th></th>
   227          <th></th>
   228          {{range $builders | builderSpans}}
   229            <th class="js-redraw-colspan{{if .Unsupported}} unsupported{{end}}" colspan="{{.N}}" data-archs="{{.N}}" data-firstarchs="{{.FirstN}}">{{.OS}}</th>
   230          {{end}}
   231        </tr>
   232        <tr>
   233          <th></th>
   234          <th></th>
   235          <th></th>
   236          <th></th>
   237          <th></th>
   238          {{range $builders}}
   239            {{$ki := knownIssue .}}
   240            <th class="result arch{{if (unsupported .)}} unsupported{{end}}{{if $ki}} noise{{end}}" title="{{.}}
   241              {{- with $ki}}{{"\n\n"}}This builder has a known issue. See go.dev/issue/{{.}}.{{end}}"
   242            >{{builderSubheading .}}</th>
   243          {{end}}
   244        </tr>
   245        <tr class="subheading2">
   246          <th>&nbsp;</th>
   247          <th></th>
   248          <th></th>
   249          <th></th>
   250          <th></th>
   251          {{range $builders}}
   252            {{$ki := knownIssue .}}
   253            <th class="result arch{{if (unsupported .)}} unsupported{{end}}{{if $ki}} noise{{end}}" title="{{.}}
   254              {{- with $ki}}{{"\n\n"}}This builder has a known issue. See go.dev/issue/{{.}}.{{end}}"
   255            >{{builderSubheading2 .}}</th>
   256          {{end}}
   257        </tr>
   258      {{range $pkg := .Packages}}
   259        <tr class="commit">
   260          <td><a title="{{.Package.Path}}" href="?repo={{.Package.Path}}">{{.Package.Name}}</a></td>
   261          <td class="hash">
   262            {{$h := $pkg.Commit.Hash}}
   263            <a href="https://go-review.googlesource.com/q/{{$h}}">{{shortHash $h}}</a>
   264          </td>
   265          {{with $pkg.Commit}}
   266            <td class="user" title="{{.User}}">{{shortUser .User}}</td>
   267            <td class="time">{{formatTime .Time}}</td>
   268            <td class="desc" title="{{.Desc}}">{{shortDesc .Desc}}</td>
   269          {{end}}
   270          {{range $builderName := $builders}}
   271            <td class="result{{if (unsupported .)}} unsupported{{end}}">
   272              {{if isUntested $builderName $pkg.Package.Name "master" $goBranch}}
   273                •
   274              {{else}}
   275                {{with $pkg.Commit.Result $builderName $goHash}}
   276                  {{$ki := knownIssue $builderName}}
   277                  {{if .BuildingURL}}
   278                    <a href="{{.BuildingURL}}"><img src="https://go.dev/favicon.ico" height=16 width=16 border=0></a>
   279                  {{else}}
   280                    <a href="{{.LogURL}}"
   281                      class="{{if .OK}}ok{{else}}fail{{end}}
   282                        {{- if or $ki .Noise}} noise{{end}}"
   283                      title="Build log of {{$builderName}} on commit {{shortHash $h}} (using Go commit {{shortHash $goHash}}).
   284                        {{- with $ki}}{{"\n\n"}}This builder has a known issue. See go.dev/issue/{{.}}.{{end}}"
   285                    >{{if .OK}}ok{{else}}fail{{end}}</a>
   286                  {{end}}
   287                {{else}}
   288                  &nbsp;
   289                {{end}}
   290              {{end}}
   291            </td>
   292          {{end}}
   293        </tr>
   294      {{end}}
   295      </table>
   296     {{end}}
   297    {{end}}
   298  
   299    </div>
   300    </body>
   301  </html>